Step 1: Requirements
Requirements
Questions to Ask
- Single restaurant or multi-restaurant? (Multi-restaurant marketplace)
- Delivery or pickup or both? (Both)
- Real-time order tracking? (Yes)
- Coupons and discounts? (Yes — percentage, flat, buy-one-get-one)
- Payment integration? (Out of scope — assume paid)
- Menu customization? (Yes — add-ons, special instructions)
Functional Requirements
- Browse restaurants and menus
- Add items to cart with customizations (add-ons, quantity, special instructions)
- Apply discount coupons
- Place order → restaurant confirms → preparing → ready → picked up → delivered
- Track order status in real time
- Cancel order (only before restaurant starts preparing)
Non-Functional Requirements
- Order state transitions must be atomic
- Concurrent orders per restaurant
- Price calculation must be deterministic (no floating-point drift)