Technical write-up
The problem
Unattended parcel lockers in Kenya have to take a payment, open the right door and stay in sync with the back office, over mobile connections that drop without warning. Every failure happens in public: “I paid and the door didn’t open.”
Designed for speed
- Four steps maximum. Every customer flow (store, collect, send) takes four steps or fewer, with large touch targets, so it is done in under 30 seconds.
- Our own SMS gateway. Pickup PINs go out without a third-party queue in the way.
- Protobuf over AMQP. The kiosk and the Go backend exchange compact, typed messages instead of chatty JSON.
- M‑Pesa in the same flow, without leaving the screen.
Designed for failure
- Lock-jam and open-door detection on every lock command, with lock-controller commands guarded by a watchdog.
- Offline-first. The kiosk keeps serving customers without a network, queues events in a local SQLite inbox that drops duplicates, and synchronises when it reconnects.
- Signed messages. The back office only acts on messages it can authenticate.
- Self-healing connections. Kiosks redeclare their message queues and come back on their own after a network drop.
How it is built
- Kiosk: Qt 6 and QML on a Raspberry Pi. Business logic lives in C++ controllers with explicit state machines; QML only draws the screen.
- Lock control: drivers for four RS485 lock-controller models, each with a mock for testing, plus a touch settings app for field technicians.
- Platform: a Go backend with PostgreSQL for bookings, parcels, payments and devices, RabbitMQ between kiosks and the backend, and an admin app for the web and Android.
- Deployment: Qt 6 cross-compiled for ARM64 in Docker, one codebase configured per site, and the kiosk app run as a systemd service that restarts on failure.
Fixed in the field
- Production freezes traced to re-entrant asynchronous continuations, and removed.
- “Paid but the door didn’t open,” traced to a stuck lock-controller command and now caught by the watchdog.
- Kiosks that never came back online after a network drop, fixed by redeclaring the reply queue on reconnect.





