# mulgold/group-7---gipskitchen-repo. architecture

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

- Interactive diagram: https://gitdiagram.com/mulgold/group-7---gipskitchen-repo.
- Repository: https://github.com/mulgold/group-7---gipskitchen-repo.

## Overview

This is a restaurant ordering and operations application: customers browse a menu, manage a cart, and place or track orders, while staff and administrators use point-of-sale, inventory, menu, account, and reporting features. The React app routes these experiences and provides shared authentication and cart state; API services communicate with an Express/MongoDB backend. The sampled excerpts show routing, selected API behavior, and order-side email calls; several page and route implementations were not sampled, so their internal links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/App.tsx) (Route application), [`src/api/productService.ts`](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/api/productService.ts) (Product API service), [`server/routes/orderRoutes.ts`](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server/routes/orderRoutes.ts) (Order operations), [`src/api/orderService.ts`](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/api/orderService.ts) (Order API service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Route application<br/>[App.tsx]"]
  node_auth["Authentication state<br/>[AuthContext.tsx]"]
end

subgraph group_customer["Customer ordering"]
  node_cart["Cart state<br/>[CartContext.tsx]"]
  node_catalog["Menu browsing<br/>[Catalog.tsx]"]
  node_checkout["Checkout<br/>[Checkout.tsx]"]
  node_customerorders["Customer order history"]
  node_customerdashboard["Customer dashboard"]
end

subgraph group_operations["Staff operations"]
  node_pos["Point of sale<br/>[POS.tsx]"]
  node_menuadmin["Menu management<br/>[ManageMenu.tsx]"]
  node_inventoryadmin["Inventory management"]
  node_reporting["Sales reporting<br/>[SalesReport.tsx]"]
  node_accounts["Account management"]
end

subgraph group_backend["Backend services"]
  node_productsapi["Product API service<br/>[productService.ts]"]
  node_inventoryapi["Inventory API service"]
  node_ordersapi["Order API service<br/>[orderService.ts]"]
  node_server["HTTP server<br/>[server.ts]"]
  node_orderroute["Order operations<br/>[orderRoutes.ts]"]
end

subgraph group_data["Persistence and messaging"]
  node_email["Order email<br/>[email.ts]"]
  node_database[("MongoDB and fallback state<br/>[db.ts]")]
end

node_user(("Customer or staff"))

node_user -.->|"uses"| node_app
node_app -->|"provides state"| node_auth
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_pos
node_app -->|"routes to"| node_menuadmin
node_app -->|"routes to"| node_inventoryadmin
node_app -->|"routes to"| node_accounts
node_app -->|"routes to"| node_customerorders
node_cart -->|"reads user"| node_auth
node_customerdashboard -->|"uses"| node_ordersapi
node_customerdashboard -->|"uses"| node_productsapi
node_pos -->|"fetches products"| node_productsapi
node_pos -->|"submits orders"| node_ordersapi
node_menuadmin -->|"manages products"| node_productsapi
node_menuadmin -->|"reads inventory"| node_inventoryapi
node_inventoryadmin -->|"manages stock"| node_inventoryapi
node_reporting -->|"loads sales"| node_ordersapi
node_reporting -->|"loads products"| node_productsapi
node_reporting -->|"loads inventory"| node_inventoryapi
node_productsapi -->|"fetches inventory"| node_inventoryapi
node_ordersapi -.->|"HTTP requests"| node_orderroute
node_server -.->|"registers routes"| node_orderroute
node_orderroute -->|"checks connection"| node_database
node_orderroute -->|"sends status email"| node_email

click node_app "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/App.tsx"
click node_auth "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/context/AuthContext.tsx"
click node_cart "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/context/CartContext.tsx"
click node_catalog "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/Catalog.tsx"
click node_checkout "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/Checkout.tsx"
click node_customerorders "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/CustomerOrderHistory.tsx"
click node_customerdashboard "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/components/CustomerDashboard.tsx"
click node_pos "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/POS.tsx"
click node_menuadmin "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/ManageMenu.tsx"
click node_inventoryadmin "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/ManageInventory.tsx"
click node_reporting "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/SalesReport.tsx"
click node_accounts "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/AccountManagement.tsx"
click node_productsapi "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/api/productService.ts"
click node_inventoryapi "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/api/inventoryService.ts"
click node_ordersapi "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/api/orderService.ts"
click node_server "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server.ts"
click node_orderroute "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server/routes/orderRoutes.ts"
click node_email "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server/email.ts"
click node_database "https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server/db.ts"

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_auth toneBlue
class node_cart,node_catalog,node_checkout,node_customerorders,node_customerdashboard toneAmber
class node_pos,node_menuadmin,node_inventoryadmin,node_reporting,node_accounts toneMint
class node_productsapi,node_inventoryapi,node_ordersapi,node_server,node_orderroute toneRose
class node_email,node_database,node_user toneIndigo
```

## Components

### Web application

- [Route application](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/App.tsx): `src/App.tsx`
- [Authentication state](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`

### Customer ordering

- [Cart state](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/context/CartContext.tsx): `src/context/CartContext.tsx`
- [Menu browsing](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/Catalog.tsx): `src/pages/Catalog.tsx`
- [Checkout](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/Checkout.tsx): `src/pages/Checkout.tsx`
- [Customer order history](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/CustomerOrderHistory.tsx): `src/pages/CustomerOrderHistory.tsx`
- [Customer dashboard](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/components/CustomerDashboard.tsx): `src/components/CustomerDashboard.tsx`

### Staff operations

- [Point of sale](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/POS.tsx): `src/pages/POS.tsx`
- [Menu management](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/ManageMenu.tsx): `src/pages/ManageMenu.tsx`
- [Inventory management](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/ManageInventory.tsx): `src/pages/ManageInventory.tsx`
- [Sales reporting](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/SalesReport.tsx): `src/pages/SalesReport.tsx`
- [Account management](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/pages/AccountManagement.tsx): `src/pages/AccountManagement.tsx`

### Backend services

- [Product API service](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/api/productService.ts): `src/api/productService.ts`
- [Inventory API service](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/api/inventoryService.ts): `src/api/inventoryService.ts`
- [Order API service](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/src/api/orderService.ts): `src/api/orderService.ts`
- [HTTP server](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server.ts): `server.ts`
- [Order operations](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server/routes/orderRoutes.ts): `server/routes/orderRoutes.ts`

### Persistence and messaging

- [Order email](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server/email.ts): `server/email.ts`
- [MongoDB and fallback state](https://github.com/mulgold/group-7---gipskitchen-repo./blob/main/server/db.ts): `server/db.ts`

### Other components

- **Customer or staff**

## Connections

- Customer or staff → Route application: uses
- Route application → Authentication state: provides state (evidence: `src/App.tsx`)
- Route application → Menu browsing: routes to (evidence: `src/App.tsx`)
- Route application → Checkout: routes to (evidence: `src/App.tsx`)
- Route application → Point of sale: routes to (evidence: `src/App.tsx`)
- Route application → Menu management: routes to (evidence: `src/App.tsx`)
- Route application → Inventory management: routes to (evidence: `src/App.tsx`)
- Route application → Account management: routes to (evidence: `src/App.tsx`)
- Route application → Customer order history: routes to (evidence: `src/App.tsx`)
- Cart state → Authentication state: reads user (evidence: `src/context/CartContext.tsx`)
- Customer dashboard → Order API service: uses (evidence: `src/components/CustomerDashboard.tsx`)
- Customer dashboard → Product API service: uses (evidence: `src/components/CustomerDashboard.tsx`)
- Point of sale → Product API service: fetches products (evidence: `src/pages/POS.tsx`)
- Point of sale → Order API service: submits orders (evidence: `src/pages/POS.tsx`)
- Menu management → Product API service: manages products (evidence: `src/pages/ManageMenu.tsx`)
- Menu management → Inventory API service: reads inventory (evidence: `src/pages/ManageMenu.tsx`)
- Inventory management → Inventory API service: manages stock (evidence: `src/pages/ManageInventory.tsx`)
- Sales reporting → Order API service: loads sales (evidence: `src/pages/SalesReport.tsx`)
- Sales reporting → Product API service: loads products (evidence: `src/pages/SalesReport.tsx`)
- Sales reporting → Inventory API service: loads inventory (evidence: `src/pages/SalesReport.tsx`)
- Product API service → Inventory API service: fetches inventory (evidence: `src/api/productService.ts`)
- Order API service → Order operations: HTTP requests
- HTTP server → Order operations: registers routes (evidence: `server.ts`)
- Order operations → MongoDB and fallback state: checks connection (evidence: `server/routes/orderRoutes.ts`)
- Order operations → Order email: sends status email (evidence: `server/routes/orderRoutes.ts`)
