Quick Commerce System Design
Problem Statement
Design the Low-Level Design (LLD) of a Quick Commerce System that allows users to order groceries, essentials, and daily-use items and get them delivered within minutes from nearby dark stores or micro-fulfillment centers.
The focus should be on object-oriented design, class responsibilities, and interaction flow, not large-scale distributed architecture or database sharding (which would be part of an HLD).
π― Goal
Design a system that can:
β Functional Requirements
1. User & Authentication
A user can:
2. Catalog & Search
3. Cart & Order Management
User can:
4. Inventory Management
When a user places an order:
5. Delivery Partner Assignment
Once order is ready:
6. Payment
Users can pay via:
7. Notifications
Users get real-time notifications for:
βοΈ Non-Functional Requirements
π§± Key Classes to Design
ClassResponsibility
User
Represents a customer with profile, addresses, and order history.
Address
Represents userβs saved delivery locations.
Product
Represents an item in the catalog (price, stock, category).
Store
Represents a dark store or fulfillment center managing inventory.
InventoryItem
Represents product stock at a specific store.
Cart
Holds current user selections before placing an order.
Order
Represents a confirmed order and its current state.
OrderItem
Represents a product and quantity in an order.
Payment
Represents payment info, method, and status.
DeliveryPartner
Represents a delivery agent and current availability.
DeliveryAssignment
Links a delivery partner to an order.
NotificationService
Sends notifications for order state updates.
StoreSelectorService
Finds the nearest store with available stock.
π§© Example Class Relationships
1
2User
3 βββ id
4 βββ name
5 βββ List<Address>
6 βββ Cart
7 βββ List<Order>
8
9Product
10 βββ id
11 βββ name
12 βββ description
13 βββ price
14 βββ category
15
16Store
17 βββ id
18 βββ name
19 βββ location
20 βββ List<InventoryItem>
21
22InventoryItem
23 βββ product
24 βββ quantity
25
26Order
27 βββ id
28 βββ user
29 βββ List<OrderItem>
30 βββ store
31 βββ status
32 βββ payment
33 βββ deliveryPartner
34
35DeliveryPartner
36 βββ id
37 βββ name
38 βββ currentLocation
39 βββ availabilityStatusπ Typical Flow
ποΈ Order Placement
System:
π Delivery Flow
π Concurrency & Safety
π§ Possible Extensions
β Final Summary:
Design a Quick Commerce System that allows users to:
Focus on object modeling, state management, and inventory logic, not on scaling or microservice design.