05 · Fleet operations
Mens Mercatus Fleet
A maintenance desk for South African vehicle fleets: rule-based repair approvals, fair-price checks in rand and fifteen Fleet Intelligence tools, with every outgoing message kept as a draft for a person to sign off.
Local demo · example data
Challenge
Fleet managers approve many small repairs from phone calls, WhatsApp photos and workshop quotes. The engineering problem was a desk that prices a quote fairly, applies the approval rules the same way every time, and never sends a message or pays a card without a person saying yes.
Role and scope
Built the server, the desk and the Mac app
- Built a FastAPI server in Python with a SQLite store, a rule engine for minor-repair approvals and a NumPy price regressor trained on 160 fictional invoices.
- Wrote the Vehicle Desk as one vanilla-JS page: calls and quotes, checks, fleet, supply and money, admin, Fleet Intelligence and a Godmode desk.
- Added fifteen Fleet Intelligence tools, from fault-to-repair pricing and warranty blocks to fuel slip checks, SA compliance, theft alerts and driver coaching.
- Kept a voice path for calls: Twilio Media Streams, Deepgram speech-to-text, a Claude, OpenAI or Ollama model and ElevenLabs speech, with mock providers so it runs without keys.
- Packaged it as a standalone macOS app for a Mac mini, and covered the server with 406 automated tests.
Architecture
01
Desk
Vehicle Desk with seven sections, plus a Godmode desk: tickers, command palette, offline Gauteng map with trip replay and a decision ledger.
02
Rules
Auto-approve up to R2,500 and within 8.5% of the fair price. Counter or manager band up to R15,000. Executive above that.
03
Server
FastAPI on 127.0.0.1 with SQLite and a NumPy price model. Calls stream through Twilio, Deepgram, an LLM and ElevenLabs, or mock providers.
04
Sign-off
WhatsApp, Teams and dealer messages are written as drafts. Card payments are mock-only. A person approves every outgoing action.
60–90 second demo
- Play the 60-second walkthrough on this page. It is a screen recording of the app running on the build machine.
- Watch Fault to Repair price a workshop quote against a fault code and pick an approval tier.
- See the Godmode map replay a trip on the offline Gauteng map, then the decision ledger.
- Every vehicle, workshop, price and person shown is example data, not a client fleet.
Flows to look at

Vehicle Desk
The Vehicle Desk front page: team notices, example KPIs and the seven sections. Every figure on this screen is example data.

Fault to Repair
A fault code and a R2,950 quote become a fair price, a counter-offer and a draft WhatsApp approval. Nothing is sent.
AI behavior
- AI-assisted: one model reply per call turn on the voice path, and a small price regressor for quotes.
- Agentic: kept narrow. The desk proposes approvals, counters and drafts; it does not act on its own.
- Human-controlled: a person approves every draft message and every mock card payment.
- Observability: decisions go to a hash-chained ledger, and a sandbox replays them with a changed rule config without touching stored decisions.
Security
- The server binds to 127.0.0.1 by default.
- Provider keys are optional and read from the environment; mock providers run without them.
- WhatsApp is a local test webhook and simulator. No message reaches a real number.
- No client data: the fleet, workshops, prices and people are fictional.
Monitoring
- The desk shows its state: test-mode banners, labelled example figures and limits marked “placeholder — owner to set”.
- 406 automated tests run with pytest; 2 are skipped.
Limits
- This is a local demo on example data, not a deployed fleet product. There is no public live app.
- The macOS app runs on one Mac mini and is not offered as a public download. The code is available in a walkthrough.
- isiZulu and Afrikaans strings still need a native-speaker review before real use.