← Back to Projects

Scaling ROUTD's Logistics Platform

Leading engineering for a UK logistics platform serving Amazon and Compass Group, with custom geolocation algorithms and enterprise integrations.

The Context

ROUTD is a logistics platform that connects businesses with delivery drivers across the UK, serving major enterprise clients including Amazon and Compass Group (a global food service company with $4B+ in revenue). When I joined as Lead Software Engineer in 2023, the platform was handling growing traffic but facing cost and optimization challenges.

My role was to lead the engineering team, solve complex optimization problems, and build integrations for enterprise clients.

Client Solutions & Strategy

Working with enterprise clients like Compass and Amazon required more than just coding—it required deep technical strategy alignment.

I regularly participated in meetings with top leadership from Compass Group and Amazon to understand their logistics bottlenecks and propose engineering solutions. These sessions involved:

  • Translating high-level business requirements into executable technical roadmaps
  • Designing custom integration points for their existing supply chain systems
  • Providing architectural consulting to ensure ROUTD could handle their projected scale

This direct line of communication allowed us to build features that directly impacted their bottom line, rather than guessing at requirements.

Geolocation Cost Optimization

The Problem

Geolocation services are expensive at scale. Every geo-fence check, every distance calculation, every real-time alert—they all add up when you're processing millions of requests monthly. We were paying significant costs to third-party geolocation providers for operations that didn't always require high precision.

The Solution: Hybrid Distance Algorithm

I designed and implemented a custom hybrid algorithm that combined:

  • Euclidean Distance for fast, cheap preliminary calculations
  • Haversine formula for accurate spherical distance when precision mattered
  • Smart thresholds to determine when cheap approximation was sufficient vs. when we needed precision

The approach:

  1. First, calculate Euclidean distance (computationally cheap)
  2. If the result is clearly inside or outside the geofence boundary (with buffer), use that result
  3. Only call the expensive precise calculation for edge cases near boundaries

This dramatically reduced our calls to paid geolocation APIs while maintaining accuracy for the cases that actually mattered.

Accurate Distance Tracking with High-Frequency Coordinates

Here's a problem with naive distance calculation: if you only check two points 1km apart, you lose the actual path taken. A driver who made a U-turn, navigated a winding road, or took a detour—the straight-line distance tells you nothing useful.

Distance calculation comparison

The insight: The more frequently you sample coordinates, the better you can approximate curved paths.

By receiving shorter-interval location updates from drivers, we could:

  • Sum the segments between consecutive points for true distance traveled
  • Capture curves and turns that a single long segment would miss
  • Detect anomalies like U-turns or route deviations in real-time

Think of it like drawing a curve: connect two distant points and you get a straight line. But connect 20 points along the curve, and you get an accurate representation.

This high-frequency sampling gave us:

  • Accurate mileage for billing and driver compensation
  • Better ETA predictions based on actual route behavior
  • Detection of route deviations for real-time alerts

Real-Time Alerts

The geofencing optimization directly powered our real-time alert system. When drivers entered or exited zones, users needed instant notifications. By reducing the computational overhead of each check, we could:

  • Process more location updates per second
  • Reduce latency on alert delivery
  • Handle peak traffic without degradation

Result: 70% reduction in geo-fencing costs while maintaining alert accuracy and responsiveness.

Warehousing Solution

We built a warehousing management layer to handle the complexity of multi-party inventory.

The Setup

  • Compass Group managed some warehouses
  • ROUTD managed others
  • Both supplied products to Amazon offices

This created a coordination challenge: different parties owning different warehouses, but all feeding into the same fulfillment pipeline.

What We Built

  • Unified inventory view across all warehouses regardless of operator
  • Cross-warehouse transfer coordination
  • Automated routing decisions based on stock levels and proximity
  • Integration with Amazon's receiving systems for seamless delivery confirmation

The system handled the handoffs between Compass-managed and ROUTD-managed facilities without manual coordination.

Amazon Vending Machine Integration

One of the more interesting technical challenges was integrating Amazon's vending machine network with our logistics platform.

The Use Case

Amazon had vending machines deployed at various locations, and they needed visibility into:

  • Real-time stock levels
  • Replenishment logistics
  • Delivery driver coordination

We built the integration layer that connected their vending machine telemetry with our routing and dispatch systems, enabling automated replenishment workflows.

Police Station Stock Visibility (UK)

A similar but distinct challenge involved vending machines and stock systems deployed at police stations across the UK.

The Problem

Police stations needed visibility into their stock levels for various supplies, but the existing systems were fragmented. There was no unified view of what was available where, making logistics planning difficult.

The Solution

We integrated these distributed systems into ROUTD's platform, providing:

  • Centralized dashboard for stock visibility across all connected locations
  • Automated alerts when stock levels dropped below thresholds
  • Optimized routing for replenishment runs that could service multiple locations efficiently

This wasn't just a technical integration—it required understanding the operational constraints of these environments and designing workflows that fit their needs.

Team and Process

Building the Team

I managed a cross-functional team of 10+ engineers across multiple time zones. Key initiatives:

Clear ownership: Each major system component got an owner—not siloed, but someone accountable for each area's health.

Structured code review: Reviews went from optional to required, with clear criteria for approval.

Technical debt allocation: We dedicated time each sprint to addressing technical debt, preventing the backlog from growing unbounded.

System Audits

I audited 5+ software systems end-to-end for build vs. buy decisions. This involved:

  • Evaluating existing vendor solutions against our specific requirements
  • Cost-benefit analysis including maintenance overhead
  • Recommendations that saved significant development time and licensing costs

Lessons Learned

Optimization Problems Require Domain Understanding

The geolocation cost reduction wasn't just about algorithms—it required understanding when precision actually mattered to the business. A mathematically perfect solution that didn't account for real-world tolerances would have been over-engineered.

Enterprise Clients Need Direct Technical Contact

Having engineers in strategy meetings with Amazon and Compass leadership shortened feedback loops dramatically. We built what they actually needed, not what got lost in translation.

Integration Work Is Underrated

Connecting vending machines, stock systems, and logistics platforms isn't glamorous, but it creates massive value. The technical challenge is in handling edge cases, failures, and the messy reality of distributed systems.

Results Summary

AreaImpact
Geo-fencing costs70% reduction
Enterprise clientsAmazon, Compass Group ($4B+)
Team size10+ engineers
System audits5+ build vs. buy evaluations

The work at ROUTD reinforced that the most valuable engineering often happens at the intersection of optimization, integration, and direct client partnership.