# mit-patil/quickbite architecture

> Architecture diagram of the GitHub repository mit-patil/quickbite, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mit-patil/quickbite
- Repository: https://github.com/mit-patil/quickbite

## Overview

QuickBite is a multi-role food-ordering platform: customers browse restaurants, manage carts, place and pay for orders; restaurant owners manage restaurants and menus; delivery partners share locations for assignment. The repository separates the web client, user management, restaurant/order operations, payments, and delivery matching. The sampled code confirms routing and selected service calls, but the README is empty and many integrations are unsampled, so cross-service links are omitted where their runtime wiring is not evidenced.

Main entry points: [`quickbite-frontend/src/App.jsx`](https://github.com/mit-patil/quickbite/blob/main/quickbite-frontend/src/App.jsx) (Role-based app), [`delivery-matching-service/src/services/matchingService.js`](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/services/matchingService.js) (Order matching), [`payment-service/src/controllers/paymentController.js`](https://github.com/mit-patil/quickbite/blob/main/payment-service/src/controllers/paymentController.js) (Charge and refund), [`delivery-matching-service/src/controllers/partnerController.js`](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/controllers/partnerController.js) (Location actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web_app["Role-based app<br/>[App.jsx]"]
  node_customer_pages["Customer ordering"]
  node_owner_pages["Restaurant management"]
  node_delivery_pages["Delivery workspace"]
end

subgraph group_identity["User management"]
  node_user_api["User endpoints"]
  node_user_service["Accounts and profiles<br/>[UserService.java]"]
end

subgraph group_orders["Restaurant and orders"]
  node_order_api["Restaurant and cart API"]
  node_menu_api["Menu management API"]
  node_menu_service["Menu and options"]
  node_order_service["Order lifecycle<br/>[OrderService.java]"]
end

subgraph group_payments["Payments"]
  node_payment_api["Payment routes<br/>[paymentRoutes.js]"]
  node_payment_controller["Charge and refund"]
  node_payment_records[("Payment records<br/>[Payment.js]")]
  node_payment_events["Payment event publisher"]
end

subgraph group_delivery["Delivery matching"]
  node_partner_routes["Partner endpoints<br/>[partnerRoutes.js]"]
  node_partner_controller["Location actions"]
  node_location_service["Partner locations<br/>[locationService.js]"]
  node_matching_service["Order matching<br/>[matchingService.js]"]
  node_redis[("Redis state<br/>[redis.js]")]
  node_restaurant_client["Restaurant lookup"]
  node_retry_queue["Retry queue<br/>[retryQueue.js]"]
  node_delivery_events["Delivery event producer<br/>[producer.js]"]
end

node_customer(("Customer"))
node_restaurant_owner(("Restaurant owner"))
node_delivery_partner(("Delivery partner"))

node_customer -->|"uses"| node_web_app
node_restaurant_owner -->|"uses"| node_web_app
node_delivery_partner -->|"uses"| node_web_app
node_web_app -->|"routes to"| node_customer_pages
node_web_app -->|"routes to"| node_owner_pages
node_web_app -->|"routes to"| node_delivery_pages
node_user_api -->|"calls"| node_user_service
node_menu_api -->|"calls"| node_menu_service
node_payment_api -->|"routes to"| node_payment_controller
node_payment_controller -->|"reads and writes"| node_payment_records
node_payment_controller -->|"publishes"| node_payment_events
node_partner_routes -->|"routes to"| node_partner_controller
node_partner_controller -->|"calls"| node_location_service
node_matching_service -->|"reads and writes"| node_redis
node_matching_service -->|"queries and claims"| node_location_service
node_matching_service -->|"fetches location"| node_restaurant_client
node_matching_service -->|"schedules retries"| node_retry_queue
node_matching_service -->|"publishes events"| node_delivery_events

click node_web_app "https://github.com/mit-patil/quickbite/blob/main/quickbite-frontend/src/App.jsx"
click node_customer_pages "https://github.com/mit-patil/quickbite/tree/main/quickbite-frontend/src/pages/customer"
click node_owner_pages "https://github.com/mit-patil/quickbite/tree/main/quickbite-frontend/src/pages/restaurant-owner"
click node_delivery_pages "https://github.com/mit-patil/quickbite/tree/main/quickbite-frontend/src/pages/delivery"
click node_user_api "https://github.com/mit-patil/quickbite/blob/main/user-service/src/main/java/com/quickbite/user_service/controller/UserController.java"
click node_user_service "https://github.com/mit-patil/quickbite/blob/main/user-service/src/main/java/com/quickbite/user_service/service/UserService.java"
click node_order_api "https://github.com/mit-patil/quickbite/tree/main/restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/controller"
click node_menu_api "https://github.com/mit-patil/quickbite/blob/main/restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/controller/MenuItemController.java"
click node_menu_service "https://github.com/mit-patil/quickbite/blob/main/restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/service/MenuItemService.java"
click node_order_service "https://github.com/mit-patil/quickbite/blob/main/restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/service/OrderService.java"
click node_payment_api "https://github.com/mit-patil/quickbite/blob/main/payment-service/src/routes/paymentRoutes.js"
click node_payment_controller "https://github.com/mit-patil/quickbite/blob/main/payment-service/src/controllers/paymentController.js"
click node_payment_records "https://github.com/mit-patil/quickbite/blob/main/payment-service/src/models/Payment.js"
click node_payment_events "https://github.com/mit-patil/quickbite/blob/main/payment-service/src/kafka/paymentEventPublisher.js"
click node_partner_routes "https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/routes/partnerRoutes.js"
click node_partner_controller "https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/controllers/partnerController.js"
click node_location_service "https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/services/locationService.js"
click node_matching_service "https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/services/matchingService.js"
click node_redis "https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/config/redis.js"
click node_restaurant_client "https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/clients/restaurantClient.js"
click node_retry_queue "https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/services/retryQueue.js"
click node_delivery_events "https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/kafka/producer.js"

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_web_app,node_customer_pages,node_owner_pages,node_delivery_pages toneBlue
class node_user_api,node_user_service toneAmber
class node_order_api,node_menu_api,node_menu_service,node_order_service toneMint
class node_payment_api,node_payment_controller,node_payment_records,node_payment_events toneRose
class node_partner_routes,node_partner_controller,node_location_service,node_matching_service,node_redis,node_restaurant_client,node_retry_queue,node_delivery_events,node_customer,node_restaurant_owner,node_delivery_partner toneIndigo
```

## Components

### Web client

- [Role-based app](https://github.com/mit-patil/quickbite/blob/main/quickbite-frontend/src/App.jsx): `quickbite-frontend/src/App.jsx`
- [Customer ordering](https://github.com/mit-patil/quickbite/tree/main/quickbite-frontend/src/pages/customer): `quickbite-frontend/src/pages/customer`
- [Restaurant management](https://github.com/mit-patil/quickbite/tree/main/quickbite-frontend/src/pages/restaurant-owner): `quickbite-frontend/src/pages/restaurant-owner`
- [Delivery workspace](https://github.com/mit-patil/quickbite/tree/main/quickbite-frontend/src/pages/delivery): `quickbite-frontend/src/pages/delivery`

### User management

- [User endpoints](https://github.com/mit-patil/quickbite/blob/main/user-service/src/main/java/com/quickbite/user_service/controller/UserController.java): `user-service/src/main/java/com/quickbite/user_service/controller/UserController.java`
- [Accounts and profiles](https://github.com/mit-patil/quickbite/blob/main/user-service/src/main/java/com/quickbite/user_service/service/UserService.java): `user-service/src/main/java/com/quickbite/user_service/service/UserService.java`

### Restaurant and orders

- [Restaurant and cart API](https://github.com/mit-patil/quickbite/tree/main/restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/controller): `restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/controller`
- [Menu management API](https://github.com/mit-patil/quickbite/blob/main/restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/controller/MenuItemController.java): `restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/controller/MenuItemController.java`
- [Menu and options](https://github.com/mit-patil/quickbite/blob/main/restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/service/MenuItemService.java): `restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/service/MenuItemService.java`
- [Order lifecycle](https://github.com/mit-patil/quickbite/blob/main/restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/service/OrderService.java): `restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/service/OrderService.java`

### Payments

- [Payment routes](https://github.com/mit-patil/quickbite/blob/main/payment-service/src/routes/paymentRoutes.js): `payment-service/src/routes/paymentRoutes.js`
- [Charge and refund](https://github.com/mit-patil/quickbite/blob/main/payment-service/src/controllers/paymentController.js): `payment-service/src/controllers/paymentController.js`
- [Payment records](https://github.com/mit-patil/quickbite/blob/main/payment-service/src/models/Payment.js): `payment-service/src/models/Payment.js`
- [Payment event publisher](https://github.com/mit-patil/quickbite/blob/main/payment-service/src/kafka/paymentEventPublisher.js): `payment-service/src/kafka/paymentEventPublisher.js`

### Delivery matching

- [Partner endpoints](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/routes/partnerRoutes.js): `delivery-matching-service/src/routes/partnerRoutes.js`
- [Location actions](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/controllers/partnerController.js): `delivery-matching-service/src/controllers/partnerController.js`
- [Partner locations](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/services/locationService.js): `delivery-matching-service/src/services/locationService.js`
- [Order matching](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/services/matchingService.js): `delivery-matching-service/src/services/matchingService.js`
- [Redis state](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/config/redis.js): `delivery-matching-service/src/config/redis.js`
- [Restaurant lookup](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/clients/restaurantClient.js): `delivery-matching-service/src/clients/restaurantClient.js`
- [Retry queue](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/services/retryQueue.js): `delivery-matching-service/src/services/retryQueue.js`
- [Delivery event producer](https://github.com/mit-patil/quickbite/blob/main/delivery-matching-service/src/kafka/producer.js): `delivery-matching-service/src/kafka/producer.js`

### Other components

- **Customer**
- **Restaurant owner**
- **Delivery partner**

## Connections

- Customer → Role-based app: uses (evidence: `quickbite-frontend/src/App.jsx`)
- Restaurant owner → Role-based app: uses (evidence: `quickbite-frontend/src/App.jsx`)
- Delivery partner → Role-based app: uses (evidence: `quickbite-frontend/src/App.jsx`)
- Role-based app → Customer ordering: routes to (evidence: `quickbite-frontend/src/App.jsx`)
- Role-based app → Restaurant management: routes to (evidence: `quickbite-frontend/src/App.jsx`)
- Role-based app → Delivery workspace: routes to (evidence: `quickbite-frontend/src/App.jsx`)
- User endpoints → Accounts and profiles: calls (evidence: `user-service/src/main/java/com/quickbite/user_service/controller/UserController.java`)
- Menu management API → Menu and options: calls (evidence: `restaurant-order-service/src/main/java/com/quickbite/restaurant_order_service/controller/MenuItemController.java`)
- Payment routes → Charge and refund: routes to (evidence: `payment-service/src/routes/paymentRoutes.js`)
- Charge and refund → Payment records: reads and writes (evidence: `payment-service/src/controllers/paymentController.js`)
- Charge and refund → Payment event publisher: publishes (evidence: `payment-service/src/controllers/paymentController.js`)
- Partner endpoints → Location actions: routes to (evidence: `delivery-matching-service/src/routes/partnerRoutes.js`)
- Location actions → Partner locations: calls (evidence: `delivery-matching-service/src/controllers/partnerController.js`)
- Order matching → Redis state: reads and writes (evidence: `delivery-matching-service/src/services/matchingService.js`)
- Order matching → Partner locations: queries and claims (evidence: `delivery-matching-service/src/services/matchingService.js`)
- Order matching → Restaurant lookup: fetches location (evidence: `delivery-matching-service/src/services/matchingService.js`)
- Order matching → Retry queue: schedules retries (evidence: `delivery-matching-service/src/services/matchingService.js`)
- Order matching → Delivery event producer: publishes events (evidence: `delivery-matching-service/src/services/matchingService.js`)
