Project overview
The operator ran last-mile delivery for retail and pharmaceutical clients with static routes planned the evening before. Same-day orders, traffic and failed deliveries made those plans obsolete within hours.
CodeQube delivered a dynamic optimisation engine, a driver mobile app and a dispatcher console with live tracking and re-routing.
Business problem
Where the client started.
Static routing meant vehicles ran under-utilised while same-day orders were refused or outsourced.
Dispatchers had no live view of the fleet and relied on phone calls to locate drivers.
Proof-of-delivery was paper-based, delaying invoicing and disputes.
Pharmaceutical clients required temperature and chain-of-custody evidence.
Proposed solution
What we proposed, and why.
A constraint-based optimisation service (OR-Tools) re-planning routes continuously as orders, traffic and vehicle states change.
A React Native driver app with offline navigation, digital proof-of-delivery and telematics ingestion.
A dispatcher console with live map, exception queue and one-click re-assignment.
A streaming telemetry pipeline feeding both real-time operations and historical analytics.
Architecture
How the system is put together.
Vehicle telemetry and order events stream through Kafka into a real-time state store. The optimisation service consumes state changes and emits revised route plans, which are pushed to drivers over WebSockets and displayed in the dispatcher console.
Technology stack
Backend, frontend, data and cloud.
Challenges faced
What got in the way, and how we dealt with it.
Challenge
Full re-optimisation of the fleet took minutes, too slow for reactive dispatch.
Resolution
Partitioned the problem by depot and time window, ran incremental local-search on affected routes only, and reserved full solves for scheduled intervals.
Implementation details
How delivery was sequenced.
- 1
Discovery & data foundation (months 1–2)
Ride-alongs with drivers and dispatchers, telemetry ingestion pipeline and baseline KPIs.
- 2
Optimisation engine (months 3–5)
Constraint model, incremental solver and simulation harness validated against three months of historical routes.
- 3
Driver & dispatcher apps (months 4–7)
Parallel delivery of the mobile app and console; pilot at one depot with 40 vehicles.
- 4
Fleet rollout (month 8)
Depot-by-depot rollout with training, on-call support and analytics dashboards.
Non-functional requirements
Security and scalability considerations.
Security
- Device attestation and per-driver credentials with remote wipe for lost devices.
- Signed proof-of-delivery records with tamper-evident hashing for dispute resolution.
- Customer tracking pages expose only time-boxed, tokenised links with no PII.
Scalability
- Depot-partitioned optimisation scales horizontally; adding depots adds solver workers.
- Telemetry pipeline sustained 12,000 events/second in load testing.
- Analytics offloaded to BigQuery so operational databases serve only live workloads.
Results & business impact
What it delivered.
Business impact
- Invoicing cycle shortened from 9 days to same-day through digital proof-of-delivery.
- Won two pharmaceutical contracts on the strength of cold-chain compliance reporting.
- Fuel consumption down 14% from tighter routing.
More case studies