Open this on a laptop
The canvas needs room: requirements on one side, live feedback on the other. Any screen 1024px or wider works.
Design DoorDash
hardCustomers order from nearby restaurants, pay exactly once, and watch a courier arrive just as the food is ready.
The problem
Build food delivery like DoorDash or Swiggy. Customers browse nearby restaurants and order, restaurants accept and cook, couriers pick up and deliver, and all three apps watch the order move.
The food has to be cooked first, so a courier is sent on the kitchen's clock, timed to arrive as the food is ready.
Orders are few and carry money; browsing and courier positions are floods, kept away from the orders.
What it must do
- Browse. Find restaurants whose delivery area covers you, from an index kept per map cell.
- Order. Hold the card, save the order with its prices copied, and move it only through guarded saves.
- Deliver. Tell the restaurant at once, then send a free courier near it so they arrive as the food is ready.
- Track. Push every change and the courier's position to the apps over an open line.
What you'll learn
- Start with the simplest design that works
- Keep running when a server dies
- Charge each order exactly once
- Keep courier positions in memory
- Send the courier on the kitchen's clock
- Push every change live
- Search without touching the orders