Preparing your design workspace

Loading the problem and your latest saved attempt…

Design Coffee-Shop Ordering and Fulfillment

Accept customizable pickup orders, reserve limited items, coordinate payment and preparation, and expose a reliable queue state.

Problem statement

The source asks to design a coffee-shop order system. For this exercise, assume customers browse a store-specific versioned menu, customize drinks, choose pickup, and submit payment.

The store sees an ordered preparation queue, may mark items unavailable, advances accepted orders through preparing, ready, picked up, or cancelled, and the customer receives status updates. Retrying after a timeout must not create a second order or charge.

Inventory is coarse item availability rather than ingredient-level forecasting. Delivery, loyalty, recommendations, refunds after pickup, and employee scheduling are outside scope.

What to build

  1. A customer can browse a store's current menu, prices, options, and availability.
  2. A customer can idempotently place and pay for a customized pickup order against an exact menu version.
  3. A store can view a stable preparation queue and advance an order through allowed states.
  4. A customer can read authoritative status and receive recoverable status notifications.

At scale

  • For this exercise, assume 20,000 stores, peaks of 100,000 menu reads and 10,000 order attempts per second globally.
  • For this exercise, target 300 milliseconds p95 for menu reads and two seconds p95 for an order to reach the store queue after payment authorization.
  • For this exercise, store connectivity may be interrupted for five minutes, but customers must not receive false ready states or duplicate orders.
  • For this exercise, menu changes should propagate within 30 seconds while checkout always validates authoritative current availability.