PIXELPLAYGROUND
Six single-player games with a real edge backend: Hono on Cloudflare Workers, D1 (SQLite) with Drizzle ORM, JWT auth, and Zod-validated score submission. Every game works fully offline.
GAMES
6
BACKEND
EDGE_WORKERS
AUTH
GUEST_FIRST
BUNDLES
PER_GAME
ABOUT_THE_PROJECT
PixelPlayground looks like a cozy game site, but the engineering is underneath. There is no login wall: a guest account is created silently on first visit, and upgrading to a real account later keeps every score, stat, and streak.
Scoring is server-authoritative. The Worker validates each submission against per-game plausibility rules, computes streaks itself so they can't be faked, and keeps leaderboards as simple indexed queries.
SYSTEM_ENVIRONMENT_MATRIX
Key_Challenges
- [ ERR_01 ]bcrypt blew through the Workers CPU budget, so password hashing moved to PBKDF2 via the WebCrypto API.
- [ ERR_02 ]One route shipped all six game bundles at once; per-game code splitting cut each game to its own ~24-44 KB chunk.
- [ ERR_03 ]A shared store caused double score submissions; fixed by resetting it on unmount and submitting only on the game engine's verdict.
Key_Learnings
- [ LN_01 ]Best practice is contextual: edge constraints made bcrypt the wrong answer.
- [ LN_02 ]Competitive values like streaks belong on the server, never trusted from the client.
- [ LN_03 ]Fire-and-forget persistence keeps games playable even when the network isn't.
//SYSTEM_COMPILE_COMPLETE
Have questions about this framework implementation or structural logic?