Scribble assignment - Syamala#112
Open
Syamala053 wants to merge 5 commits into
Open
Conversation
- Add hostId to Room model and expose in RoomSnapshot - Fix API base URL typo (/bug -> /) - Add name validation: reject empty/whitespace names (Zod + frontend) - Add auto-polling to LobbyPage (~2s interval) - Show Start Game button only for host, disabled until >=2 players - Remove dead saveRoom code
- Add POST /rooms/:code/start endpoint (host-only, validation) - Implement room status transition lobby -> playing - Assign first participant as drawer (join order) - Deterministic word selection (index-based from sorted words) - Show secret word only to drawer in snapshot - Add startGame to API client and room store - Wire Start Game button in LobbyPage to call API, navigate on success - Update GamePage with role detection, word visibility, and polling
- Add POST /rooms/:code/guess endpoint with validation and scoring
- Add POST /rooms/:code/draw endpoint for canvas sync
- Implement interactive canvas (drawer) and read-only canvas (guessers)
- Wire GuessForm to API with empty-guess validation
- Disable GuessForm for drawer
- Populate Scoreboard dynamically from snapshot scores
- Add specs/003-gameplay-interaction/{spec.md,plan.md,tasks.md}
- POST /rooms/:code/restart endpoint (host-only, clears state, preserves participants)
- Restart button on roundEnd screen for host; Exit to Lobby for all
- Fill constitution.md with real project rules
- Add reflection.md
Specs: specs/004-result-restart/{spec.md,plan.md,tasks.md}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full implementation of a multiplayer Pictionary-style drawing game ("Scribble") with an Express + TypeScript backend and React 18 + Vite frontend. Sync uses HTTP polling (~2s), no WebSockets. All game state lives in-memory on the backend.
Architecture
Room Setup & Lobby
Game Start & Drawer Flow
Gameplay Interaction
Result, Restart & Final Validation
Key Design Decisions
Contributor