teacher
Sign in

Design a Food Delivery System

A case study of a Swiggy or Zomato style platform, covering restaurant search, cart and orders, the order state machine, partner assignment, live tracking and ETA.

40 min6 interactive1 problems

Requirements

A food delivery platform connects three parties: customers who order, restaurants who cook, and delivery partners who carry the food. It is a marketplace plus a logistics system, and the clock is always ticking because the food is getting cold.

Functional:

  • Search restaurants and dishes near a location.
  • Build a cart, place an order and pay.
  • Restaurant accepts, prepares and marks the order ready.
  • Assign a delivery partner and track the order live.
  • Show an ETA (estimated time of arrival) and notify on every status change.

Non-functional:

  • Search is fast (under about 300 ms) and tolerates slightly stale data.
  • Order placement is correct: no lost orders, no double charges.
  • Tracking is near real time, a few seconds old at most.
  • Peaks are sharp: lunch and dinner, rain, match days.
1 of 11