cat resource.md

Claude Generated Technical Specification

A technical specification generated by Claude as part of a workshop with work experience students.

Game Night Organiser — Technical Specification

Version: 1.0
Date: March 2026
Status: Draft


LayerTechnologyReasoning
FrontendReactComponent-based UI suits the multiple interactive views (scheduling, voting, leaderboard). Large community and easy to find help.
StylingTailwind CSSUtility-first CSS framework that makes mobile-friendly design fast to build
BackendNode.js + ExpressLightweight and beginner-friendly. Well suited to a simple REST API.
DatabasePostgreSQLReliable relational database — good fit for structured data like sessions, players, and votes
HostingRender or RailwayFree tiers available, simple deployment, good for MVPs
Unique linksUUID generationEach group gets a unique ID baked into their URL (e.g. /group/abc123)

2. System Architecture Overview

┌─────────────────────────────────────────┐
│              User's Browser             │
│           (React Frontend)              │
└───────────────────┬─────────────────────┘
                    │ HTTP Requests (REST API)

┌─────────────────────────────────────────┐
│         Node.js / Express Backend       │
│              (REST API)                 │
└───────────────────┬─────────────────────┘


┌─────────────────────────────────────────┐
│            PostgreSQL Database          │
└─────────────────────────────────────────┘

How it works:

  • The React frontend runs in the user’s browser and makes requests to the backend API
  • The Express backend handles all business logic (e.g. calculating best date, tallying votes)
  • PostgreSQL stores all persistent data — groups, players, sessions, votes, and scores
  • No authentication server is needed — group identity is handled via the unique URL

3. Data Models

These are the key entities (tables) in the database and the information stored against each one.

3.1 Group

Represents a single game night group, identified by a unique link.

FieldTypeDescription
idUUIDUnique identifier, used in the group URL
nameStringDisplay name of the group
created_atTimestampWhen the group was created

3.2 Player

Represents a named participant within a group.

FieldTypeDescription
idUUIDUnique identifier
group_idUUIDThe group this player belongs to
nameStringDisplay name entered on first visit
created_atTimestampWhen the player first joined

3.3 SchedulingRound

Represents one scheduling exercise — a set of proposed dates that members vote on.

FieldTypeDescription
idUUIDUnique identifier
group_idUUIDThe group this round belongs to
statusEnumopen, closed, confirmed
confirmed_dateDateThe final agreed date (once confirmed)
created_atTimestampWhen the round was opened

3.4 DateOption

A single candidate date within a scheduling round.

FieldTypeDescription
idUUIDUnique identifier
round_idUUIDThe scheduling round this belongs to
dateDateThe proposed date

3.5 Availability

Records whether a player is available for a given date option.

FieldTypeDescription
idUUIDUnique identifier
date_option_idUUIDThe date being responded to
player_idUUIDThe player submitting availability
availableBooleanWhether they can attend

3.6 GameNight

Represents a confirmed and completed game night session.

FieldTypeDescription
idUUIDUnique identifier
group_idUUIDThe group this session belongs to
dateDateWhen the session took place
game_nameStringName of the game played
duration_minutesIntegerHow long the session lasted
mvp_player_idUUIDPlayer awarded MVP
created_atTimestampWhen the record was created

3.7 GameResult

Stores the individual result for each player in a game night.

FieldTypeDescription
idUUIDUnique identifier
game_night_idUUIDThe session this result belongs to
player_idUUIDThe player
scoreIntegerPoints scored (if applicable)
wonBooleanWhether this player won

3.8 GameSuggestion & Vote

A game suggested for an upcoming night, and votes cast against it.

GameSuggestion

FieldTypeDescription
idUUIDUnique identifier
group_idUUIDThe group this belongs to
game_nameStringName of the suggested game
suggested_byUUIDPlayer who suggested it
statusEnumopen, confirmed

GameVote

FieldTypeDescription
idUUIDUnique identifier
suggestion_idUUIDThe suggestion being voted on
player_idUUIDThe player casting the vote

4. API Endpoints

These are the key routes the backend will expose to the frontend.

Groups

MethodEndpointDescription
POST/api/groupsCreate a new group, returns unique group ID
GET/api/groups/:groupIdGet group details and members

Players

MethodEndpointDescription
POST/api/groups/:groupId/playersRegister a new player name in the group

Scheduling

MethodEndpointDescription
POST/api/groups/:groupId/schedulingOpen a new scheduling round with date options
GET/api/groups/:groupId/scheduling/currentGet the current open scheduling round
POST/api/scheduling/:roundId/availabilitySubmit availability for a player
POST/api/scheduling/:roundId/confirmConfirm the best date and close the round

Game Voting

MethodEndpointDescription
GET/api/groups/:groupId/suggestionsGet all current game suggestions and vote counts
POST/api/groups/:groupId/suggestionsAdd a new game suggestion
POST/api/suggestions/:suggestionId/voteCast a vote for a suggestion
POST/api/suggestions/:suggestionId/confirmConfirm a suggestion as the chosen game

Game Nights & Results

MethodEndpointDescription
POST/api/groups/:groupId/gamenightsCreate a new completed game night record
GET/api/groups/:groupId/gamenightsGet all past game nights for a group
POST/api/gamenights/:nightId/resultsSubmit player results for a game night

Leaderboard

MethodEndpointDescription
GET/api/groups/:groupId/leaderboardGet all-time stats per player

5. MVP Scope & Suggested Build Order

Rather than building everything at once, here is the recommended order to get to a working product as quickly as possible. Each stage produces something usable.

Stage 1 — Foundation (Build first)

  • Set up the project structure (React frontend + Express backend)
  • Create the database and run migrations for all data models
  • Build group creation and the shared link system
  • Allow players to enter their name on first visit

✅ Milestone: A shareable group page where members can identify themselves


Stage 2 — Scheduling

  • Build the scheduling round creation flow
  • Allow members to submit their availability against proposed dates
  • Display availability responses and highlight the best date
  • Allow the host to confirm a date

✅ Milestone: The group can agree on a date for their next game night


Stage 3 — Game Voting

  • Allow any member to suggest a game
  • Display suggestions with live vote counts
  • Allow members to vote
  • Allow the host to confirm the chosen game

✅ Milestone: The group can decide what to play before the night


Stage 4 — Score Tracking

  • Build the results entry form (game, date, duration, scores, MVP)
  • Save results to the database
  • Display a history log of past game nights

✅ Milestone: The group has a permanent record of their sessions


Stage 5 — Leaderboard (Nice-to-have)

  • Aggregate results data per player (wins, points, MVP count)
  • Build and display the leaderboard page

✅ Milestone: Full product complete — all features live


End of Technical Specification v1.0