Case study 04 Logistics
Fly Package
A delivery management system that connects suppliers, couriers and managers — and assigns each order to the nearest available courier.
fig. 04 — nearest available courier
01
The problem
Deliveries break down at the hand-offs: who takes the order, who is actually free, and where everything stands right now.
Suppliers need to submit and track orders. Couriers need clear assignments and a simple way to update status. Managers need to approve suppliers, manage couriers and see the whole operation.
02
My responsibility
- 01Domain modelingUse-case and data modeling for suppliers, couriers, managers, orders and locations.
- 02BackendREST API on Node.js and Express, with a MongoDB schema for orders, couriers and locations.
- 03Courier selectionNearest-available-courier assignment using geospatial queries.
- 04DashboardsReact interfaces for each role, including logistics dashboards for managers.
03
The architecture
The original design artifacts below show the actors and use cases, and the data model behind them — including courier availability and status, and order origin and destination locations.
04
Engineering challenges
Choosing the right courier
The best courier is the closest one who is actually available — not just the closest.
Consistent delivery states
Orders move through states that suppliers, couriers and managers all depend on.
Three roles, one system
Each role needs different views and permissions over the same data.
Operational visibility
Managers need a live picture of orders, couriers and supplier activity.
05
The solution
- Model locations explicitlyOrders carry origin and destination locations; couriers carry availability and status.
- Select the nearest available courierWhen a supplier submits an order, a geospatial query finds the closest courier whose status is available.
- Drive the delivery lifecycleCouriers accept or reject orders and update their status, and suppliers are notified as orders progress.
- Give managers controlManagers confirm or reject new suppliers, manage couriers, check payments and monitor deliveries from dashboards.
06
Technologies
07
Outcome & lessons
Modeling the domain first — actors, states and locations — made the hardest feature, courier selection, almost straightforward.
- Availability is as important as distance in dispatch logic.
- Explicit state models keep three different user roles in sync.
- Design artifacts are worth keeping: they explain the system faster than the code.