Start here

System overview

Written for
Fleet managers who want the big picture, and engineers before they read the API or developer pages.

There are three parts to it: the sensor unit in the vehicle, the MantAI cloud API, and the dashboard (or your own tools, through the API). Data only ever flows upward, and if the next hop happens to be down, each layer holds onto what it has until it’s back.

Architecture#

IN THE VEHICLESENSOR UNITIMU 100 HZ · MIC 16 KHZGNSS · SD ARCHIVEOWN POWER · LTELTE · TLSMANTAI CLOUDEDGE APIingest · auth · REST /v1RIDES DBevents · tracksAUDIO STOREclips · 30 daysLIVE ROOMS120 s bufferACOUSTIC AIfindings · riskWEBSOCKETREST /V1FLEET DASHBOARDlive map · alertsYOUR SYSTEMSTMS · BI · maintenance
Fig. 01From vehicle to dashboard: data moves in one direction, with no phone or gateway in between.

The three layers#

LayerTechnologyRole
Sensor unitESP32-S3 firmware (C++/Arduino core)Samples motion at 100 Hz, records audio clips, spots driving events on the unit, and uplinks over LTE. When it loses coverage, it buffers to its SD card.
Cloud APICloudflare Workers (Hono), D1, R2, Durable Objects[6]Takes in telemetry, events, and clips, runs the AI acoustic analysis, works out ride stats and driver scores, pushes live data out over WebSockets, and serves the REST API.
DashboardReact 18 + Vite single-page appFleet overview, live map, ride detail, sound diagnoses, driving patterns, driver profiles, and the AI chatbox. It is served from the same edge deployment as the API.

The dashboard and API live at mantai-api.mantai-backend.workers.dev. API routes live under /v1/*, and every other path serves the dashboard application.

Life of a ride#

01WAKEMOTION STARTS RIDE02TELEMETRY1 HZ TRACK03EVENTSDETECTED AT 100 HZ04AUDIOCLIP EVERY 5 MIN05ANALYSISAI FINDINGS06FINALIZESTATS + SCORE
Fig. 02Every ride runs through the same six-step lifecycle, no matter what the coverage looks like along the way.
  1. Ride starts. Motion wakes the unit, and it creates a ride record with a globally unique ID. The ID is minted right on the unit, so rides stay safe even through coverage gaps.
  2. Telemetry streams. Position, speed, and three-axis acceleration are sampled and uplinked to the ride’s track in 1 Hz batches.
  3. Events fire. Harsh braking, acceleration, cornering, and impacts are caught on the unit from the 100 Hz motion stream, each reported with its location, speed, and peak g-force.
  4. Audio is captured. Every 5 minutes (you can change this) the unit records a short clip, saves it to the SD card, and uploads it for analysis.
  5. AI analyzes. Each clip is analyzed asynchronously once it arrives, and the findings, risk level, and recommendations get attached right back to it.
  6. Ride finalizes. We compute duration, distance, max and average speed, and event counts, tie the ride to a driver and vehicle, and update the driver’s score.

Designed for the real world

Coverage gaps, ignition cycles, and long idle stretches are just normal operating conditions here, not edge cases to worry about. The unit buffers locally and catches up the moment connectivity returns, and because ride records are created idempotently, a retry never ends up duplicating your data.

References#

  1. Cloudflare, "Workers Documentation," 2026. [Online]. Available: https://developers.cloudflare.com/workers/