Smart Logistics Management System — Real-Time Fleet & Shipment Platform
Key Performance Metrics
Improvement
Scale
Business Challenge
The logistics provider operated across Sumatra, Java, Kalimantan, and Sulawesi with complex multi-modal routes involving trucks, ferries, and last-mile motorcycle delivery. Shipment tracking was reactive — customers called to ask where their shipment was, and dispatchers called drivers to find out. Fleet utilization averaged only 62% due to poor route planning and empty return trips. Driver management was fragmented across WhatsApp groups with no systematic performance tracking. Warehouse operations used paper-based checklists with no real-time inventory visibility.
## Solution Architecture
Solution Architecture
We built a distributed logistics system with microservices for Shipment Management, Fleet Management, Warehouse Operations, Route Optimization, and Analytics. The core innovation is a real-time tracking engine using GPS data streamed from driver mobile devices via WebSocket to a Go backend, processed through Redis Streams for real-time event processing, and persisted to PostgreSQL. Shipment status changes are published as events to RabbitMQ, triggering notifications to customers, updating warehouse allocation, and feeding the analytics pipeline.
### Real-Time Architecture
Driver mobile app (React Native) streams GPS coordinates every 5 seconds to the tracking service (Go). The service validates coordinates against planned routes, calculates ETA using historical traffic data and current conditions, detects route deviations triggering alerts to dispatchers, and publishes shipment events (departed, arrived, delayed) to RabbitMQ. The event stream feeds multiple consumers: notification service (push notification to customers), analytics service (shipment performance metrics), billing service (automated billing events).
### Route Optimization Engine
A custom route optimization service built in Go uses a genetic algorithm to optimize delivery routes considering multiple constraints: vehicle capacity, driver hours, delivery time windows, traffic patterns, road conditions, and ferry schedules for inter-island routes. The optimizer processes 15,000+ shipments daily in under 2 minutes, achieving 23% improvement in fleet utilization.
## Key Features
Key Features
Shipment management with real-time GPS tracking, status updates, and proof of delivery with photo capture and digital signature. Fleet management with vehicle tracking, maintenance scheduling, fuel consumption monitoring, and driver performance analytics. Driver mobile app for shipment assignment, route navigation, delivery confirmation, and communication with dispatchers. Warehouse management with barcode-based receiving, put-away, picking, packing, and shipping with real-time inventory synchronization. Route optimization with AI-powered multi-stop route planning. Analytics dashboard with fleet utilization, on-time delivery rate, cost per shipment, and warehouse throughput metrics.
## Technology Stack
Technology Stack
Go backend for performance-critical services (tracking, route optimization) utilizing goroutines for concurrent GPS stream processing. Next.js with React for the web dashboard and customer portal. PostgreSQL with PostGIS extension for geospatial queries — proximity searches, route containment, coverage area analysis. Redis Streams for real-time event processing with consumer groups for load balancing. RabbitMQ for asynchronous messaging between microservices. Docker containers orchestrated on Kubernetes with cluster autoscaling. AWS infrastructure with EKS, RDS, ElastiCache, and CloudFront CDN.
## Results
Results
Real-time shipment visibility reduced customer inquiry calls by 85%. Fleet utilization improved from 62% to 85% saving approximately Rp 12 billion annually in operational costs. On-time delivery rate increased from 71% to 94%. Driver productivity improved 40% through optimized routing and reduced idle time. Warehouse throughput increased 55% through barcode automation and real-time inventory management. Customer NPS improved from 28 to 72.
## Lessons Learned
Lessons Learned
Real-time GPS tracking at scale (1,500 devices × 5-second intervals) requires careful message batching and compression — raw GPS data would overwhelm the backend. The route optimization service must be designed as an eventually-consistent worker — optimizing 15,000 shipments should not block the ability to create new shipments. Mobile-first design for the driver app was non-negotiable: 80% of driver interactions happen on 4G connections in areas with intermittent coverage, requiring an offline-first architecture with local SQLite and background sync.
Technologies Used
Related Projects
Ready to build your enterprise solution?
Discuss your software engineering needs with the HattaDev engineering team.
Free consultation. No commitment.