Skip to content

Add WebSocket Gateway for Real-Time Session Events #72

Description

@Mkalbani

Description

Introduce a WebSocket gateway so that clients receive real-time updates during an active puzzle session — hint reveals, score changes, time warnings, and completion events — without polling. This dramatically improves the game feel and sets the foundation for future real-time multiplayer or live leaderboard features.

Acceptance Criteria

  • A NestJS @WebSocketGateway is configured under src/gateway/
  • Clients authenticate the WebSocket connection using their JWT
  • A session:joined event is emitted when a player starts a session
  • A session:score_update event is emitted whenever score changes
  • A session:hint_revealed event is emitted when a hint is requested
  • A session:completed event is emitted with final score on puzzle solve
  • A session:time_warning event fires at configurable time thresholds
  • Clients are placed in a per-session room and only receive events for their own session
  • Unit tests cover connection auth, room assignment, and event emission

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions