Design a Shared Group Order Cart with Live Participant Sync
Last updated: November 29, 2026
Quick Overview
Design DoorDash group ordering, where a host shares a link, several people add items to one cart from their own phones, and everyone sees the cart update live until the host checks out.
DoorDash
November 29, 20260
0
0 solved
Design DoorDash group ordering, where a host shares a link, several people add items to one cart from their own phones, and everyone sees the cart update live until the host checks out.
Group orders are popular for office lunches and DoorDash for Work, and they raise collaboration problems in a commerce flow: concurrent edits, per-person limits, and a lock at checkout. The interviewer checks your data model, sync mechanism and how you avoid surprising the host when items change during payment.
What the Interviewer Expects
- Model the cart with per-participant line items to reduce conflicts
- Choose a sync mechanism and explain fallback to polling
- Handle concurrent edits with versioning
- Lock or freeze the cart during checkout
- Support per-person spending limits and split payment options
- Expire abandoned group carts
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you handle two participants editing the same shared item quantity at once?
- What if an item goes out of stock after five people added it?
- How would you let each participant pay for their own items?
- How do you prevent a public group link from being abused?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Host creates a group cart for a store and gets a shareable link; participants join (signed in or as guests), add, edit and remove their own items, and see everyone's.
- Host can set a deadline and p...
High-Level Design
- Cart service stores
group_cart(id, store_id, host_id, state, version, deadline, limit)andcart_item(id, cart_id, participant_id, item_id, options, qty). - Sync: clients subscribe to `ca...