Project overview
Two strangers, one ~90-second head-to-head duel, no install and no account — a web platform where matchmaking, scoring, and every answer reveal run server-side at the edge, so the game stays fast and stays cheat-proof.
Stack at a glance
Why this stack
Realtime on Durable Objects, not a socket server
Each match is its own in-memory stateful object at the edge, so there is no global lock and the per-message ping never waits on a database — D1 is touched only at session boundaries.
full decision in the course →Anonymous-first accounts with Better Auth
Players still just type a nick, but identity lives in a server session from the first touch — so it survives a cache clear or a device switch, and signing in is offered only once there is a win worth saving.
full decision in the course →A pure-TypeScript engine with zero Cloudflare imports
The same game logic runs in a Worker, a browser, and a Node test unchanged — which is what makes the documented ~one-week migration off Cloudflare credible, and what lets the server replay runs to catch cheaters.
full decision in the course →The server replays every run; the client score is never trusted
The deterministic engine re-runs the exact rounds from the same seed and scores from scratch, so a client's tally is only a claim to verify — topping the leaderboard still means actually playing a correct game.
full decision in the course →One GameModule contract every game implements
The platform never imports a specific game, so when multi-choice arrived months later it slotted in as a single new case with the three existing categories untouched.
full decision in the course →What it gives you
The numbers
DataLOC, build time, sessions, language split, commit history, and the full file-by-file breakdown.
Why it's built this way
CourseA cinematic „why” course — the architectural decisions, the traps they avoid, and the roads not taken.