# mahoozi97/pos-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/mahoozi97/pos-frontend
- Repository: https://github.com/mahoozi97/pos-frontend

## Overview

This is a restaurant point-of-sale frontend: staff authenticate, start an order with customer details, select a table and menu items, review a bill, and follow payment/order status; staff can also manage the menu and view operational metrics. The map follows only relationships supported by excerpts or the source index. Several domain screens and integrations are included because the index documents them, but their internal calls are not inferred where source was not shown.

Main entry points: [`src/App.jsx`](https://github.com/mahoozi97/pos-frontend/blob/main/src/App.jsx) (Route and access shell), [`src/https/index.js`](https://github.com/mahoozi97/pos-frontend/blob/main/src/https/index.js) (Backend API client), [`src/pages/Menu.jsx`](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Menu.jsx) (Menu and cart), [`src/components/menu/Bill.jsx`](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/menu/Bill.jsx) (Bill and order submit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and access"]
  node_app["Route and access shell<br/>[App.jsx]"]
  node_auth["Sign in and register<br/>[Login.jsx]"]
  node_authpages["Authentication page<br/>[Auth.jsx]"]
end

subgraph group_service["Restaurant workflows"]
  node_home["Home overview<br/>[Home.jsx]"]
  node_orders["Order tracking<br/>[Orders.jsx]"]
  node_ordercards["Order status cards<br/>[OrderCard.jsx]"]
  node_tables["Table selection<br/>[Tables.jsx]"]
  node_tablecard["Table card<br/>[TableCard.jsx]"]
  node_menu["Menu and cart<br/>[Menu.jsx]"]
  node_menuview["Menu browsing<br/>[MenuContainer.jsx]"]
  node_bill["Bill and order submit<br/>[Bill.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_payment["Payment status<br/>[PaymentStatus.jsx]"]
  node_invoice["Receipt and printing<br/>[invoice.jsx]"]
end

subgraph group_admin["Operations management"]
  node_dashboard["Admin dashboard<br/>[Dashboard.jsx]"]
  node_menumgr["Menu management<br/>[MenuManager.jsx]"]
  node_metrics["Operational metrics<br/>[Metrics.jsx]"]
  node_adminorders["Recent orders and payments<br/>[RecentOrders.jsx]"]
  node_catalogforms["Catalog and table forms"]
end

subgraph group_state["Client state and services"]
  node_http["Backend API client<br/>[index.js]"]
  node_userload["Session restoration<br/>[useLoadData.js]"]
  node_userstate["User session state<br/>[userSlice.js]"]
  node_cartstate["Cart state<br/>[cartSlice.js]"]
  node_customerstate["Customer and table state<br/>[customerSlice.js]"]
  node_store[("Redux store<br/>[store.js]")]
end

node_staff(("Restaurant staff"))
node_backend[("Restaurant backend")]
node_gateway["Payment gateway"]

node_staff -->|"uses"| node_app
node_app -->|"routes to"| node_authpages
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_orders
node_app -->|"routes to"| node_tables
node_app -->|"routes to"| node_menu
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_payment
node_app -->|"loads session"| node_userload
node_authpages -->|"renders"| node_auth
node_auth -->|"calls auth API"| node_http
node_userload -->|"fetches user"| node_http
node_userload -->|"sets session"| node_userstate
node_store -->|"registers reducer"| node_userstate
node_store -->|"registers reducer"| node_cartstate
node_store -->|"registers reducer"| node_customerstate
node_home -.->|"opens"| node_orders
node_orders -->|"fetches orders"| node_http
node_orders -->|"renders"| node_ordercards
node_orders -->|"renders receipt"| node_invoice
node_tables -.->|"fetches tables"| node_http
node_tables -->|"renders"| node_tablecard
node_menu -->|"renders"| node_menuview
node_menu -->|"renders"| node_bill
node_menu -.->|"reads cart"| node_cartstate
node_menu -.->|"reads customer"| node_customerstate
node_bill -->|"reads cart"| node_cartstate
node_bill -->|"reads customer"| node_customerstate
node_bill -->|"submits order"| node_http
node_bill -->|"opens receipt"| node_invoice
node_checkout -.->|"payment calls"| node_http
node_payment -.->|"checks payment"| node_http
node_payment -->|"shows receipt"| node_invoice
node_http -->|"HTTP requests"| node_backend
node_backend -.->|"processes payment"| node_gateway
node_dashboard -->|"renders"| node_menumgr
node_dashboard -->|"renders"| node_metrics
node_dashboard -->|"renders"| node_adminorders
node_dashboard -->|"renders"| node_catalogforms
node_menumgr -->|"loads and edits menu"| node_http
node_adminorders -.->|"loads dashboard data"| node_http

click node_app "https://github.com/mahoozi97/pos-frontend/blob/main/src/App.jsx"
click node_auth "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/auth/Login.jsx"
click node_authpages "https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Auth.jsx"
click node_home "https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Home.jsx"
click node_orders "https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Orders.jsx"
click node_ordercards "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/orders/OrderCard.jsx"
click node_tables "https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Tables.jsx"
click node_tablecard "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/tables/TableCard.jsx"
click node_menu "https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Menu.jsx"
click node_menuview "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/menu/MenuContainer.jsx"
click node_bill "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/menu/Bill.jsx"
click node_checkout "https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Checkout.jsx"
click node_payment "https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/PaymentStatus.jsx"
click node_invoice "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/invoice/invoice.jsx"
click node_dashboard "https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Dashboard.jsx"
click node_menumgr "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/dashboard/MenuManager.jsx"
click node_metrics "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/dashboard/Metrics.jsx"
click node_adminorders "https://github.com/mahoozi97/pos-frontend/blob/main/src/components/dashboard/RecentOrders.jsx"
click node_catalogforms "https://github.com/mahoozi97/pos-frontend/tree/main/src/components/dashboard"
click node_http "https://github.com/mahoozi97/pos-frontend/blob/main/src/https/index.js"
click node_userload "https://github.com/mahoozi97/pos-frontend/blob/main/src/hooks/useLoadData.js"
click node_userstate "https://github.com/mahoozi97/pos-frontend/blob/main/src/redux/slices/userSlice.js"
click node_cartstate "https://github.com/mahoozi97/pos-frontend/blob/main/src/redux/slices/cartSlice.js"
click node_customerstate "https://github.com/mahoozi97/pos-frontend/blob/main/src/redux/slices/customerSlice.js"
click node_store "https://github.com/mahoozi97/pos-frontend/blob/main/src/redux/store.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_auth,node_authpages toneBlue
class node_home,node_orders,node_ordercards,node_tables,node_tablecard,node_menu,node_menuview,node_bill,node_checkout,node_payment,node_invoice,node_backend toneAmber
class node_dashboard,node_menumgr,node_metrics,node_adminorders,node_catalogforms toneMint
class node_http,node_userload,node_userstate,node_cartstate,node_customerstate,node_store toneRose
class node_staff,node_gateway toneIndigo
```

## Components

### Application and access

- [Route and access shell](https://github.com/mahoozi97/pos-frontend/blob/main/src/App.jsx): `src/App.jsx`
- [Sign in and register](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/auth/Login.jsx): `src/components/auth/Login.jsx`
- [Authentication page](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Auth.jsx): `src/pages/Auth.jsx`

### Restaurant workflows

- [Home overview](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Order tracking](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Orders.jsx): `src/pages/Orders.jsx`
- [Order status cards](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/orders/OrderCard.jsx): `src/components/orders/OrderCard.jsx`
- [Table selection](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Tables.jsx): `src/pages/Tables.jsx`
- [Table card](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/tables/TableCard.jsx): `src/components/tables/TableCard.jsx`
- [Menu and cart](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Menu.jsx): `src/pages/Menu.jsx`
- [Menu browsing](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/menu/MenuContainer.jsx): `src/components/menu/MenuContainer.jsx`
- [Bill and order submit](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/menu/Bill.jsx): `src/components/menu/Bill.jsx`
- [Checkout](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Checkout.jsx): `src/pages/Checkout.jsx`
- [Payment status](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/PaymentStatus.jsx): `src/pages/PaymentStatus.jsx`
- [Receipt and printing](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/invoice/invoice.jsx): `src/components/invoice/invoice.jsx`

### Operations management

- [Admin dashboard](https://github.com/mahoozi97/pos-frontend/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Menu management](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/dashboard/MenuManager.jsx): `src/components/dashboard/MenuManager.jsx`
- [Operational metrics](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/dashboard/Metrics.jsx): `src/components/dashboard/Metrics.jsx`
- [Recent orders and payments](https://github.com/mahoozi97/pos-frontend/blob/main/src/components/dashboard/RecentOrders.jsx): `src/components/dashboard/RecentOrders.jsx`
- [Catalog and table forms](https://github.com/mahoozi97/pos-frontend/tree/main/src/components/dashboard): `src/components/dashboard`

### Client state and services

- [Backend API client](https://github.com/mahoozi97/pos-frontend/blob/main/src/https/index.js): `src/https/index.js`
- [Session restoration](https://github.com/mahoozi97/pos-frontend/blob/main/src/hooks/useLoadData.js): `src/hooks/useLoadData.js`
- [User session state](https://github.com/mahoozi97/pos-frontend/blob/main/src/redux/slices/userSlice.js): `src/redux/slices/userSlice.js`
- [Cart state](https://github.com/mahoozi97/pos-frontend/blob/main/src/redux/slices/cartSlice.js): `src/redux/slices/cartSlice.js`
- [Customer and table state](https://github.com/mahoozi97/pos-frontend/blob/main/src/redux/slices/customerSlice.js): `src/redux/slices/customerSlice.js`
- [Redux store](https://github.com/mahoozi97/pos-frontend/blob/main/src/redux/store.js): `src/redux/store.js`

### Other components

- **Restaurant staff**
- **Restaurant backend**
- **Payment gateway**

## Connections

- Restaurant staff → Route and access shell: uses
- Route and access shell → Authentication page: routes to (evidence: `src/App.jsx`)
- Route and access shell → Home overview: routes to (evidence: `src/App.jsx`)
- Route and access shell → Order tracking: routes to (evidence: `src/App.jsx`)
- Route and access shell → Table selection: routes to (evidence: `src/App.jsx`)
- Route and access shell → Menu and cart: routes to (evidence: `src/App.jsx`)
- Route and access shell → Admin dashboard: routes to (evidence: `src/App.jsx`)
- Route and access shell → Payment status: routes to (evidence: `src/App.jsx`)
- Route and access shell → Session restoration: loads session (evidence: `src/App.jsx`)
- Authentication page → Sign in and register: renders (evidence: `src/pages/Auth.jsx`)
- Sign in and register → Backend API client: calls auth API (evidence: `src/components/auth/Login.jsx`)
- Session restoration → Backend API client: fetches user (evidence: `src/hooks/useLoadData.js`)
- Session restoration → User session state: sets session (evidence: `src/hooks/useLoadData.js`)
- Redux store → User session state: registers reducer (evidence: `src/redux/store.js`)
- Redux store → Cart state: registers reducer (evidence: `src/redux/store.js`)
- Redux store → Customer and table state: registers reducer (evidence: `src/redux/store.js`)
- Home overview → Order tracking: opens
- Order tracking → Backend API client: fetches orders (evidence: `src/pages/Orders.jsx`)
- Order tracking → Order status cards: renders (evidence: `src/pages/Orders.jsx`)
- Order tracking → Receipt and printing: renders receipt (evidence: `src/pages/Orders.jsx`)
- Table selection → Backend API client: fetches tables (evidence: `src/pages/Tables.jsx`)
- Table selection → Table card: renders (evidence: `src/pages/Tables.jsx`)
- Menu and cart → Menu browsing: renders (evidence: `src/pages/Menu.jsx`)
- Menu and cart → Bill and order submit: renders (evidence: `src/pages/Menu.jsx`)
- Menu and cart → Cart state: reads cart
- Menu and cart → Customer and table state: reads customer
- Bill and order submit → Cart state: reads cart (evidence: `src/components/menu/Bill.jsx`)
- Bill and order submit → Customer and table state: reads customer (evidence: `src/components/menu/Bill.jsx`)
- Bill and order submit → Backend API client: submits order (evidence: `src/components/menu/Bill.jsx`)
- Bill and order submit → Receipt and printing: opens receipt (evidence: `src/components/menu/Bill.jsx`)
- Checkout → Backend API client: payment calls
- Payment status → Backend API client: checks payment (evidence: `src/pages/PaymentStatus.jsx`)
- Payment status → Receipt and printing: shows receipt (evidence: `src/pages/PaymentStatus.jsx`)
- Backend API client → Restaurant backend: HTTP requests (evidence: `src/https/index.js`)
- Restaurant backend → Payment gateway: processes payment
- Admin dashboard → Menu management: renders (evidence: `src/pages/Dashboard.jsx`)
- Admin dashboard → Operational metrics: renders (evidence: `src/pages/Dashboard.jsx`)
- Admin dashboard → Recent orders and payments: renders (evidence: `src/pages/Dashboard.jsx`)
- Admin dashboard → Catalog and table forms: renders (evidence: `src/pages/Dashboard.jsx`)
- Menu management → Backend API client: loads and edits menu (evidence: `src/components/dashboard/MenuManager.jsx`)
- Recent orders and payments → Backend API client: loads dashboard data
