AI Fleet: Service Priority Dashboard
Which vehicle should the maintenance team inspect next, and what fault put it there? I built the Service Priority Dashboard for a customer fleet proof of concept. I owned the data pipeline, backend and React dashboard that let a reviewer go from a service center’s workload to the diagnostic history of one vehicle.
- Problem
- A fleet-wide fault count told a service center little about which vehicle to inspect first. A continuing fault could appear in several observations, while a warning lamp could make the same vehicle worth reviewing for a second reason.
- Decision
- I wrote the API specification and built a maintenance queue around the vehicle. We combined fault intervals, the latest lamp observation in the selected period and the customer’s keeper-fault list. Searching for one asset preserved the service center’s totals.
- Result
- Reviewers could trace a vehicle’s priority to its faults for the same dates, see the reported occurrence count and check the latest import interval covered by the dashboard.
- Context
- Sonatus - AI Fleet
- Period
- 2025–2026
- My focus & role
- Owned engineering for the fleet proof of concept. Built the maintenance dashboard, specified its API, and paired with a data and backend engineer on the fleet data pipeline.
- Technology
- Apache Airflow · Python · Trino · Apache Iceberg · Parquet · Amazon S3 · AWS Glue · PostgreSQL · Terraform · FastAPI · React · TypeScript
Vehicle service priorities
Concept interface - synthetic data · seven daysOne vehicle can qualify for several maintenance categories. Select a category to see which trucks qualify.
Review 8 vehicles
| Vehicle | Reasons for review | Region | Keeper faults | Details |
|---|---|---|---|---|
ASSET-201 | Critical attention needed, Lights on, Keeper faults 20+ | north | 32 | |
ASSET-205 | Critical attention needed, Lights on, Keeper faults 20+ | south | 31 | |
ASSET-203 | Keeper faults 20+ | south | 25 |
8 matching vehicles · page 1 of 3
Customer problem and ownership
Designing the maintenance review with the customer
Maintenance leaders and shop managers consulted several systems and spoke with drivers to decide which vehicles to bring in. The customer wanted to identify maintenance needs before a roadside breakdown. Their team already maintained a list of diagnostic codes worth investigating, known as keeper faults. I built the queue around that list so a reviewer could inspect the evidence behind a vehicle’s priority.
I worked directly with the customer, CEO and CTO at each stage of the proof of concept. I shaped the workflow with Product, reviewed mockups with UX and built the dashboard. With the backend team I agreed the fields that would connect a queue entry to its fault records. I owned the pipeline and paired with another data and backend engineer who helped with Airflow, Apache Iceberg and Trino.
Data sources and infrastructure
Query vehicle inventory and diagnostic history together
Samsara supplied timestamped vehicle diagnostics. Each vehicle could have several observations in an import interval. An observation contained warning-lamp readings and a list of J1939 diagnostic trouble codes, which could be empty. Each code identified the reporting module, the suspect parameter number (SPN) and the failure mode identifier (FMI). The vehicle supplied an occurrence counter for the code. Some observations also carried an odometer reading.
In the pipeline I built, Airflow scheduled Python jobs over bounded time intervals. The fault import followed the provider’s pagination cursor to collect the history for each interval. A separate job refreshed the vehicle directory in PostgreSQL. This let us update a vehicle’s make or service-center assignment independently of its fault history.
How fault history and the vehicle directory meet in the service queue
Architecture diagram- Samsara · diagnostic historyAn Airflow job uses Trino to merge fault records, explicitly empty fault lists and lamp observations.Iceberg · S3 and AWS GlueS3 stores the table data. The Glue catalog lets Trino locate the Iceberg tables.
- Samsara · vehicle inventoryA separate Airflow job imports vehicle identity, make and service-center membership.PostgreSQL · vehicle recordsThe directory supplies vehicles even when the selected period has no matching fault records.
We stored the diagnostic history in Apache Iceberg tables backed by Parquet files on Amazon S3. Each table was partitioned by customer and day. For faults, that was the day the fault was first seen. Lamp readings and empty reports used the day of the observation. AWS Glue held the catalog. Terraform defined the storage, catalog database and access roles.
For a dashboard request, FastAPI sent a query to Trino. Its coordinator planned work for the workers across two catalogs. That let the queue use PostgreSQL’s vehicle directory and maintenance rules alongside the longer Iceberg fault history without copying the directory into each diagnostic batch. The API read import progress directly from PostgreSQL. Vehicle detail also looked up location separately, with its own observation time.
Keeping the history practical to query
Incremental imports can leave many small files for a regional query to open. A separate Airflow job compacted the data files and reorganized Iceberg’s manifests, the indexes of those files. It also expired old snapshots and removed orphan files. Expiry bounds how far back an operator can revisit an earlier table version. The underlying fault history has its own dates and remains available in the current table.
Fault history and vehicle priority
When repeated reports describe the same fault
An earlier email-report workflow removed duplicate rows by asset and fault description, then sorted the list by the vehicle’s home service center. That made a short list for a manager to read. Using the same rule to store history would merge two faults with the same description even when different modules reported them or an occurrence counter changed.
The fault import grouped observations by vehicle, reporting module, diagnostic code and occurrence counter. Matching reports extended the first- and last-seen times of one record. A different counter produced a different record. We also retained explicitly empty fault lists. The first empty report for that vehicle at or after a fault’s last observation gave us an upper bound on when it cleared. A gap in the source data left the end unconfirmed.
Which observations belong to a vehicle’s review day?
Synthetic query exampleOne invented vehicle, two one-day queries. Choose a day to see which fault records and lamp reading the vehicle row uses.
| Record | Stored observations | Selected day |
|---|---|---|
| Fault A | 5 May 21:30 to 6 May 07:20 | Overlaps |
| Fault B | 6 May 16:30 to 7 May 05:40 | Overlaps |
| Warning lamp | 6 May 08:40 · Off6 May 15:20 · On7 May 08:10 · Off | On at 15:20 |
Deciding which vehicle to inspect
In an early review, finding a critical fault meant opening each vehicle, searching its alert text and checking whether the reported count met the maintenance rule. The customer asked to bring that decision into the queue. The revised dashboard surfaced vehicles needing immediate attention and those meeting other critical-fault conditions in separate tiles. The shop manager could pick a vehicle first, then open its drawer to inspect the supporting readings.
For the dates under review, the API selected overlapping fault intervals within a bounded lookback and the latest lamp observation in that period. A fault that began before that lookback could be omitted even if it was still open. The API grouped faults by vehicle and counted matches against the keeper list. An asset could qualify for both a critical-fault tile and a warning-lamp tile, so adding the tile counts would overstate the number of distinct vehicles.
Follow a vehicle’s diagnostic history
Synthetic telemetrySelect a time to inspect the fault records available at that point.
07:40 · The vehicle reported the coolant signal fault with occurrence counter 4.
- Last received
- 07:40
- Warning lamp at last reading
- On
- Fault records
- 1
| Occurrence counter | First seen | Last seen | Observed inactive |
|---|---|---|---|
| 4 | 07:40 | 07:40 | Unknown |
In the drawer I built, the reviewer could inspect a fault’s description, observed duration and vehicle-reported occurrence count. Duration ran from first observation to the recorded inactive time, or to the last sighting if the fault was still open. The keeper count in the queue counted qualifying records. The occurrence counter in the drawer belonged to one diagnostic code.
The customer’s reference sheets captured two kinds of maintenance guidance. In the drawer, the API looked up the service category by reporting module, SPN and FMI together. It looked up alert text by SPN alone. Two failure modes for the same parameter could therefore share an alert and have different service categories. A fault without a category match still appeared as informational.
One detail I would change is how the drawer represented a missing warning-lamp reading. Its API adapter mapped an absent or unrecognized lamp status to “Off”. I would preserve an “Unknown” state so reviewers could tell whether the vehicle had actually reported that its lamp was off.
Summary and filter scope
Keep the regional workload in view
I initially kept summary totals fixed. In customer review, selecting a different region or time period made those totals confusing. In Service Priority, the table reused one API response for the rows and the summary tiles when the reviewer filtered by dates, region or service center. A vehicle search, make or fault-category selection triggered two parallel calls to the same endpoint. One returned the matching vehicles. The other supplied totals for the original geography and dates.
Which count changes when a reviewer selects “Lights on”?
Service Priority · synthetic exampleWith only region and dates selected, the table uses the rows and totals from one response. Selecting “Lights on” triggers two parallel requests to the same endpoint.
The summary request retains region, service center and time. Each vehicle counts once in the overview and can qualify for several service categories.
The list request also includes “Lights on”. Only matching vehicles appear, in the order returned by the API.
The reviewer opens a row to read its individual faults. The details request carries the vehicle and the selected time range.
Separate requests made the filter rules explicit. They could also read different versions of the data if an import finished between them. If a future release needed exact reconciliation, I would tie both results to the same import version.
Project artifacts
Implementation screenshots
The February captures show the two decisions in sequence. First the reviewer selects a vehicle from the queue. Then they search the selected vehicle’s faults by category, description or alert.
Service Priority maintenance queue
Adapted implementation screenshot
Service Priority fault drawer
Adapted implementation screenshot
Delivery and verification
Keeping a reviewer’s place in the queue
I demonstrated the dashboard to the customer and deployed revisions during the proof of concept.
Customer review decisions
Reconstructed decision record- Which vehicle comes first?
- The service API defaulted to total fault count. The customer wanted the queue to open on keeper faults, so I made the client explicitly request keeper count in descending order and kept both counts visible.
- What does the update time mean?
- I exposed the end of the last imported fault interval in the API and dashboard. That timestamp can advance even when an interval yields no new faults.
- Where was this vehicle last seen?
- Reviewers asked for location in the vehicle drawer. The delivered view showed the available location with its observation time, independently of the selected fault dates.
What it would take to test a breakdown forecast
The technical design proposed using service history to predict breakdowns. The dashboard we delivered prioritized observed faults using maintenance rules. A walkthrough of the customer’s work-order system showed how an outside vendor’s invoice could arrive in an overnight import and create a work order after the roadside repair. An empty diagnostic report could bound the time a fault cleared. The work order recorded a separate maintenance action.
To evaluate a forecast, I would link confirmed breakdowns to the affected vehicles, distinguish the incident time from the time the repair record arrived, and test against diagnostics available before each incident. That would give the team a way to measure whether a warning came early enough to act on.
The AI Fleet Driver Safety Dashboard covers the separate workflow for ranking drivers and inspecting the lane departures within an event.