1.2 KiB
1.2 KiB
type, title, description, tags, timestamp
| type | title | description | tags | timestamp | ||||
|---|---|---|---|---|---|---|---|---|
| guide | Scoreboard Stream | How live solves are broadcast to the SPA over Server-Sent Events. |
|
2026-07-21T18:28:00Z |
Endpoint
GET /api/v1/scoreboard/stream (@Sse() handler in
backend/src/modules/system/system.controller.ts) opens an SSE stream
that pushes the public scoreboard projection every time a new solve is
recorded.
Push path
- The challenge solve path (admin validation, player submit) updates the
solvetable. - The same code path calls
SseHubService.publish('scoreboard', payload)(backend/src/common/services/sse-hub.service.ts). - Every subscriber to
/api/v1/scoreboard/streamreceives the payload.
The hub is in-process; multi-replica deployments need a shared pub/sub to fan out across pods (not in scope for this repo).
Frontend consumer
The authenticated SPA shell subscribes on mount and updates the scoreboard view whenever a new event arrives. The exact rendering lives inside the authenticated shell's scoreboard component (see Frontend Structure).