Loading000%

← All projectsFinal-year engineering project · Dundill · 2025

Delivery Route Optimization Platform

Three NestJS microservices exchanging events through RabbitMQ, a heuristic route engine on real road distances, live driver tracking and three client apps.

  • NestJS
  • GraphQL
  • RabbitMQ
  • MongoDB
  • React
  • React Native
Architecture walkthrough on request

01 · Context

A last-mile delivery business needs to coordinate three groups of people: partners who create orders, admins who dispatch them, and drivers on the road. Built as my final-year engineering project at Dundill.

02 · Challenge

Turn a list of parcels into an efficient route for each driver, keep everyone informed in real time, and keep the system maintainable as features grow.

03 · Architecture

  • Three NestJS services (Users, Orders, Notifications), each owning its own MongoDB data and exposing its own GraphQL API.
  • RabbitMQ topic exchanges carry domain events between services (user changes, parcel status updates).
  • A WebSocket gateway streams driver positions to the back office in real time.
  • Notifications are delivered by email and through GraphQL subscriptions.
  • Clients: a React back office, a React partner dashboard and a React Native (Expo) driver app.

04 · Key decisions

  • Events instead of direct calls

    State changes travel as asynchronous events, so a slow notification service never blocks an order.

  • Nothing gets lost

    A dead-letter queue and automatic reconnection keep failed messages instead of dropping them.

  • Routing on real roads

    Stops are ordered with a nearest-neighbour construction followed by 2-opt improvement, on real road distances, with a fallback routing provider so optimization keeps working when one is down.

  • Security at the edge of the domain

    Six roles enforced by JWT guards in the identity service; other services verify tokens through it.

05 · Result

A working end-to-end platform across six codebases: drivers get an optimized run sheet, admins follow drivers live, and partners receive status updates as they happen. Architecture walkthrough available on request.