Arinit
Skip to content
Arinit

Logistics

Real-Time Logistics Platform

Built a real-time fleet management platform with live GPS tracking, route optimization, and driver mobile app. 2,000+ vehicles monitored daily.

webReactNode.jsWebSocketPostgreSQLRedisReact Native
0,000+
Vehicles tracked (Real-time GPS)
-22%
Fuel costs (Route optimization)
< 0ms
Position latency (GPS to dashboard)
0 weeks
Full platform (Web + mobile + API)

The challenge

The client manages a fleet of 2,000+ delivery vehicles across Romania. Their dispatchers were using spreadsheets and phone calls to coordinate routes — no real-time visibility, no route optimization, and drivers had no mobile tools. Fuel costs were 22% above industry benchmark due to suboptimal routing.

They needed a complete platform: a web dashboard for dispatchers, a mobile app for drivers, and a real-time data pipeline connecting everything.

Our approach

We designed a three-layer architecture: a real-time ingestion pipeline (GPS data from drivers → Redis Pub/Sub → WebSocket to dashboard), a PostGIS-powered spatial database for geofencing and route queries, and client apps optimized for their specific use cases.

The driver app needed to work with spotty cellular coverage on rural routes, so we built it offline-first with background GPS tracking that queues position updates and syncs when connectivity returns.

Key technical decisions:

  • PostGIS for spatial queries instead of application-level geo filtering
  • Redis Pub/Sub for real-time position broadcasting (not Kafka — right tool for current scale)
  • Mapbox GL for smooth map rendering with 2,000+ moving markers
  • Chose NOT to build route optimization in-house — integrated Google Routes API with custom constraints

What we built

A full logistics platform used by 200+ dispatchers and 2,000+ drivers daily:

  • Real-time fleet map with sub-500ms position updates
  • Geofence alerts for delivery zones, restricted areas, and route deviations
  • Automated route optimization reducing fuel costs by 22%
  • Driver mobile app with offline GPS tracking and delivery confirmation
  • Analytics dashboards: fuel consumption, delivery times, driver performance
  • Webhook integrations with their existing ERP and invoicing systems

Technology stack

Frontend

ReactTypeScriptMapbox GLTanStack QueryTailwind CSS

Mobile

React NativeExpoBackground Location

Backend

Node.jsFastifyPostgreSQLPostGISRedis Pub/SubWebSocket

Infrastructure

AWS ECSElastiCacheRDSCloudWatchGitHub Actions

Timeline

Week 1-2

Discovery

Mapped dispatch workflows, GPS data requirements, driver needs.

Week 3-5

API & Data Layer

PostGIS schema, real-time ingestion pipeline, WebSocket server.

Week 6-9

Web Dashboard

Live map, fleet overview, route planning, analytics dashboards.

Week 10-12

Driver App

React Native app with background GPS, delivery confirmations, offline mode.

Week 13-14

Launch & Scale

Load testing at 5,000 concurrent connections, phased rollout.

Key learnings

PostGIS spatial queries were 40x faster than application-level filtering

Initial prototype filtered vehicle positions in Node.js. Switching to PostGIS ST_DWithin queries for geofencing reduced response time from 800ms to 20ms for 2,000 vehicles.

Redis Pub/Sub was the right choice over Kafka

At 2,000 vehicles sending positions every 5 seconds, Redis Pub/Sub handled the throughput easily. Kafka would have added operational complexity we didn't need yet.

Start a conversation about your project.