SAPIENT Web Dashboard¶
The sapient-web service hosts a browser dashboard for SAPIENT track data.
It serves static UI assets and a small runtime config endpoint, while reading
live track/sensor state from the SAPIENT Data Fusion Node
REST API. See that page for the full REST endpoint list and how to browse its
self-describing OpenAPI/Swagger docs at /docs and /openapi.json.
Overview¶
sapient-web provides:
- Real-time track and sensor tables
- Canvas-based track map with overlays
- Per-track details (classifications, confidence, heading, range/bearing)
- Map controls (background on/off, range overlays, fullscreen)
- Configurable map tile source and attribution
The service does not persist data. It only presents current state from
sapient-data-fusion-node.
Runtime Topology¶
graph LR
Sensor[SAPIENT Sensor Sources] --> Fusion[sapient-data-fusion-node]
Fusion -->|REST :8095| Web[sapient-web]
User[Browser Client] -->|HTTP :8096| Web
Configuration¶
sapient-web loads settings from:
/etc/gva/sapient-web/settings.json- fallback defaults compiled into the binary
Example:
{
"server": {
"host": "0.0.0.0",
"port": 8096
},
"dashboard": {
"sapientApiBaseUrl": "http://127.0.0.1:8095",
"refreshIntervalMs": 2000,
"mapTileUrlTemplate": "https://a.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",
"mapAttribution": "Map tiles © CARTO © OpenStreetMap contributors"
}
}
Systemd env defaults are provided in:
src/qt6/sapient-web/debian/sapient-web.default
Command-Line Options¶
main.cpp supports:
-H, --host <host>: bind host-p, --port <port>: bind port--api-base <url>: SAPIENT fusion REST base URL--refresh-ms <ms>: dashboard poll interval
CLI options override file-based settings.
HTTP Endpoints¶
The service exposes:
GET /-> dashboard (index.html)GET /app.js,/styles.css, and other static assetsGET /api/config-> runtime config consumed by the frontend
/api/config shape:
{
"sapientApiBaseUrl": "http://127.0.0.1:8095",
"refreshIntervalMs": 2000,
"mapTileUrlTemplate": "https://a.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",
"mapAttribution": "Map tiles © CARTO © OpenStreetMap contributors"
}
Run Locally¶
From build/:
Then open:
http://127.0.0.1:8096
Notes¶
- The dashboard requires
sapient-data-fusion-nodeto be running and reachable. - If map imagery is unavailable, map overlays still render on the dark canvas.
- CORS is enabled for responses (
Access-Control-Allow-Origin: *).