Practice: Design Food Delivery System
On-demand food delivery platform with restaurant catalog, menu/pricing, cart/checkout, courier assignment, live tracking, and notifications.
Build this system yourself on the canvas below. Add components, connect them, and run traffic simulations to see where your design holds up and where it breaks.
Functional requirements
- Browse restaurants by cuisine, ratings, distance, and promotions.
- View real-time menus with pricing, availability, and preparation time.
- Add/remove items to cart; apply promo codes; compute delivery fees and taxes.
- Checkout with secure payments; orders must be confirmed within seconds.
- Automatic courier assignment with batching where possible; live order tracking.
- Substitutions and out-of-stock handling with customer approval.
- Order status push notifications and in-app updates across devices.
- Restaurants receive orders on a partner app or web console with acknowledgment.
- Cancellations, refunds, and support workflows with audit trails.
- Order history, re-ordering, and receipts via email.
Non-functional requirements
- Availability: 99.95% uptime; a single instance or AZ failure must not impact ordering.
- Performance: catalog/menu reads < 100 ms p99 cache-warm; checkout confirmation < 2 s p99.
- Scalability: independently scale catalog, checkout, and delivery assignment; handle regional dinner surges.
- Durability: orders and payments persisted with transactional guarantees; receipts retained per compliance.
- Consistency: strong consistency for orders/payments; eventual consistency tolerated for analytics and recommendation feeds.
- Security: PCI-DSS scope isolated to payment service; TLS 1.2+ in transit; AES-256 at rest.
- Resilience: circuit breakers and timeouts between services; retries with backoff and idempotency keys at checkout.
- Observability: traces, structured logs, and metrics for API, queue depth, and assignment latency.
- Geo: latency-based routing at the edge; store-specific menus cached per region.