XPO Logistics — Real-Time
Multi-Role Logistics MVP
Client’s Challenge
XPO Logistics (NYSE: XPO) is a top ten global logistics company with over 97,000 employees across 32 countries. They needed a digital platform unifying all supply chain participants — logisticians, carriers, drivers, and shippers — into a single real-time system.
The core complexity: 4 distinct user roles with fundamentally different needs and workflows. A logistician tracks 50+ shipments simultaneously. A driver needs a simple mobile interface. A carrier wants transparent contract terms. A shipper demands guarantees and online documentation.
Previous automation attempts failed due to excessive complexity and lack of real UX research. Our mandate: deliver a production-ready MVP in 14 weeks.
- 4 user roles with conflicting requirements in one interface
- Real-time tracking without latency at 1,500+ location scale
- Verification of all participants before system access
- Electronic documents (waybills) with legal validity
- Offline mode for drivers in poor coverage areas
How We Solved It
User Research
3 weeks of interviews with 24 representatives across all 4 roles. Mapped critical workflows, pain points, and feature priorities per persona.
Information Architecture
Role-based routing system with unified auth layer. 4 distinct dashboards sharing a common data model and real-time event bus.
Real-time Infrastructure
WebSocket cluster with Redis pub/sub for instant updates. Event sourcing architecture ensuring zero data loss during network partitions.
Mobile-First for Drivers
React Native app with offline-first architecture, GPS tracking, and automatic sync when connectivity returns.
Load Testing & Deploy
Apache JMeter stress testing with 10K concurrent users. Zero-downtime deployment pipeline via AWS ECS with rolling updates.
Our Implementation
shipment.gateway.ts
// WebCoreLab — XPO Real-Time Cargo Tracking Engine
// 97K+ users · 32 countries · 1,505 locations · 340ms avg latency
import { WebSocketGateway, SubscribeMessage } from '@nestjs/websockets';
import { Socket, Server } from 'socket.io';
@WebSocketGateway({ namespace: '/tracking' })
export class ShipmentGateway {
@SubscribeMessage('subscribe_shipment')
async handleSubscribe(data: { shipmentId: string; role: UserRole }, client: Socket) {
// Role-based room: logist sees company-wide, driver sees own
const room = data.role === 'LOGIST'
? `company:${data.companyId}`
: `driver:${client.handshake.auth.userId}`;
client.join(room);
const state = await this.redis.get(`shipment:${data.shipmentId}`);
client.emit('shipment_state', JSON.parse(state));
}
async broadcastLocationUpdate(driverId: string, coords: Coords) {
const eta = await this.geo.calculateETA(coords, shipmentId);
this.server.to(`shipment:${shipmentId}`)
.emit('location_update', { shipmentId, coords, eta });
// Alert dispatch if delay exceeds 15 minutes
if (eta.delayMinutes > 15) {
this.server.to(`company:${companyId}`)
.emit('delay_alert', { shipmentId, delay: eta.delayMinutes });
}
}
}
// Handles 12,000+ concurrent WebSocket connections
// Avg location update latency: 340ms · 99.7% uptime across 18mo
Measurable Impact
Measured 18 months after production launch
“This platform fundamentally changed how our operations team works. What used to require 3 coordinator calls per shipment now happens automatically. The real-time tracking alone saved us an estimated $1.2M in the first year through better load optimization.”
— M.V., VP Operations, Logistics Enterprise (NDA)