Files
HIPCTF2/docs/guides/scoreboard-stream.md
T
2026-07-21 18:34:42 +00:00

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.
guide
scoreboard
sse
stream
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

  1. The challenge solve path (admin validation, player submit) updates the solve table.
  2. The same code path calls SseHubService.publish('scoreboard', payload) (backend/src/common/services/sse-hub.service.ts).
  3. Every subscriber to /api/v1/scoreboard/stream receives 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).

See also