Case 06 Delivery marketplace
One order, three parties, a live map
The backend for a Lagos delivery marketplace that connects customers, local vendors and independent riders, where every order has to look the same to all three.
- Company
- GidiDash
- Live site
- gididash.com (opens in a new tab)
- Role
- Backend Engineer (Contract)
- Period
- 2026 – Present
- Location
- Lagos, Nigeria
- Stack
- NestJS, Node.js, PostgreSQL, Redis, WebSocket, Flutter, React

The marketplace
GidiDash is an on-demand delivery marketplace in Lagos. Customers order from local vendors (restaurants, retailers, small businesses) and independent riders deliver.
Vendors get an order dashboard and itemized settlements; riders schedule their own work and get clear payouts. I built the backend.
Three views of one order
Every delivery involves three parties who need the same view of it: the customer who ordered, the vendor preparing it and the rider carrying it.
Each change of state has to be agreed, shown live and followed by the right notification, even when a request fails halfway or the email provider is down. And every payout has to trace back to the orders behind it.
How it’s built
Orders move through an explicit lifecycle: placed, accepted by a vendor, assigned to a rider, picked up, delivered. Each transition is checked against the order’s current state, so the three sides can’t drift apart.
During a delivery, the rider’s location streams to the customer and the vendor over a WebSocket connection, and the apps don’t have to poll for it.
Emails go through a transactional outbox. The email event is written in the same database transaction as the order or payout change, and a separate dispatcher sends it and retries on failure. A crash or a mail-provider outage can no longer lose a notification.
Vendor settlements and rider payouts are generated from the order and delivery records themselves. There is no running balance to drift.
Decisions
An explicit order lifecycle
With one lifecycle shared by all three sides, the system can always answer “where is my order?”.
Location pushed over WebSockets
Each active delivery has a connection that sends updates as they happen, where polling would have every app asking the server on a timer.
The email written in the same transaction as the change
The outbox row commits together with the state change, so either both happen or neither does. No order changes without its notification queued.
Settlements built from orders
Every settlement and payout can be checked against the exact orders it came from.
Trade-offs
At-least-once delivery
The outbox guarantees an email isn’t lost. If the dispatcher crashes after sending but before marking the row as sent, it sends again, so delivery is at-least-once and the dispatcher has to allow for that.
Connections to scale
Each WebSocket is a long-lived resource, and mobile networks drop. Clients have to reconnect and catch up.
Some requests get refused
Validating every transition means some requests are rejected, such as a rider marking an order delivered before pickup. The apps have to handle those refusals well.
What I built
- The backend for the customer, vendor and rider sides of the marketplace.
- The order lifecycle and its transitions.
- Live rider tracking over WebSockets.
- Notification emails through a transactional outbox.
- Itemized vendor settlements and rider payouts.
Status
- Ongoing. The apps are listed as coming soon on the App Store and Google Play.
- The backend covers ordering, the order lifecycle, live rider tracking, outbox-backed notifications, and vendor settlements and rider payouts.