Project overview
The challenge
- Transport planning — drivers, vehicles, courses and multi-stop tournées — was managed manually across spreadsheets, making it error-prone and hard to audit.
- Operations had no live view of the fleet; GPS, tachograph and driver-availability data lived in disconnected external systems.
- EU driving-time (RSE) rules and contractual constraints had to be checked by hand, with no structured way to record justified exceptions.
- Changes made during day-of operations risked overwriting the carefully built plan.
A platform for planning and operating a passenger-transport fleet in France. It models the full domain — from contracts and recurring service templates down to individual courses and multi-stop driver shifts. As technical lead at Korbyx, I owned the architecture and delivery across a NestJS backend and a Next.js frontend.
The backend runs as two processes from a single codebase — a NestJS 11 REST API and a dedicated GPS worker — communicating over Redis Pub/Sub and backed by Supabase/PostgreSQL (no ORM). A data-driven rule engine evaluates contractual and EU driving-time (RSE) constraints, with a three-level derogation system (N1/N2/N3) for justified exceptions, and a strict separation between the published plan and day-of operations.
The frontend delivers weekly planning with Gantt-style course generation, live GPS tracking and tracking alerts in real time via SSE. External systems — Michelin Connected Fleet (GPS/tachograph), PTV (routing/ETA) and Factorial (HR) — are synced into cache tables a few times a day so the app stays fast and resilient, with GDPR-compliant geolocation handling.
Technical architecture
Frontend (Next.js 16 App Router): planning grid, Gantt, live tracking, and admin — using TanStack Query for data, Zustand for state, and MapLibre/Google Maps for mapping.
API (NestJS 11): domain modules (commercial, backoffice, conception-planning, exploitation, parametres) over Supabase/PostgreSQL with no ORM, secured by Microsoft Entra ID OAuth → JWT.
GPS worker: a second process built from the same codebase, polling Michelin Connected Fleet and publishing live positions over Redis Pub/Sub.
Real-time layer: SSE from the backend pushes live course and GPS state to the operations dashboards.
Rule engine: DB-backed rule definitions, compatibility matrices, and a three-level derogation system evaluated through a cached rule service.
Key challenges & solutions
High-risk shared assignment validation
The shared assignment validation underpins driver availability, RSE rules, double-driver, derogations and cancellations. I protected it with dedicated regression suites and a write-the-failing-test-first policy before any change.
Planning vs live-operations separation
Introduced a clean split between the published plan and live operations, with an effective read view, so live updates never mutate the plan — all live patches go through a single update helper.
Real-time fleet visibility
Ran a dedicated GPS worker communicating over Redis Pub/Sub and streamed updates to the UI via SSE, while caching external GPS data to avoid request-time API calls.
Data-driven business rules
Moved RSE thresholds, compatibility matrices and justification codes into DB-backed rule tables read through a cache service, so business rules change without redeploying code.
Resilient external integrations
Synced Michelin, PTV and Factorial into cache tables a few times a day with non-fatal error handling, keeping the app fast and available even when third parties are slow or down.
Impact & results
Centralized weekly transport planning that was previously managed in spreadsheets into a single, auditable system.
Gave operations live visibility into the fleet through real-time GPS and SSE, replacing manual check-ins.
Made EU driving-time (RSE) rules configurable, with a structured derogation workflow for justified exceptions.
Separated planning from live operations so day-of changes never corrupt the published plan.
Implemented GDPR-compliant geolocation handling with a documented data-processing registry.
Key features
- Weekly planning with Gantt-style course and multi-stop shift generation
- Configurable rule engine with three-level derogation/override (N1/N2/N3)
- Configurable EU driving-time (RSE) rule checks
- Live GPS tracking and tracking alerts via SSE
- Strict separation between the published plan and live operations
- Microsoft Entra ID (Azure AD) SSO with role-based access
- External integrations: Michelin Connected Fleet, PTV, Factorial HR
- Excel and PDF exports for operational documents
