2.4 KiB
2.4 KiB
type, title, description, tags, timestamp
| type | title | description | tags | timestamp | |||||
|---|---|---|---|---|---|---|---|---|---|
| api | System Endpoints | Bootstrap payload, event status, and SSE streams. |
|
2026-07-21T18:28:00Z |
Endpoints
| Method | Path | Auth | Source |
|---|---|---|---|
GET |
/api/v1/bootstrap |
Public | backend/src/modules/system/system.controller.ts |
GET |
/api/v1/event/status |
Public | Same. |
GET |
/api/v1/event/stream |
Public (SSE) | Same. |
GET |
/api/v1/scoreboard/stream |
Public (SSE) | Same. |
GET /api/v1/bootstrap
Built by SystemService.bootstrap(). Public payload consumed by the
SPA's BootstrapService:
{
"initialized": true,
"pageTitle": "HIPCTF",
"logo": "",
"welcomeMarkdown": "# Welcome\n\n...",
"theme": { "id": "classic", "tokens": { "...": "..." } },
"defaultChallengeIp": "127.0.0.1",
"registrationsEnabled": false
}
initializedistrueiff at least one admin user exists.themeis the resolvedTheme(one of the 10 canonical themes; see Theming).registrationsEnabledis read from thesettingtable (SETTINGS_KEYS.REGISTRATIONS_ENABLED) and gates the new public register endpoint (see Auth Endpoints).
GET /api/v1/event/status
Returns the current event window computed by EventStatusService:
{ "state": "Running", "countdownMs": 12345, "startUtc": "...", "endUtc": "..." }
state is Stopped when now < eventStartUtc (countdown), Running
between start and end, and Stopped once now >= eventEndUtc.
SSE streams
/api/v1/event/stream— emits the same payload asGET /api/v1/event/statuswheneverSseHubService.publishis invoked (typically via an admin cron tick)./api/v1/scoreboard/stream— emits the public scoreboard projection after each new solve.
Both use NestJS @Sse() and are proxied through SseHubService
(backend/src/common/services/sse-hub.service.ts).