How romannjoroge/little-cab-dummy-server works
Little Cab Dummy Server is an in-memory FastAPI mock for testing the Odoo carrier integration. Odoo obtains a token, requests estimates, books a ride, and polls trip details; booking starts an optional timed status simulation, while cancellation and status changes can POST callbacks to Odoo. The main routes coordinate these operations; trip data and deterministic estimates live in the store. The README documents the endpoint set and debug advancement. The sampled source shows route-to-module calls and webhook delivery; unsampled components are not inferred.
Main entry points: main.py API routes · simulator.py Status simulation · webhooks.py Webhook sender · config.py Runtime config
Components 11
API and trips
- API routes
app/main.py - Token and auth
app/main.py - Ride estimates
app/store.py - Ride booking
app/main.py - Trip details
app/main.py
Trip lifecycle
- In-memory trips
app/store.py - Status simulation
app/simulator.py
Settings and callbacks
- Webhook sender
app/webhooks.py - Runtime config
app/config.py
Other components
- Odoo carrier
- Odoo webhook
Connections 12
- Odoo carrier → API routes: calls endpoints
README.md - API routes → Token and auth: validates credentials
app/main.py - API routes → Runtime config: reads settings
app/main.py - API routes → Ride estimates: gets estimates
app/main.py - API routes → In-memory trips: creates and reads
app/main.py - API routes → Status simulation: starts and stops
app/main.py - API routes → Webhook sender: sends callbacks
app/main.py - Status simulation → In-memory trips: advances trips
app/simulator.py - Status simulation → Webhook sender: sends updates
app/simulator.py - Status simulation → Runtime config: reads timing
app/simulator.py - Webhook sender → Runtime config: reads department
app/webhooks.py - Webhook sender → Odoo webhook: posts status
app/webhooks.py