Last-mile TMS
Plans delivery trips from picking lists; drivers sign off every stop on their phone.
A transport management system for the in-house delivery team. Planners turn warehouse picking lists into trips with an optimised stop order; drivers open their route from a link on their phone and record what actually happened at every door.
The problem
The warehouse system stopped at “shipped”. What happened at the door — who signed, how many boxes the member actually accepted, how many pallets went back — lived on paper and in chat messages, and that is exactly the information that gets invoiced and disputed. Trips were put together by hand and pallet balances per member were guesswork.
The approach
I built it as a Cloudflare Worker on Supabase with a plain-JavaScript front end. Picking lists sync nightly from the warehouse system into mirror tables that never touch the operational data. Addresses are geocoded (PDOK for Dutch addresses, Nominatim elsewhere, cached), RouteXL orders the stops, and confirming a trip issues a 12-character route code. The driver page needs no account: the code in the link is the key, it expires and can be revoked. Every confirmation gets a client-generated event id and goes into a queue on the phone first, so drivers keep working without signal and a retried upload can never become a double delivery. Stop events are append-only, and a small PDF writer in the Worker turns signature and counts into a signed delivery note.
Highlights
- checkOffline-first driver app: confirmations queue on the phone and sync when signal returns, deduplicated by event id
- checkSignature, required photo, GPS distance stamp and a pallet ledger (delivered vs. returned) at every stop
- checkDrivers report wrong addresses or instructions from the road; the office applies them with one click
- checkPartial deliveries per order line feed returns and a pallet balance per member for finance
- checkOwn PDF writer in the Worker, including PNG-to-PDF embedding, for dispatch notes and signed delivery notes
- checkGlove-proof, light-only driver UI: large tap targets, one main action per stop, completed stops collapse