Case study

Truck-driving regulation service

I built a service that checks truck drivers' driving and rest times automatically, cutting an inspection from 35 to 6 minutes.

  • 140,000drivers covered
  • 6 minper inspection, down from 35
  • 260,000violations detected automatically a year

Challenge

Manual, slow checks of driving and rest-time rules, with gaps in the audit trail.

What I built

Tachograph and ELD ingestion, a versioned rules engine, an inspector mobile app, fleet dashboards, tamper-evident logs and a RAG assistant on regulations.

Stack

Java (Spring Boot), PostgreSQL, Kafka, Kubernetes, Drools, pgvector.

System design

Past periods are judged by the rules in force at the timefindingsTachograph filesTimeline per driverdriving, rest and other workELD dataKafkaDrools rules enginerule sets versioned byeffective dateDriving and rest rulesEU Regulation 561/2006Offline-capable mobile appInspectorsAudit logappend-only, hash-chainedRegulation textsindexed in pgvectorAssistantanswers with citations

Tachograph files and ELD data are parsed into a timeline of driving, rest and other work per driver, then published to Kafka. A Drools rules engine evaluates each timeline against driving and rest rules, such as those in EU Regulation 561/2006, with rule sets versioned by effective date so past periods are judged by the rules in force at the time. Inspectors use an offline-capable mobile app, findings go into an append-only, hash-chained audit log, and the assistant answers from regulation texts indexed in pgvector, with citations.

Results

  • 140,000 drivers covered
  • inspection time from 35 to 6 minutes
  • 260,000 violations detected automatically a year
Back to Work & Research