# kubekitchen/kubekitchen-app architecture

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

- Interactive diagram: https://gitdiagram.com/kubekitchen/kubekitchen-app
- Repository: https://github.com/kubekitchen/kubekitchen-app

## Overview

This is a food-ordering application with a React frontend and separate authentication, restaurant, menu, and order services. The user-facing flow covers account registration or login, browsing restaurants and menus, building a cart, and viewing orders; backend routes provide restaurant and menu management, ratings, and order status operations. The source excerpts show frontend routing/API setup and several service route-to-model calls. Service-to-service and deployed HTTP wiring are not shown, so those connections are omitted.

Main entry points: [`services/frontend/src/App.jsx`](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/App.jsx) (App routing), [`services/frontend/src/api/axios.js`](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/api/axios.js) (API client), [`services/frontend/src/context/AuthContext.jsx`](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/context/AuthContext.jsx) (Auth state), [`services/frontend/src/pages/Restaurants.jsx`](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Restaurants.jsx) (Restaurant browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Customer frontend"]
  node_app["App routing<br/>[App.jsx]"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_cartstate["Cart state<br/>[CartContext.jsx]"]
  node_api["API client<br/>[axios.js]"]
  node_home["Home page<br/>[Home.jsx]"]
  node_login["Login page<br/>[Login.jsx]"]
  node_register["Register page<br/>[Register.jsx]"]
  node_restaurants["Restaurant browsing<br/>[Restaurants.jsx]"]
  node_restaurantmenu["Menu browsing<br/>[RestaurantMenu.jsx]"]
  node_cartui["Cart sidebar<br/>[CartSidebar.jsx]"]
  node_ordersui["Order history<br/>[Orders.jsx]"]
end

subgraph group_auth["Authentication service"]
  node_authroutes["Auth routes<br/>[auth.js]"]
  node_users[("User records<br/>[User.js]")]
end

subgraph group_restaurant["Restaurant service"]
  node_restroutes["Restaurant routes<br/>[restaurant.js]"]
  node_restaurantrecords[("Restaurant records<br/>[Restaurant.js]")]
end

subgraph group_menu["Menu service"]
  node_menuroutes["Menu routes<br/>[menu.js]"]
  node_menurecords[("Menu records<br/>[Menu.js]")]
end

subgraph group_orders["Order service"]
  node_orderroutes["Order routes<br/>[order.js]"]
  node_orderrecords[("Order records<br/>[Order.js]")]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_app
node_app -->|"provides auth"| node_authstate
node_app -->|"provides cart"| node_cartstate
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_restaurants
node_app -->|"routes to"| node_restaurantmenu
node_app -->|"routes to"| node_ordersui
node_authstate -->|"calls"| node_api
node_restaurants -->|"calls"| node_api
node_restaurantmenu -->|"calls"| node_api
node_ordersui -->|"calls"| node_api
node_cartui -->|"reads and updates"| node_cartstate
node_authroutes -->|"reads and writes"| node_users
node_restroutes -->|"reads and writes"| node_restaurantrecords
node_menuroutes -->|"reads and writes"| node_menurecords
node_orderroutes -->|"reads and writes"| node_orderrecords
node_api -.->|"HTTP mapping"| node_authroutes
node_api -.->|"HTTP mapping"| node_restroutes
node_api -.->|"HTTP mapping"| node_menuroutes
node_api -.->|"HTTP mapping"| node_orderroutes

click node_app "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/App.jsx"
click node_authstate "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/context/AuthContext.jsx"
click node_cartstate "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/context/CartContext.jsx"
click node_api "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/api/axios.js"
click node_home "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Home.jsx"
click node_login "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Login.jsx"
click node_register "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Register.jsx"
click node_restaurants "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Restaurants.jsx"
click node_restaurantmenu "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/RestaurantMenu.jsx"
click node_cartui "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/components/CartSidebar.jsx"
click node_ordersui "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Orders.jsx"
click node_authroutes "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/auth-service/src/routes/auth.js"
click node_users "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/auth-service/src/models/User.js"
click node_restroutes "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/restaurant-service/src/routes/restaurant.js"
click node_restaurantrecords "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/restaurant-service/src/models/Restaurant.js"
click node_menuroutes "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/menu-service/src/routes/menu.js"
click node_menurecords "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/menu-service/src/models/Menu.js"
click node_orderroutes "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/order-service/src/routes/order.js"
click node_orderrecords "https://github.com/kubekitchen/kubekitchen-app/blob/main/services/order-service/src/models/Order.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_app,node_authstate,node_cartstate,node_api,node_home,node_login,node_register,node_restaurants,node_restaurantmenu,node_cartui,node_ordersui toneBlue
class node_authroutes,node_users toneAmber
class node_restroutes,node_restaurantrecords toneMint
class node_menuroutes,node_menurecords toneRose
class node_orderroutes,node_orderrecords,node_customer toneIndigo
```

## Components

### Customer frontend

- [App routing](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/App.jsx): `services/frontend/src/App.jsx`
- [Auth state](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/context/AuthContext.jsx): `services/frontend/src/context/AuthContext.jsx`
- [Cart state](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/context/CartContext.jsx): `services/frontend/src/context/CartContext.jsx`
- [API client](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/api/axios.js): `services/frontend/src/api/axios.js`
- [Home page](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Home.jsx): `services/frontend/src/pages/Home.jsx`
- [Login page](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Login.jsx): `services/frontend/src/pages/Login.jsx`
- [Register page](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Register.jsx): `services/frontend/src/pages/Register.jsx`
- [Restaurant browsing](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Restaurants.jsx): `services/frontend/src/pages/Restaurants.jsx`
- [Menu browsing](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/RestaurantMenu.jsx): `services/frontend/src/pages/RestaurantMenu.jsx`
- [Cart sidebar](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/components/CartSidebar.jsx): `services/frontend/src/components/CartSidebar.jsx`
- [Order history](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/frontend/src/pages/Orders.jsx): `services/frontend/src/pages/Orders.jsx`

### Authentication service

- [Auth routes](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/auth-service/src/routes/auth.js): `services/auth-service/src/routes/auth.js`
- [User records](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/auth-service/src/models/User.js): `services/auth-service/src/models/User.js`

### Restaurant service

- [Restaurant routes](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/restaurant-service/src/routes/restaurant.js): `services/restaurant-service/src/routes/restaurant.js`
- [Restaurant records](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/restaurant-service/src/models/Restaurant.js): `services/restaurant-service/src/models/Restaurant.js`

### Menu service

- [Menu routes](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/menu-service/src/routes/menu.js): `services/menu-service/src/routes/menu.js`
- [Menu records](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/menu-service/src/models/Menu.js): `services/menu-service/src/models/Menu.js`

### Order service

- [Order routes](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/order-service/src/routes/order.js): `services/order-service/src/routes/order.js`
- [Order records](https://github.com/kubekitchen/kubekitchen-app/blob/main/services/order-service/src/models/Order.js): `services/order-service/src/models/Order.js`

### Other components

- **Customer**

## Connections

- Customer → App routing: uses (evidence: `services/frontend/src/App.jsx`)
- App routing → Auth state: provides auth (evidence: `services/frontend/src/App.jsx`)
- App routing → Cart state: provides cart (evidence: `services/frontend/src/App.jsx`)
- App routing → Home page: routes to (evidence: `services/frontend/src/App.jsx`)
- App routing → Login page: routes to (evidence: `services/frontend/src/App.jsx`)
- App routing → Register page: routes to (evidence: `services/frontend/src/App.jsx`)
- App routing → Restaurant browsing: routes to (evidence: `services/frontend/src/App.jsx`)
- App routing → Menu browsing: routes to (evidence: `services/frontend/src/App.jsx`)
- App routing → Order history: routes to (evidence: `services/frontend/src/App.jsx`)
- Auth state → API client: calls (evidence: `services/frontend/src/context/AuthContext.jsx`)
- Restaurant browsing → API client: calls (evidence: `services/frontend/src/pages/Restaurants.jsx`)
- Menu browsing → API client: calls (evidence: `services/frontend/src/pages/RestaurantMenu.jsx`)
- Order history → API client: calls (evidence: `services/frontend/src/pages/Orders.jsx`)
- Cart sidebar → Cart state: reads and updates (evidence: `services/frontend/src/components/CartSidebar.jsx`)
- Auth routes → User records: reads and writes (evidence: `services/auth-service/src/routes/auth.js`)
- Restaurant routes → Restaurant records: reads and writes (evidence: `services/restaurant-service/src/routes/restaurant.js`)
- Menu routes → Menu records: reads and writes (evidence: `services/menu-service/src/routes/menu.js`)
- Order routes → Order records: reads and writes (evidence: `services/order-service/src/routes/order.js`)
- API client → Auth routes: HTTP mapping
- API client → Restaurant routes: HTTP mapping
- API client → Menu routes: HTTP mapping
- API client → Order routes: HTTP mapping
