Work / Logistics, PWA
Delivery system
The day's orders go in as a spreadsheet. Out come routes per zone, a phone app for drivers that works without signal, and a settlement per zone at the end of the day.
The problem
The day's deliveries came out of the ERP as a spreadsheet, and that was where the system stopped. Who drove which zone, what was delivered, what came back and how it was paid had to be pieced together afterwards.
What I built
The dispatcher uploads the export in the morning. The system splits it into zones and the dispatcher assigns drivers. A driver opens the app on a phone and sees the stops.
At each stop the driver marks delivered, partly delivered or refused, and how it was paid: cash or one of the two local payment apps, with the QR code on screen. The phone stores it and sends it when there is signal again. Lima has streets where there is none.
At the end of the day the office gets a settlement per zone: goods out, goods back, money in. It exports to PDF and then locks.
How it fits together
- PeopleDispatcher in the admin app, Drivers on the PWA
- On the phoneservice worker, local database, outbox that syncs later
- Applicationtwo Next.js apps, one monorepo
- DataPostgres, self-hosted Supabase, roles in the sign-in token
What came out
| In production since | April 2026 | measured |
|---|---|---|
| Commits | 707 | measured, Nov 2026 |
| Customers on a delivery day | 90 to 130 | measured, Sept to early Oct 2026 |
| Zones on a delivery day | 5 to 9 | measured, Sept to early Oct 2026 |
| Dispatch and settlement work saved a week | about 5 to 9 hours | estimated, 5 to 9 zones a day, about 10 minutes less per zone, 6 working days |