Design Food Delivery Cart
Company: Uber
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design the backend for a shopping cart in a large food-delivery application.
Users should be able to:
- create or resume a cart for a restaurant,
- add items and option selections,
- update quantities or remove items,
- view subtotal, taxes, fees, tips, promotions, and estimated total,
- sync the cart across devices,
- handle menu or price changes,
- and convert the cart into an order at checkout.
Discuss:
- core APIs,
- the data model,
- how items and modifiers are validated,
- how prices and promotions are calculated,
- how concurrency and idempotency are handled,
- storage choices, caching, and expiration,
- and how the design scales under high read and write traffic.
Quick Answer: This question evaluates a candidate's expertise in backend system design for transactional applications, covering competencies such as API design, data modeling, concurrency and idempotency, pricing and promotion logic, validation, caching, storage choices, and scalability.