Mini App Builder — Episode 2: I Built a Telegram Game in One Day With Claude Code
My Toss app was live. And completely unmonetizable. Ads, in-app purchases, payments — all locked behind a business registration I didn't have. So I looked for a platform where I could actually earn without the paperwork.
Telegram Mini Apps checked every box: no business registration required for ad revenue, no app store review, no developer fees, one billion monthly active users, one codebase for iOS + Android + Desktop + Web.
One day later, I had a working number speed game live on Telegram with Monetag ads integrated, earning its first $0.001.
What This Post Covers
Why Telegram became my next platform after Toss hit a wall, how Claude Code built an entire full-stack app — backend, database, bot, frontend, ads — in a single day, the three bugs that nearly killed the launch, and the moment the first ad impression came through. If you're thinking "can AI really build a whole production app for a non-developer?", this post is the answer.
Why a Number Speed Game
I looked at what's actually working on Telegram right now. The "Games" category is dominated by crypto tap-to-earn clickers — Hamster Kombat clones, Notcoin descendants, all chasing the 2024 P2E wave that already crashed. Users I talked to wanted actual fun games, not token farms.
Pure skill-based speed games? Almost nonexistent on Telegram.
The game is called SpeedTap. Rules take 3 seconds: a 5x5 grid shows numbers 1–25 in random positions. Tap them in order as fast as you can. When you tap a number, a new one (26–50) appears in that cell. Keep going until 50. Three wrong taps and you're out.
Why this fits Telegram specifically: numbers need no translation (works globally without localization), 30–60 second sessions fit the messaging app context perfectly, and "I got 24 seconds, can you beat me?" is the most natural share trigger I could imagine.
Here's the weird thing I learned from Episode 1 — and the thing that shaped everything in this build: I designed the share message before writing the game. If nobody shares, nothing else matters. You can have the best game in the world, but without a viral hook, you're stuck acquiring users one by one forever. So the share text got locked in first, and the game was built around it.
Claude Code Built the Full Stack in One Day
Episode 1 was frontend-only. This time I needed a real backend — global leaderboards need a database, anti-cheat needs a server, bot notifications need a persistent process. In developer terms: FastAPI + SQLite + Telegram bot + Monetag SDK + i18n + Web Audio sound effects + a deterministic daily challenge system. In plain terms: a lot of moving parts.
I wrote a spec document. Screens, game rules, API endpoints, anti-cheat logic, ad placement points, share mechanics. Handed it to Claude Code. What came back was a complete working project:
Two pieces of code from the build that I actually understood and cared about:
Deterministic daily challenge. Every day at 00:00 UTC, every player in the world gets the exact same board. Generated from a SHA-256 hash of the date — same seed means same number positions, same refill order, same game. Fair global competition with zero server coordination:
Safe ad integration. The critical rule Claude Code and I agreed on early: ads must never block gameplay. If the ad fails to load — adblocker, network issue, SDK not ready — the game continues normally. Every ad call resolves, never rejects:
The rest of the code Claude Code wrote is longer than this post. It all works.
The Bugs We Fixed Together
Three bugs, three lessons. All of them caught me off guard because they're platform quirks, not code bugs.
Telegram WebView caching. This was the nightmare. Telegram's mobile WebView caches JavaScript files aggressively and completely ignores HTTP cache headers. I'd push a fix to Cloudflare, reload the app, and nothing would change. CSS changes would appear; JS changes wouldn't. Root cause: ES module imports are cached by URL. Once game.js is cached, even a fresh HTML won't refetch it. Fix: version parameter on every import statement.
Every deploy means bumping the version number. Not elegant. Only reliable method.
Button event listeners dying silently. The quit button and sound toggle were unresponsive on first launch. The DOM had the buttons but no handlers attached. Root cause: event listeners were being registered after await calls in the init function. If the initial nickname modal took time to resolve, the buttons existed but nothing was listening. Fix: pulled all button bindings into a synchronous function called before any async work.
Dark mode lock. Telegram injects CSS variables based on user theme. Light-mode users saw a blank grid — white text on white cells, zero contrast. The game was invisible to anyone with light mode. Fix: lock the entire app to dark mode, override all Telegram theme variables, set color-scheme: dark. Pick one theme, commit to it.
Monetag and the First $0.001
This is the part that actually makes this a business, even at tiny scale. Monetag is a Telegram-native ad network. Setup was almost embarrassing how easy it was:
Sign up at monetag.com as a Publisher. Select "Telegram Mini App" as platform. Enter the bot username. Get an SDK script and zone ID. Paste it into index.html. Done. No business registration. No tax paperwork. Minimum withdrawal is $5.
The placement philosophy I settled on: ads at natural pause points, never during gameplay. Three free plays per day, then watch an ad for each additional play. Game over? Watch an ad to retry. Daily challenge complete? Ad before showing results.
The critical implementation rule: every ad call must resolve, never reject. If the ad fails for any reason, the game continues. Users shouldn't even notice an ad failed — they just get to the next screen.
Deploy complete. Bot live at @SpeedTapGameBot. First test run: I played the game myself. Tapped 1 to 50, hit the daily challenge, triggered the "watch ad" flow. Monetag dashboard showed 5 impressions. Revenue: $0.001. CPM: $0.20.
That CPM is meaningless — Monetag's algorithm needs thousands of impressions before it optimizes. But the number that mattered was the first one: $0.001. Infrastructure cost zero. Revenue is positive. The math works from impression one.
The Numbers
Day 1, after launching to nobody:
Users: 1 (me).
Monetag impressions: 5.
Revenue: $0.001.
CPM: $0.20 (too small a sample to mean anything).
Server cost: $0 (Oracle Cloud free tier).
Total cost: $0.
Every infrastructure line item is free. Oracle Cloud ARM VPS: free. Cloudflare DNS and SSL: free. Domain: already owned. Telegram bot: free. Monetag publisher account: free. The only variable cost is my time, and Claude Code handled the code generation. That's the entire economic setup.
What's Next
SpeedTap was live. Monetag was paying. I submitted the app to the Telegram Apps Center (tapps.center) — the platform's official app directory, 178K monthly users browsing for new apps.
It got rejected. The feedback: "Enhance design, add distinctive features, improve social mechanics, consider crypto/Stars payments."
That rejection turned into the best product spec I've ever received. Next episode: four difficulty modes, 1v1 challenges, Telegram Stars payments, and the iOS bug that nearly derailed the whole multiplayer feature.
← Previous: Episode 1: I Built a Mini App on Korea's Biggest Fintech in One Day Next: Episode 3: From MVP to Multiplayer →
More updates on the way. If you're working on something similar or found a smarter way to do it, drop it in the comments — the more we share, the faster we all move.
Disclaimer: This blog documents my personal learning journey. Nothing here is financial advice.
Comments
Post a Comment