Phase 2 of the edge + control-plane architecture. A per-team local stack can now mirror its state UP to a central instance so judges get a fleet view — outbound-only, so it works from behind the room NAT. Central ingest (same api/, central-mode): - POST /instances/register + /instances/:id/heartbeat (fleet-secret gated) + an `instances` table and GET /instances (admin) fleet read. - PUT /teams/:id and POST /submissions accept an optional `site` tag; `site` column added to teams + submissions (grouping/filtering). - WS snapshot now carries instances; instance:update broadcast added. Reporter sidecar (deploy/lan/reporter/, opt-in `federated` compose profile): subscribes to the local WS feed and replays team/submission writes up to central, namespaced by SITE_ID (ids never collide) and site-tagged. Registers + heartbeats; failed writes queue in an in-memory outbox and backfill on reconnect. Proven end-to-end (local→reporter→ central) before commit. Also fixes a latent bug: listSubmissions selected snake_case columns but mapped camelCase, so GET /submissions summaries were missing teamId/ teamName/submittedAt. Aliased the columns; added a regression assertion. Co-Authored-By: Claude Opus 4.8 <[email protected]>
37 lines
843 B
JSON
37 lines
843 B
JSON
{
|
|
"name": "apess-reporter",
|
|
"version": "1.0.0",
|
|
"lockfileVersion": 3,
|
|
"requires": true,
|
|
"packages": {
|
|
"": {
|
|
"name": "apess-reporter",
|
|
"version": "1.0.0",
|
|
"dependencies": {
|
|
"ws": "^8.18.0"
|
|
}
|
|
},
|
|
"node_modules/ws": {
|
|
"version": "8.21.1",
|
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz",
|
|
"integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==",
|
|
"license": "MIT",
|
|
"engines": {
|
|
"node": ">=10.0.0"
|
|
},
|
|
"peerDependencies": {
|
|
"bufferutil": "^4.0.1",
|
|
"utf-8-validate": ">=5.0.2"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"bufferutil": {
|
|
"optional": true
|
|
},
|
|
"utf-8-validate": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|