This case study describes a real engagement. Client identity, proprietary details, and specific metrics are anonymized or approximated under NDA.
Real-Time Fleet Monitoring and Route Optimization
No real-time visibility into a fleet of 400+ vehicles. Dispatch planning done manually from driver phone calls. 22% empty miles on return legs due to lack of demand visibility at the time of dispatch. No systematic tracking of delivery completion or vehicle utilization.
GPS ingestion pipeline, real-time fleet monitoring dashboard, and ML-based route optimization with traffic-aware ETA computation. Dispatch team now works from a live operational view rather than voice coordination.
This engagement built the core operational technology layer for a logistics operation that had been running on manual coordination. The system ingests GPS telemetry from 400+ vehicles via AWS IoT Core, streams it into a real-time processing pipeline, and surfaces a live operational view to the dispatch team through a Next.js dashboard. Route optimization runs as a scheduled service prior to each dispatch cycle, using demand data from the order management system and real-time traffic conditions from an external API. PostGIS handles all geospatial computation: vehicle positions, delivery zone assignments, proximity matching, and route geometry storage. The system went from zero to production in 16 weeks with a three-person team.
The Challenge
GPS telemetry at scale is noisy. At 400 vehicles reporting every 30 seconds, the ingestion pipeline handles approximately 48,000 events per hour at peak, with a subset of devices sending duplicate, out-of-order, or malformed messages due to network connectivity issues in low-coverage areas. The processing pipeline needed to handle all of these without producing corrupt position history or false idle/movement state transitions. Route optimization for a fleet this size under real-world constraints (time windows, vehicle capacity, driver hour limits) is an NP-hard problem — exact solutions are not computationally viable at dispatch frequency. The optimization approach had to produce good solutions in bounded time rather than optimal solutions. Geofencing for 200+ delivery zones required spatial indexing to keep proximity checks under 10ms per vehicle event.
How We Built It
Telemetry ingestion and normalization (Weeks 1–4): GPS devices report to AWS IoT Core via MQTT. The ingestion pipeline validates each event (timestamp range, coordinate plausibility, device ID authentication), deduplicates using a Redis sliding window keyed by device ID and timestamp, and writes clean events to PostgreSQL with PostGIS geometry types. Out-of-order events are handled by a 30-second buffer per device that orders events before persistence. The pipeline is designed to handle 3x peak load without configuration changes.
Real-time dashboard (Weeks 5–8): The Next.js dashboard consumes vehicle positions via a server-sent events endpoint that streams position updates as they arrive from the ingestion pipeline. The map layer uses MapLibre GL with a PostGIS-backed tile server for delivery zone overlays. Dispatch operators see live vehicle positions, current status (in-transit, idle, at-delivery, offline), and delivery progress against the day's route. Alert rules fire when vehicles are idle beyond configured thresholds, deviate from assigned routes, or enter/exit geofenced zones. Grafana runs alongside the operational dashboard for fleet-level metrics (utilization rates, on-time delivery percentage, GPS uptime by device cohort).
Route optimization engine (Weeks 9–13): The optimization engine solves a capacitated vehicle routing problem with time windows using a combination of Clarke-Wright savings algorithm for initial solution construction and a tabu search local improvement phase. The solver runs in Python with a 90-second time limit per dispatch cycle, producing solutions that consistently achieve within 8% of lower bound on test instances. Traffic-aware ETAs use the HERE Routing API for real-time travel time estimates on each route leg. Routes are stored in PostGIS for vehicle navigation export and post-trip analysis.
Driver mobile interface and integration (Weeks 14–16): Drivers receive their optimized route on a lightweight mobile web app (no native app required) that shows the day's deliveries in sequence with navigation handoff to Google Maps and a simple delivery completion flow. Completion events flow back to the operations dashboard in real time. The mobile interface was built to function on 2G connectivity, with offline-capable delivery confirmation that syncs when connectivity is restored.
What We Delivered
GPS telemetry uptime reached 96.5% across the fleet in the first month of operation, with outages concentrated in three specific device firmware versions that were identified through the ingestion pipeline's error rate monitoring and subsequently updated. The dispatch team transitioned from voice-based coordination to the dashboard-first operating model within the first two weeks, with phone coordination reserved for exception handling.
Fuel cost reduction of 18% was measured in the 8 weeks following deployment of the route optimization engine, compared to the equivalent period from the prior year. The reduction is attributed to two factors: a 14% reduction in empty miles (return legs are now partially filled through demand matching that the optimization engine performs at schedule time) and more efficient route sequencing that reduces total distance per vehicle per day.
Average delivery completion rate improved from 84% on-time to 91% on-time in the post-deployment measurement period, attributed to route sequencing that accounts for time windows rather than the previous distance-minimizing manual routing. Late delivery incidents requiring customer communication dropped by 34%, reducing the operations team's exception handling workload.
Ready to build something like this?
Tell us what you are building. We will scope it, price it honestly, and give you a clear plan.
Start a ConversationFree 30-minute scoping call. No obligation.