docs: add websocket push roadmap

This commit is contained in:
2026-06-19 01:24:30 -06:00
parent 4d5b28e63e
commit ef8921480a
2 changed files with 18 additions and 1 deletions
+17
View File
@@ -294,3 +294,20 @@ Transition strategy:
- Bench test LilyGO relay boot behavior before connecting it to the WUPP block.
The API should not require redesign when moving from 2 outputs to 6 outputs.
## Planned WebSocket Push Layer
The project may add a WebSocket push layer in addition to the current `/api/v1` REST API. This is intended as an additive transport, not a replacement for the REST API.
Recommended model:
```text
Dashboard ESP <-- WebSocket /ws live status -- Cargo ESP
Dashboard ESP -- REST /api/v1 relay commands -> Cargo ESP
Dashboard ESP -- REST /api/v1/status fallback -> Cargo ESP
```
The REST API remains the canonical, human-debuggable contract for snapshots, testing, and compatibility. WebSockets should be used for live status pushes so dashboard UI elements can update immediately after sensor changes, relay state changes, and future vehicle telemetry updates.
Initial implementation should preserve existing polling as a fallback path. If the WebSocket connection is unavailable or stale, the dashboard should continue to use `/api/v1/status`.