Platform

Data model

Written for
Integration and backend engineers.

The platform stores a small, clearly defined set of entities. Everything hangs off an organization: its vehicles and drivers, and the rides they produce. Once you know these eight, the API reads naturally.

Entities#

EntityKey fieldsNotes
organizationname, company_type (rental | fleet | logistics | other), fleet_size, primary_goalsThe tenant. Users join through memberships, as either a member or an admin.
user / sessionemail, session tokens (30-day TTL), magic linksPasswordless, and a single user can belong to several organizations.
vehiclemake, model, year, plate, owner (user or org)Whatever a sensor unit gets assigned to.
drivername, email, phone, license_no, notesThe profile that rides are attributed to. It carries the personal driving score.
ridestarted_at, ended_at, status (active | finalized), distance, max/avg speed, polyline, event counters (n_brake, n_accel, n_corner, n_impact, n_speeding), driver_id, vehicle_idA single ride. It is created with a unit-minted UUID, so starting a ride offline is safe.
eventtype (harsh_brake | harsh_accel | harsh_corner | impact | speeding), t_utc_ms, lat/lon, speed, peak_mg, duration_msA single detected maneuver or speeding episode, geo-tagged and pinned to its ride. Each type feeds the matching counter on the ride.
ride trackcolumnar arrays: t[], lat[], lon[], speed_mps[], a_long_mg[], a_lat_mg[], a_vert_mg[]The 1 Hz telemetry stream, appended in batches as the ride goes on.
clipr2_key, status (pending | uploaded), analysis_status (none | queued | done | failed | skipped), analysis_json, analyzed_atA single audio recording plus its AI diagnosis. The raw audio is kept for 30 days.

Storage & retention#

  • Structured data (rides, events, tracks, diagnoses, profiles) lives in an edge-replicated SQL database and is kept for the life of your account.
  • Audio clips live in object storage under human-readable keys (owner/vehicle/timestamp_clip.wav). A nightly sweep deletes them 30 days after upload. The structured findings pulled out of them are kept.
  • On-device archive: the unit’s SD card holds its own copy of rides, events, and clips, acting as the vehicle’s black-box record.
Track data is stored and served as columnar arrays instead of one row per second. A full hour-long ride’s telemetry comes back as a single compact JSON document that’s cheap to fetch and easy to chart.