Design Online Food Delivery Service like Swiggy
| Difficulty: Hard | Source: awesome-low-level-design |
Requirements
- Browse restaurants, view menus, place orders
- Restaurants manage menus, prices, availability
- Delivery agents accept and fulfill orders
- Order tracking and status updates
- Multiple payment methods
- Concurrent orders
- Scalable
- Real-time notifications
Class Diagram

Classes, Interfaces and Enumerations
| Class/Interface | Description |
|---|---|
| Customer | Id, name, email, phone |
| Restaurant | Id, name, address, menu items list |
| MenuItem | Id, name, description, price, availability |
| Order | Id, customer, restaurant, items, status, delivery agent |
| OrderItem | Menu item, quantity |
| OrderStatus | Enum: PENDING, CONFIRMED, PREPARING, OUT_FOR_DELIVERY, DELIVERED, CANCELLED |
| DeliveryAgent | Id, name, phone, availability |
| FoodDeliveryService | Singleton |
Design Patterns Used
| Pattern | Application |
|---|---|
| Singleton | FoodDeliveryService provides centralized coordination for restaurants, orders, delivery agents, and customers |
Code Implementations
| Language | Source Code |
|---|---|
| Java | View on GitHub |
| Python | View on GitHub |
| C++ | View on GitHub |
| C# | View on GitHub |
| Go | View on GitHub |