Skip to content

Scribble lab#149

Open
shivangi-jain20 wants to merge 6 commits into
everest-engineering:mainfrom
shivangi-jain20:scribble-lab
Open

Scribble lab#149
shivangi-jain20 wants to merge 6 commits into
everest-engineering:mainfrom
shivangi-jain20:scribble-lab

Conversation

@shivangi-jain20

@shivangi-jain20 shivangi-jain20 commented Jul 2, 2026

Copy link
Copy Markdown

This pull request introduces the foundational engineering constitution for the Scribble multiplayer game and implements the core backend logic for room management, game state transitions, drawing, and guessing. It enforces strict validation, robust error handling, and test coverage for all critical game flows. The most important changes are summarized below.


Project Governance and Standards

  • Added .specify/memory/constitution.md to define long-term engineering principles, enforcing TypeScript typing, immutability, React patterns, strict validation, modularity, and security constraints for all future development.

Backend API Enhancements

  • Expanded backend/src/api/rooms.ts to support all essential game actions: starting games, submitting guesses, updating/clearing drawings, and restarting rounds, with all routes protected by strict Zod schema validation. Improved error messages for missing rooms. [1] [2] [3]

  • Introduced comprehensive Zod schemas in backend/src/api/schemas.ts for all API payloads, including validation for player names, room codes, guesses, drawing data, and participant actions.


Game Logic and Data Model

  • Extended the Room and RoomSnapshot models in backend/src/models/game.ts to include game status (lobby, active, results), host and drawer tracking, secret word, guesses, scores, drawing data, and correct guessers, enabling full round lifecycle and state isolation.

Testing and Validation

  • Added and expanded tests in backend/src/api/schemas.test.ts and backend/src/services/roomStore.test.ts to verify schema validation, deterministic word selection, state transitions, role enforcement, guess correctness, drawing permissions, and round restarts. [1] [2] [3] [4]

Code Quality and Error Handling

  • Enforced input trimming and non-empty validation for player names and guesses throughout creation, joining, and submission flows. Improved error handling for invalid actions (e.g., drawer guessing, unauthorized restarts, invalid state transitions). [1] [2]

Contributor
Email: shivangi.jain@everest.engineering
Role: Developer

These changes lay the groundwork for a robust, secure, and maintainable multiplayer drawing game backend, with clear standards for future development and comprehensive test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant