# johnlorenhabal572-create/gipskit architecture

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

- Interactive diagram: https://gitdiagram.com/johnlorenhabal572-create/gipskit
- Repository: https://github.com/johnlorenhabal572-create/gipskit

## Overview

This is a restaurant ordering and operations application: customers browse a menu, authenticate, manage a cart and place orders; staff and administrators use point-of-sale, inventory, menu, account and reporting screens. The frontend routes these experiences and calls API services, while an Express server handles authentication, orders, products, categories, inventory and notifications, backed by MongoDB when available. The README describes local setup rather than product features, so capability coverage is based on the repository tree and source index. Some page-to-service links are evidenced only by the index, not inspected implementation excerpts.

Main entry points: [`src/App.tsx`](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/App.tsx) (Route Application), [`server.ts`](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server.ts) (HTTP Server), [`src/pages/ManageInventory.tsx`](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/ManageInventory.tsx) (Inventory Management), [`src/api/productService.ts`](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/productService.ts) (Product Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Ordering"]
  node_login["Login Signup<br/>[LoginPages.tsx]"]
  node_catalog["Menu Catalog<br/>[Catalog.tsx]"]
  node_checkout["Checkout<br/>[Checkout.tsx]"]
  node_customerorders["Order History"]
  node_payment["Customer Payment"]
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_reports["Sales Reports<br/>[SalesReport.tsx]"]
  node_accounts["Account Management"]
  node_dashboard["Admin Dashboard<br/>[AdminDashboard.tsx]"]
  node_reorder["Reorder List<br/>[ReorderList.tsx]"]
  node_transactions["Transactions"]
  node_bills["Bills<br/>[MyBill.tsx]"]
end

subgraph group_frontend["Frontend Platform"]
  node_app["Route Application<br/>[App.tsx]"]
  node_authctx["Auth State<br/>[AuthContext.tsx]"]
  node_cartctx["Cart State<br/>[CartContext.tsx]"]
  node_notifications["Notifications"]
  node_confirm["Confirm Dialogs<br/>[ConfirmContext.tsx]"]
  node_customselect["Custom Select<br/>[CustomSelect.tsx]"]
  node_inventoryservice["Inventory Service"]
  node_orderservice["Order Service<br/>[orderService.ts]"]
  node_productservice["Product Service<br/>[productService.ts]"]
  node_notificationservice["Notification Service"]
end

subgraph group_backend["Server API"]
  node_server["HTTP Server<br/>[server.ts]"]
  node_auth["Session Authentication<br/>[auth.ts]"]
  node_email["Email Verification<br/>[email.ts]"]
  node_orderroutes["Order API<br/>[orderRoutes.ts]"]
  node_productroutes["Product API<br/>[productRoutes.ts]"]
  node_inventoryroutes["Inventory API<br/>[inventoryRoutes.ts]"]
  node_categoryroutes["Category API<br/>[categoryRoutes.ts]"]
end

subgraph group_persistence["Persistence"]
  node_database[("MongoDB Store<br/>database")]
end

node_customer(("Customer"))
node_staff(("Staff Admin"))

node_app -->|"provides state"| node_authctx
node_app -->|"provides state"| node_cartctx
node_app -->|"provides state"| node_notifications
node_app -->|"provides state"| node_confirm
node_app -->|"routes to"| node_login
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_customer -.->|"browses"| node_catalog
node_customer -.->|"places order"| node_checkout
node_staff -.->|"uses"| node_pos
node_staff -.->|"manages stock"| node_inventoryadmin
node_login -->|"uses auth"| node_authctx
node_cartctx -->|"reads user"| node_authctx
node_notifications -->|"requests updates"| node_notificationservice
node_inventoryadmin -->|"manages inventory"| node_inventoryservice
node_inventoryadmin -->|"reports updates"| node_notifications
node_inventoryadmin -->|"requests confirmation"| node_confirm
node_inventoryadmin -->|"renders"| node_customselect
node_menuadmin -->|"manages products"| node_productservice
node_menuadmin -->|"uses stock"| node_inventoryservice
node_menuadmin -->|"renders"| node_customselect
node_pos -->|"loads products"| node_productservice
node_pos -->|"submits orders"| node_orderservice
node_pos -->|"uses cart"| node_cartctx
node_reports -->|"fetches sales"| node_orderservice
node_reports -->|"fetches products"| node_productservice
node_reports -->|"fetches stock"| node_inventoryservice
node_productservice -->|"loads stock"| node_inventoryservice
node_orderservice -->|"requests orders"| node_orderroutes
node_productservice -->|"requests products"| node_productroutes
node_productservice -->|"requests categories"| node_categoryroutes
node_inventoryservice -->|"requests inventory"| node_inventoryroutes
node_server -->|"uses sessions"| node_auth
node_server -->|"uses email"| node_email
node_server -->|"registers routes"| node_orderroutes
node_server -->|"registers routes"| node_productroutes
node_server -->|"registers routes"| node_inventoryroutes
node_server -->|"registers routes"| node_categoryroutes
node_orderroutes -->|"checks sessions"| node_auth
node_orderroutes -->|"checks connection"| node_database
node_server -->|"connects database"| node_database

click node_app "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/App.tsx"
click node_login "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/LoginPages.tsx"
click node_catalog "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/Catalog.tsx"
click node_checkout "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/Checkout.tsx"
click node_customerorders "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/CustomerOrderHistory.tsx"
click node_payment "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/CustomerPayment.tsx"
click node_authctx "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/context/AuthContext.tsx"
click node_cartctx "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/context/CartContext.tsx"
click node_notifications "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/context/NotificationContext.tsx"
click node_confirm "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/context/ConfirmContext.tsx"
click node_customselect "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/components/CustomSelect.tsx"
click node_pos "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/POS.tsx"
click node_menuadmin "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/ManageMenu.tsx"
click node_inventoryadmin "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/ManageInventory.tsx"
click node_reports "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/SalesReport.tsx"
click node_accounts "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/AccountManagement.tsx"
click node_dashboard "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/AdminDashboard.tsx"
click node_reorder "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/ReorderList.tsx"
click node_transactions "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/TransactionHistory.tsx"
click node_bills "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/MyBill.tsx"
click node_inventoryservice "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/inventoryService.ts"
click node_orderservice "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/orderService.ts"
click node_productservice "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/productService.ts"
click node_notificationservice "https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/notificationService.ts"
click node_server "https://github.com/johnlorenhabal572-create/gipskit/blob/main/server.ts"
click node_auth "https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/auth.ts"
click node_email "https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/email.ts"
click node_orderroutes "https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/routes/orderRoutes.ts"
click node_productroutes "https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/routes/productRoutes.ts"
click node_inventoryroutes "https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/routes/inventoryRoutes.ts"
click node_categoryroutes "https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/routes/categoryRoutes.ts"
click node_database "https://github.com/johnlorenhabal572-create/gipskit/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_login,node_catalog,node_checkout,node_customerorders,node_payment toneBlue
class node_pos,node_menuadmin,node_inventoryadmin,node_reports,node_accounts,node_dashboard,node_reorder,node_transactions,node_bills toneAmber
class node_app,node_authctx,node_cartctx,node_notifications,node_confirm,node_customselect,node_inventoryservice,node_orderservice,node_productservice,node_notificationservice toneMint
class node_server,node_auth,node_email,node_orderroutes,node_productroutes,node_inventoryroutes,node_categoryroutes toneRose
class node_database,node_customer,node_staff toneIndigo
```

## Components

### Customer Ordering

- [Login Signup](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/LoginPages.tsx): `src/pages/LoginPages.tsx`
- [Menu Catalog](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/Catalog.tsx): `src/pages/Catalog.tsx`
- [Checkout](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/Checkout.tsx): `src/pages/Checkout.tsx`
- [Order History](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/CustomerOrderHistory.tsx): `src/pages/CustomerOrderHistory.tsx`
- [Customer Payment](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/CustomerPayment.tsx): `src/pages/CustomerPayment.tsx`

### Staff Operations

- [Point of Sale](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/POS.tsx): `src/pages/POS.tsx`
- [Menu Management](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/ManageMenu.tsx): `src/pages/ManageMenu.tsx`
- [Inventory Management](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/ManageInventory.tsx): `src/pages/ManageInventory.tsx`
- [Sales Reports](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/SalesReport.tsx): `src/pages/SalesReport.tsx`
- [Account Management](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/AccountManagement.tsx): `src/pages/AccountManagement.tsx`
- [Admin Dashboard](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/AdminDashboard.tsx): `src/pages/AdminDashboard.tsx`
- [Reorder List](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/ReorderList.tsx): `src/pages/ReorderList.tsx`
- [Transactions](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/TransactionHistory.tsx): `src/pages/TransactionHistory.tsx`
- [Bills](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/pages/MyBill.tsx): `src/pages/MyBill.tsx`

### Frontend Platform

- [Route Application](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/App.tsx): `src/App.tsx`
- [Auth State](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Cart State](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/context/CartContext.tsx): `src/context/CartContext.tsx`
- [Notifications](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/context/NotificationContext.tsx): `src/context/NotificationContext.tsx`
- [Confirm Dialogs](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/context/ConfirmContext.tsx): `src/context/ConfirmContext.tsx`
- [Custom Select](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/components/CustomSelect.tsx): `src/components/CustomSelect.tsx`
- [Inventory Service](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/inventoryService.ts): `src/api/inventoryService.ts`
- [Order Service](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/orderService.ts): `src/api/orderService.ts`
- [Product Service](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/productService.ts): `src/api/productService.ts`
- [Notification Service](https://github.com/johnlorenhabal572-create/gipskit/blob/main/src/api/notificationService.ts): `src/api/notificationService.ts`

### Server API

- [HTTP Server](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server.ts): `server.ts`
- [Session Authentication](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/auth.ts): `server/auth.ts`
- [Email Verification](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/email.ts): `server/email.ts`
- [Order API](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/routes/orderRoutes.ts): `server/routes/orderRoutes.ts`
- [Product API](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/routes/productRoutes.ts): `server/routes/productRoutes.ts`
- [Inventory API](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/routes/inventoryRoutes.ts): `server/routes/inventoryRoutes.ts`
- [Category API](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/routes/categoryRoutes.ts): `server/routes/categoryRoutes.ts`

### Persistence

- [MongoDB Store](https://github.com/johnlorenhabal572-create/gipskit/blob/main/server/db.ts): database · `server/db.ts`

### Other components

- **Customer**
- **Staff Admin**

## Connections

- Route Application → Auth State: provides state (evidence: `src/App.tsx`)
- Route Application → Cart State: provides state (evidence: `src/App.tsx`)
- Route Application → Notifications: provides state (evidence: `src/App.tsx`)
- Route Application → Confirm Dialogs: provides state (evidence: `src/App.tsx`)
- Route Application → Login Signup: routes to (evidence: `src/App.tsx`)
- Route Application → Menu Catalog: 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`)
- Customer → Menu Catalog: browses
- Customer → Checkout: places order
- Staff Admin → Point of Sale: uses
- Staff Admin → Inventory Management: manages stock
- Login Signup → Auth State: uses auth (evidence: `src/pages/LoginPages.tsx`)
- Cart State → Auth State: reads user (evidence: `src/context/CartContext.tsx`)
- Notifications → Notification Service: requests updates (evidence: `src/context/NotificationContext.tsx`)
- Inventory Management → Inventory Service: manages inventory (evidence: `src/pages/ManageInventory.tsx`)
- Inventory Management → Notifications: reports updates (evidence: `src/pages/ManageInventory.tsx`)
- Inventory Management → Confirm Dialogs: requests confirmation (evidence: `src/pages/ManageInventory.tsx`)
- Inventory Management → Custom Select: renders (evidence: `src/pages/ManageInventory.tsx`)
- Menu Management → Product Service: manages products (evidence: `src/pages/ManageMenu.tsx`)
- Menu Management → Inventory Service: uses stock (evidence: `src/pages/ManageMenu.tsx`)
- Menu Management → Custom Select: renders (evidence: `src/pages/ManageMenu.tsx`)
- Point of Sale → Product Service: loads products (evidence: `src/pages/POS.tsx`)
- Point of Sale → Order Service: submits orders (evidence: `src/pages/POS.tsx`)
- Point of Sale → Cart State: uses cart (evidence: `src/pages/POS.tsx`)
- Sales Reports → Order Service: fetches sales (evidence: `src/pages/SalesReport.tsx`)
- Sales Reports → Product Service: fetches products (evidence: `src/pages/SalesReport.tsx`)
- Sales Reports → Inventory Service: fetches stock (evidence: `src/pages/SalesReport.tsx`)
- Product Service → Inventory Service: loads stock (evidence: `src/api/productService.ts`)
- Order Service → Order API: requests orders (evidence: `src/api/orderService.ts`)
- Product Service → Product API: requests products (evidence: `src/api/productService.ts`)
- Product Service → Category API: requests categories (evidence: `src/api/productService.ts`)
- Inventory Service → Inventory API: requests inventory (evidence: `src/api/inventoryService.ts`)
- HTTP Server → Session Authentication: uses sessions (evidence: `server.ts`)
- HTTP Server → Email Verification: uses email (evidence: `server.ts`)
- HTTP Server → Order API: registers routes (evidence: `server.ts`)
- HTTP Server → Product API: registers routes (evidence: `server.ts`)
- HTTP Server → Inventory API: registers routes (evidence: `server.ts`)
- HTTP Server → Category API: registers routes (evidence: `server.ts`)
- Order API → Session Authentication: checks sessions (evidence: `server/routes/orderRoutes.ts`)
- Order API → MongoDB Store: checks connection (evidence: `server/routes/orderRoutes.ts`)
- HTTP Server → MongoDB Store: connects database (evidence: `server.ts`)
