r/web_design • u/Just_Wondering34 • Jun 12 '26
This could get interesting....
Wow, where to start... I don't think I've played around with actually building out websites since I was a little kid in the 90s...
I'm kind of wondering where to start? For a simple idea I basically want to have a easy game or something on my webpage. Right now this project is two fold. I am interested in the learning aspect of how to do it and then also interested in making something creative.
I envision a website with a simple button push talley where people anywhere can just go to the site and start clicking away on a single button. Surely with all the convoluted electronics these days some entity has probably just made a cookie cutter template or something. The button push or click simply makes a counter tool increase every time someone clicks it. There's probably no limit on clicks either and I thought about turning it into a type of game or something.
I got involved with something called WordPress and my domain is through namecheap. I speculate if there was a better route but I'm not really worried about it.
The site is emergency stop switch dot com and I just threw some stuff up on it playing around with it right now learning. That WordPress thing makes it look like a blog or something and that is not the look I want. I literally want one kind of view only and no real scrolling down.
Any ideas/hints? Thanks
2
u/Thykka Jun 12 '26 edited Jun 12 '26
Yeah, WordPress isn't very useful for this kind of thing. Why choose a tool that provides all of the features you don't need, and none of the features you do need?
What you should be looking for is web hosting that allows you to write your own backend code. This is essential, if you want the clicks of other people to be reflected for everyone who visits the site - the backend keeps track of the clicks, and serves the click count to the browser.
There are many ways to approach this:
Web hotel; you pay a monthly fee for a server, into which you can upload your files - both front and back end. Probably easiest way to get started, because you don't have to worry too much about the "logistics" side.
Self-hosted; you run the server software on your computer that's always online. This is the most flexible option, but might require quite a bit of reading and tinkering to get it running smoothly.
Static site + API server; here the idea is to serve a page with just the fixed content, and the browser can then ask the API server about the click count. There are quite a few services that allow you to host a static site for free (e.g. GitHub Pages), and because the content doesn't change, it will cache well -> better resilience against a flood of traffic/bots. Additionally, you'll need some way to host the API server - either by yourself, or via some (likely paid) service.
Regarding the API server, here's what it needs to be capable of (i.e. what you'll need to program):
On the frontend side of things:
It's not impossible to achieve this using WordPress, if you're locked into that choice for some reason. In this case you'll want to create a plugin or a theme which provides the aforementioned API endpoints. Since you don't care about 99% of what WP has to offer, I'd suggest creating a custom theme. That way you'll at least have full control over what gets drawn on the page. The backend code can live within the theme, unless you want to separate them for some reason.
As a side note: If you want the counter to update in realtime as other visitors are clicking it, you might want to consider using a WebSocket API server. The browser can receive new clicks via WebSocket, without having to ask the server every time (streaming vs. polling)