MQTT
REST
Vehicles publish telemetry over MQTT. pgmqtt inbound mappings write every message to PostgreSQL — no application code. PostgREST serves the tables as a REST API. Dispatch commands insert a row, and CDC publishes it back to the vehicle over MQTT.
Vehicles
Avg Speed (km/h)
Avg Fuel (%)
Events (5 min)
Total Readings

Fleet Map PostgREST → vehicle_status

Vehicle Status PostgREST → vehicle_status

Waiting for telemetry...

Fleet Trends Rolling averages from fleet_summary

Avg Speed (km/h)
Avg Fuel (%)

Telemetry Audit Log PostgREST → vehicle_telemetry

Time Vehicle Speed Fuel Engine
Waiting for data...

Dispatch Command POST → vehicle_commands → CDC

MQTT Stream WebSocket → fleet/#

Waiting for connection...

Safety Events PostgREST → vehicle_events

No events yet