Vibe Coding Snake
A full-stack agentic take on a classic game
- Role
- Full-stack engineering
- Timeline
- Personal project
Zero-latency 60 FPS game loop in React 19
FastAPI + PostgreSQL backend with JWT auth
CI/CD via GitHub Actions and Docker Compose with automated tests
The problem
A snake game is trivial. Building it the way a real product is built, with authentication, a database, automated tests, and a deployment pipeline, is the actual exercise. The goal was to practise full-stack discipline end to end on a project small enough to finish but real enough to be honest.
Constraints
- The game loop has to stay at a smooth 60 FPS
- Treat it like production: auth, persistence, tests, CI
- Keep it reproducible, clone, compose up, run
The approach
A real backend behind a toy
FastAPI serves a JWT-authenticated API over PostgreSQL for accounts and scores, so the game has genuine state and identity instead of localStorage.
A frontend that never drops a frame
The React 19 client runs a tight, zero-latency render loop tuned to hold 60 FPS, with game state cleanly separated from UI.
Ship it like you mean it
GitHub Actions runs automated tests on every push and Docker Compose makes the whole stack reproducible from a single command.
Results
- A small project that exercises the full production loop, not just the fun part.
- A reproducible stack anyone can clone and run with one command.
- A reference I reuse for wiring auth, persistence, and CI quickly.
Tradeoffs
I spent more time on the pipeline and auth than the gameplay, which is the whole point: the discipline transfers, the snake doesn't. Multiplayer and real-time leaderboards were left as obvious next steps.