Consolidates the stacked backend, privacy, network-intelligence, frontend, operations, mobile, and owner-cache changes after resolving main conflicts and passing the full CI suite.
Split the monolithic backend router into domain route modules for health, radio, node status, coverage, nodes, owner, telemetry, stats, pathing, and misc endpoints.
Introduce the first service layer extractions for stats and owner so route files are now thin wrappers around business logic instead of owning heavy query orchestration and cache policy directly.
Harden DB startup by separating schema/migration bootstrap from the normal request pool timeout path. Startup schema initialization and migrations now run through a dedicated no-timeout startup pool, while runtime query timeouts remain in place.
This refactor also replaces the old monolithic startup schema asset flow with base schema + migration support, adds DB/config asset resolution cleanup, and substantially reduces backend/src/api/routes.ts from its previous multi-thousand-line state to a smaller registration/helper module.
Current roadmap status:
- route decomposition is effectively complete enough to stop splitting route files further
- stats service extraction is complete
- owner service extraction is complete
- next planned slice is pathing service extraction, followed by repository extraction under stats, owner, and pathing
Splits the monolithic app container into:
- backend: Node.js handling MQTT, WebSocket, API, DB (no static files)
- app: Nginx serving the React SPA, proxying /api and /ws to backend
This means future dashboards (app.ukmesh.com etc.) can be added as
additional Nginx containers pointing at the same backend with no
duplicate calculations or DB connections.
Also updates nginx.website.conf to proxy to backend instead of app,
and bumps website host port from 3001 to 3002 to avoid conflict.
NOTE: Cloudflare Zero Trust tunnel route for app.teessidemesh.com
must be updated from http://app:3000 to http://app:80.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>