Browser co-op kitchen game: FastAPI + native WebSockets, server-authoritative 20 Hz simulation, in-memory anonymous lobbies, data-driven YAML levels, Canvas 2D vanilla ES-module client with locally authored SVG art and no external CDNs. .agents/PLAN.md records the LOCKED decisions; .agents/user_stories/ holds the 12 flow contracts; .agents/phases/todo/ breaks them into 14 sequential, test-gated phases (71 task files), each leaving the app launchable and the suite green. LLM-Generated: true
1.2 KiB
1.2 KiB
US-01 — Create an anonymous lobby
As a player who just opened the site, I want to press one button and get a room code, so that I can start a game with friends without creating an account.
Acceptance criteria
- The landing screen shows exactly one primary action: Create lobby.
- Creating a lobby issues a 5-character code from the Crockford base32 alphabet
(no
I,L,O,U), uppercase, shown large and with a copy button. - No account, email, password, cookie consent, or third-party request is involved.
- The browser stores only a random session token (
sessionStorage) and the room code. - The creator is marked
hostand holds a seat; the room is inLOBBY. - Reload of the same tab with the same token returns the player to the same seat.
- If the server is at
max_rooms, the UI shows a clear "lobby full, try again" error instead of a broken screen. - An idle, empty lobby is garbage-collected.
E2E suite
tests/e2e/test_us01_create_lobby.py — load /, create lobby, assert code shape,
reload → same seat, assert zero non-origin network requests.
Phases
01_runnable_service_scaffold, 05_anonymous_lobbies_and_room_lifecycle,
07_canvas_client_and_hud