# arpitkhurana22/ubereats-lld architecture

> Architecture diagram of the GitHub repository arpitkhurana22/ubereats-lld, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arpitkhurana22/ubereats-lld
- Repository: https://github.com/arpitkhurana22/ubereats-lld

## Overview

This is a Spring-style food-delivery application whose documented workflow covers restaurant discovery and menus, cart management, ordering, coupons and billing, payment, and order-status checks. The tree separates HTTP controllers, services, domain models, and datastore classes. No Java source excerpts were provided, so internal calls and persistence behavior cannot be verified; the dashed links indicate likely boundaries, not inspected call paths. Feature links from the user are grounded in the README’s requirements.

Main entry points: [`src/main/java/com/example/UberEats/Datastore`](https://github.com/arpitkhurana22/ubereats-lld/tree/main/src/main/java/com/example/UberEats/Datastore) (Datastore classes), [`src/main/java/com/example/UberEats/Services/OrderService.java`](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/OrderService.java) (Order service), [`src/main/java/com/example/UberEats/Services/PricingService.java`](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/PricingService.java) (Pricing service), [`src/main/java/com/example/UberEats/Services/PaymentService.java`](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/PaymentService.java) (Payment service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API controllers"]
  node_users_api["User API"]
  node_restaurants_api["Restaurant API"]
  node_menu_api["Food menu API"]
  node_cart_api["Cart API"]
  node_order_api["Order API"]
  node_pricing_api["Pricing API"]
  node_payment_api["Payment API"]
end

subgraph group_services["Application services"]
  node_user_service["User service<br/>[UserService.java]"]
  node_restaurant_service["Restaurant service"]
  node_food_service["Food service<br/>[FoodService.java]"]
  node_cart_service["Cart service<br/>[CartService.java]"]
  node_order_service["Order service<br/>[OrderService.java]"]
  node_pricing_service["Pricing service"]
  node_payment_service["Payment service"]
end

subgraph group_domain["Domain models"]
  node_domain_models["Order, bill, payment, cart, restaurant, user, food and address models"]
end

subgraph group_data["Datastore classes"]
  node_datastore["Datastore classes"]
end

node_user(("User"))

node_user -->|"manage profile"| node_users_api
node_user -->|"search restaurants"| node_restaurants_api
node_user -->|"register restaurant"| node_restaurants_api
node_user -->|"browse menus"| node_menu_api
node_user -->|"manage cart"| node_cart_api
node_user -->|"place or cancel"| node_order_api
node_user -->|"check status"| node_order_api
node_user -->|"apply coupons"| node_pricing_api
node_user -->|"make payment"| node_payment_api
node_users_api -.->|"delegates"| node_user_service
node_restaurants_api -.->|"delegates"| node_restaurant_service
node_menu_api -.->|"delegates"| node_food_service
node_cart_api -.->|"delegates"| node_cart_service
node_order_api -.->|"delegates"| node_order_service
node_pricing_api -.->|"delegates"| node_pricing_service
node_payment_api -.->|"delegates"| node_payment_service
node_user_service -.->|"uses"| node_datastore
node_restaurant_service -.->|"uses"| node_datastore
node_food_service -.->|"uses"| node_datastore
node_cart_service -.->|"uses"| node_datastore
node_order_service -.->|"uses"| node_datastore
node_pricing_service -.->|"uses"| node_datastore
node_payment_service -.->|"uses"| node_datastore
node_order_service -.->|"uses"| node_domain_models
node_pricing_service -.->|"uses"| node_domain_models
node_payment_service -.->|"uses"| node_domain_models

click node_users_api "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/UserController.java"
click node_restaurants_api "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/RestaurantController.java"
click node_menu_api "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/FoodMenuController.java"
click node_cart_api "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/CartController.java"
click node_order_api "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/OrderController.java"
click node_pricing_api "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/PricingController.java"
click node_payment_api "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/PaymentController.java"
click node_user_service "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/UserService.java"
click node_restaurant_service "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/RestaurantService.java"
click node_food_service "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/FoodService.java"
click node_cart_service "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/CartService.java"
click node_order_service "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/OrderService.java"
click node_pricing_service "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/PricingService.java"
click node_payment_service "https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/PaymentService.java"
click node_domain_models "https://github.com/arpitkhurana22/ubereats-lld/tree/main/src/main/java/com/example/UberEats/Models"
click node_datastore "https://github.com/arpitkhurana22/ubereats-lld/tree/main/src/main/java/com/example/UberEats/Datastore"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_users_api,node_restaurants_api,node_menu_api,node_cart_api,node_order_api,node_pricing_api,node_payment_api,node_user toneBlue
class node_user_service,node_restaurant_service,node_food_service,node_cart_service,node_order_service,node_pricing_service,node_payment_service toneAmber
class node_domain_models toneMint
class node_datastore toneRose
```

## Components

### API controllers

- [User API](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/UserController.java): `src/main/java/com/example/UberEats/Controller/UserController.java`
- [Restaurant API](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/RestaurantController.java): `src/main/java/com/example/UberEats/Controller/RestaurantController.java`
- [Food menu API](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/FoodMenuController.java): `src/main/java/com/example/UberEats/Controller/FoodMenuController.java`
- [Cart API](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/CartController.java): `src/main/java/com/example/UberEats/Controller/CartController.java`
- [Order API](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/OrderController.java): `src/main/java/com/example/UberEats/Controller/OrderController.java`
- [Pricing API](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/PricingController.java): `src/main/java/com/example/UberEats/Controller/PricingController.java`
- [Payment API](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Controller/PaymentController.java): `src/main/java/com/example/UberEats/Controller/PaymentController.java`

### Application services

- [User service](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/UserService.java): `src/main/java/com/example/UberEats/Services/UserService.java`
- [Restaurant service](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/RestaurantService.java): `src/main/java/com/example/UberEats/Services/RestaurantService.java`
- [Food service](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/FoodService.java): `src/main/java/com/example/UberEats/Services/FoodService.java`
- [Cart service](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/CartService.java): `src/main/java/com/example/UberEats/Services/CartService.java`
- [Order service](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/OrderService.java): `src/main/java/com/example/UberEats/Services/OrderService.java`
- [Pricing service](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/PricingService.java): `src/main/java/com/example/UberEats/Services/PricingService.java`
- [Payment service](https://github.com/arpitkhurana22/ubereats-lld/blob/main/src/main/java/com/example/UberEats/Services/PaymentService.java): `src/main/java/com/example/UberEats/Services/PaymentService.java`

### Domain models

- [Order, bill, payment, cart, restaurant, user, food and address models](https://github.com/arpitkhurana22/ubereats-lld/tree/main/src/main/java/com/example/UberEats/Models): `src/main/java/com/example/UberEats/Models`

### Datastore classes

- [Datastore classes](https://github.com/arpitkhurana22/ubereats-lld/tree/main/src/main/java/com/example/UberEats/Datastore): `src/main/java/com/example/UberEats/Datastore`

### Other components

- **User**

## Connections

- User → User API: manage profile (evidence: `README.md`)
- User → Restaurant API: search restaurants (evidence: `README.md`)
- User → Restaurant API: register restaurant (evidence: `README.md`)
- User → Food menu API: browse menus (evidence: `README.md`)
- User → Cart API: manage cart (evidence: `README.md`)
- User → Order API: place or cancel (evidence: `README.md`)
- User → Order API: check status (evidence: `README.md`)
- User → Pricing API: apply coupons (evidence: `README.md`)
- User → Payment API: make payment (evidence: `README.md`)
- User API → User service: delegates
- Restaurant API → Restaurant service: delegates
- Food menu API → Food service: delegates
- Cart API → Cart service: delegates
- Order API → Order service: delegates
- Pricing API → Pricing service: delegates
- Payment API → Payment service: delegates
- User service → Datastore classes: uses
- Restaurant service → Datastore classes: uses
- Food service → Datastore classes: uses
- Cart service → Datastore classes: uses
- Order service → Datastore classes: uses
- Pricing service → Datastore classes: uses
- Payment service → Datastore classes: uses
- Order service → Order, bill, payment, cart, restaurant, user, food and address models: uses
- Pricing service → Order, bill, payment, cart, restaurant, user, food and address models: uses
- Payment service → Order, bill, payment, cart, restaurant, user, food and address models: uses
