Building "MiniPlay", a Mini Games Site — Seven Languages, Leaderboards and Game Uploads with Build-Free Vanilla JavaScript
How we built a site with 20 instant-play browser mini games in five days — why we chose a no-build structure, how each game plugs in as an independent folder, generating pages in seven languages, Firebase sign-in and leaderboard security rules, and an admin page for uploading games.
When you have a few spare minutes and look for a game you can play right in the browser, many sites get in the way. They ask you to install an app, make you sign up, or show you ads before the game.
So we built a mini games site where you pick a game and it starts — no install, no sign-up: MiniPlay. It has 20 games, including a 2048-style number merge, brick breaker, mine finder, stack tower and a 60-second mental math challenge, and it works on both desktop and mobile.
This article walks through the decisions we made while building MiniPlay. We hope it helps anyone who wants to ship a small web service quickly and keep running it.
At a glance
| Item | Details |
|---|---|
| Build time | November 20–24, 2026 (5 days, 14 commits) |
| Games | 20 (7 brain, 5 arcade, 4 puzzle, 3 casual, 1 sports) |
| Tech | HTML, CSS, JavaScript (no framework, no build step) |
| Languages | Korean, English, Japanese, Simplified Chinese, Spanish, Portuguese, Indonesian |
| Sign-in and rankings | Firebase Google sign-in, Firestore leaderboards (19 games) |
| Hosting | Cloudflare Workers static assets, auto-deployed on push to GitHub |
| Themes | Dark / light / system |
1. Why no framework
Most web services today are built with a framework such as React or Next.js — this company website uses Next.js. MiniPlay, however, was deliberately built with plain HTML, CSS and JavaScript and no build step.
The reason is how games get added.
- Every mini game is completely different code. One draws on a canvas, another uses the DOM, another plays sounds.
- Running the site means constantly adding games and removing the ones nobody plays. If every new game required rebuilding the whole site, that loop would slow down.
- We also wanted to accept game code produced with AI tools easily, and such code usually arrives as a single HTML file.
So the structure looks like this:
games/
merge-numbers/index.html ← one game = one folder, fully independent
brick-breaker/index.html
...
games.json ← game list (name, category, description, leaderboard settings)
play.html ← the outer page that hosts a game
Each game runs only inside its own folder, and the outer page (play.html) loads it in an iframe. The description, controls, star ratings, leaderboard and recommendations are all added by the outer page, so a new game can be added without changing a single line of its code. Hiding a game is one line in games.json: "hidden": true.
Running games inside a sandboxed iframe is also a safety measure: a bug in one game cannot affect the rest of the site.
2. How games talk to the site: postMessage
Independent games raise one question: when a game ends, how does it tell the site the score?
We used the browser's postMessage. A game only has to call this one line when it ends:
try {
parent.postMessage({ type: "miniplay:score", score: finalScore }, "*");
} catch (e) {}
The outer page receives the message and records the signed-in player's score on the leaderboard. The game knows nothing about sign-in or databases. The try/catch keeps the game working without errors when its file is opened on its own.
Language works the same way: the outer page opens the game with the visitor's language appended, such as ?lang=en, and the game switches its on-screen text accordingly.
3. Seven languages: templates + dictionaries → static pages per language
We started in Korean, but mini games need very little text, which makes them well suited to visitors from many countries. So we decided to support seven languages.
To keep the no-build structure while adding languages, we added just one small generator script:
- Page sources live in
templates/, and the text for each language lives ini18n/ko.json,i18n/en.jsonand so on. - Running
node tools/build-pages.mjsgenerates the per-language pages (/ko/,/en/,/ja/…) and the sitemap. - First-time visitors land on
/and are redirected to the address that matches their browser language.
The important part is letting search engines see each language as its own page. Every page has hreflang and canonical tags, and the sitemap lists 182 URLs, including each game's play page in every language. If we had only swapped text with JavaScript, search engines would have seen the site in one language.
We started with German and later replaced it with Indonesian. Because text lives in dictionaries and pages are generated, switching a language came down to swapping one dictionary file.
4. Sign-in and leaderboards: no server, but strict rules
Once you play, you wonder how others are doing, so we added Google sign-in and leaderboards. To avoid running our own server, we used Firebase Authentication and Firestore.
No server means the browser writes to the database directly, so the Firestore security rules decide everything that is allowed. Here is what we chose:
| Rule | Why |
|---|---|
You can only write your own documents (request.auth.uid == uid) |
Nobody can change someone else's record |
Only specific fields are allowed (score, nick, at) |
No stray data can be slipped in |
| Score must be a number from 0 to 10 million | Blocks absurd values |
| The nickname on a leaderboard must match your profile nickname | Nobody can post under someone else's name |
Timestamps must be the server time (request.time) |
Prevents date tampering |
| The same record cannot be updated again within 3 seconds | Limits request abuse |
| Nicknames are 2–16 characters | Keeps the layout intact |
To be honest, when the browser submits scores, score cheating cannot be fully prevented. Someone comfortable with developer tools can submit a plausible fake score. A competition with prizes would need the game logic verified on a server. MiniPlay's leaderboards are for casual fun, so the goal was to block obvious abuse with the rules above. Deciding how much security you actually need — and building to that level — is what matters.
What makes the leaderboards fun
- Weekly and all-time rankings: with all-time rankings alone, early records would hold first place forever. A weekly board that restarts every Monday gives new visitors a real shot at first place.
- Lower-is-better records: for games like mine finder or the reaction test, where faster is better, each game can set its sort order (
asc) and unit (seconds or milliseconds). - Per-difficulty boards: mine finder and memory match keep separate rankings for easy, medium and hard.
- Overall champion: the player who holds first place in the most games this week is shown on the home page as the "overall champion" — an incentive to try more games rather than master just one.
5. An admin page for uploading games
So that adding a game never requires opening the code, we built an admin page (/admin/).
- Enter the game ID, name, category and description, then paste the game code or choose files.
- Check it with Preview, then click Upload to GitHub: the files are committed to the repository and Cloudflare redeploys automatically.
- Before uploading, the page checks for problems common in AI-generated code — for example, whether it is a React project that still needs a build step, or whether an API key is embedded in the code.
The GitHub connection uses a fine-grained token limited to this one repository with read/write access to contents only, so even if the token leaked, the damage would be limited to one repository. The admin page is also blocked from search engines in robots.txt.
6. Hosting: Cloudflare Workers static assets
With no build step, deployment is simple. The whole repository is published as static files, and the docs, templates and tools the site doesn't need are excluded with .assetsignore. Pushing to main triggers an automatic Cloudflare deployment, served on the miniplay.springuptech.com subdomain.
Serving only static files costs almost nothing, and responses come from the Cloudflare location nearest to each visitor — important for an international audience.
7. Monetization by country, configured in one place
With visitors from many countries, the right monetization differs by country, so the site was designed from the start to switch by visitor language:
- Banner ads: Google AdSense by default; on Korean pages, Kakao AdFit when an AdFit unit is configured
- Support links: international payment services such as Ko-fi abroad, a domestic support link in Korea
- Affiliate links: each country's shopping affiliate program
All values live in a single config.js file, and anything left empty simply doesn't appear on the page. Before ads are approved, no empty ad slots show up, and after approval you only fill in the values.
8. Easy-to-miss details
- Trademarks: we didn't use any famous game's name, characters or artwork. The falling-block game, for example, is called "Block Drop Puzzle". Genres are free to use, but a specific game's name and look belong to someone else.
- Mobile controls: every game must support both keyboard and touch, since a large share of mini game players are on phones.
- Running locally: because the list is loaded from
games.json, opening the file by double-clicking shows an empty list. Use a simple server such aspython3 -m http.server. - Sign-in error messages: when sign-in first failed, the page only said "Sign-in failed", which made the cause hard to find. Showing the error code returned by Firebase (for example, an unauthorized domain or a blocked popup) made configuration problems easy to spot.
Closing thoughts
MiniPlay went from planning through development, deployment and operational features in five days, working alongside AI development tools. The speed came less from fancy technology than from choosing a simple structure at the start: one game is one folder, the contract between site and game is one message, and monetization lives in one file.
If you need sign-in or leaderboards added to a static site, a service in several languages, or an admin page that lets your team publish content themselves, contact Springuptech. We'll help you start small, validate quickly and grow it while it runs.
Jaeyong Roh
Lead engineer at Springuptech · 22 years in software engineering
Have a project related to this topic?
Even if it is just an idea, we will help you work out what is possible.