# bryanthelai/restaurantproject architecture

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

- Interactive diagram: https://gitdiagram.com/bryanthelai/restaurantproject
- Repository: https://github.com/bryanthelai/restaurantproject

## Overview

This is a PHP/MySQL restaurant website and staff POS. Customers browse the restaurant site, register for membership, and make reservations; staff sign in to manage restaurant operations, take orders, send them to the kitchen, process payment, and print receipts. The README also documents CRUD management, profile preferences, charts, and report downloads. The sampled code confirms registration writes account and membership records, POS ordering reads menu and bill data, and report generation queries sales data. Several other subsystem links are documented capabilities, not verified implementation calls.

Main entry points: [`adminSide/posBackend/orderItem.php`](https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/posBackend/orderItem.php) (POS Ordering), [`adminSide/posBackend/posCashPayment.php`](https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/posBackend/posCashPayment.php) (Payment Processing), [`customerSide/customerLogin`](https://github.com/bryanthelai/restaurantproject/tree/main/customerSide/customerLogin) (Customer Accounts), [`customerSide/CustomerReservation`](https://github.com/bryanthelai/restaurantproject/tree/main/customerSide/CustomerReservation) (Customer Reservations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Website"]
  node_customer_site["Restaurant Site<br/>[home.php]"]
  node_customer_auth["Customer Accounts"]
  node_customer_reserve["Customer Reservations"]
end

subgraph group_staff["Staff Operations"]
  node_staff_login["Staff Login<br/>[login.php]"]
  node_pos_order["POS Ordering<br/>[orderItem.php]"]
  node_kitchen["Kitchen Orders"]
  node_payment["Payment Processing<br/>[posCashPayment.php]"]
  node_receipt["Receipts<br/>[receipt.php]"]
end

subgraph group_management["Restaurant Management"]
  node_menu_admin["Menu Management"]
  node_table_admin["Table Management"]
  node_reservation_admin["Reservation Management"]
  node_customer_admin["Customer Management"]
  node_staff_admin["Staff Management"]
  node_account_admin["Account Management"]
end

subgraph group_insights["Sales Insights"]
  node_analytics["Sales Charts<br/>[sales-panel.php]"]
  node_reports["Report Generation"]
end

node_customer_actor(("Customer"))
node_staff_actor(("Staff"))
node_database[("Restaurant Database")]

node_customer_actor -->|"browses"| node_customer_site
node_customer_actor -->|"registers"| node_customer_auth
node_customer_actor -->|"reserves"| node_customer_reserve
node_staff_actor -->|"signs in"| node_staff_login
node_staff_actor -->|"takes orders"| node_pos_order
node_staff_actor -->|"views orders"| node_kitchen
node_staff_actor -->|"manages menu"| node_menu_admin
node_staff_actor -->|"manages tables"| node_table_admin
node_staff_actor -->|"manages bookings"| node_reservation_admin
node_staff_actor -->|"manages customers"| node_customer_admin
node_staff_actor -->|"manages staff"| node_staff_admin
node_staff_actor -->|"manages accounts"| node_account_admin
node_staff_actor -->|"views charts"| node_analytics
node_staff_actor -->|"downloads reports"| node_reports
node_pos_order -->|"reads menu and bills"| node_database
node_customer_auth -->|"writes accounts"| node_database
node_customer_reserve -.->|"stores reservations"| node_database
node_payment -.->|"records payments"| node_database
node_reports -->|"queries sales"| node_database
node_analytics -->|"queries sales"| node_database
node_pos_order -.->|"sends orders"| node_kitchen
node_pos_order -.->|"submits bill"| node_payment
node_payment -.->|"produces receipt"| node_receipt

click node_customer_site "https://github.com/bryanthelai/restaurantproject/blob/main/customerSide/home/home.php"
click node_customer_auth "https://github.com/bryanthelai/restaurantproject/tree/main/customerSide/customerLogin"
click node_customer_reserve "https://github.com/bryanthelai/restaurantproject/tree/main/customerSide/CustomerReservation"
click node_staff_login "https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/StaffLogin/login.php"
click node_pos_order "https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/posBackend/orderItem.php"
click node_kitchen "https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/posBackend/kitchenBackend"
click node_payment "https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/posBackend/posCashPayment.php"
click node_receipt "https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/posBackend/receipt.php"
click node_menu_admin "https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/menuCrud"
click node_table_admin "https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/tableCrud"
click node_reservation_admin "https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/reservationsCrud"
click node_customer_admin "https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/customerCrud"
click node_staff_admin "https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/staffCrud"
click node_account_admin "https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/accountCrud"
click node_analytics "https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/panel/sales-panel.php"
click node_reports "https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/report/generate_report.php"

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_customer_site,node_customer_auth,node_customer_reserve toneBlue
class node_staff_login,node_pos_order,node_kitchen,node_payment,node_receipt,node_database toneAmber
class node_menu_admin,node_table_admin,node_reservation_admin,node_customer_admin,node_staff_admin,node_account_admin toneMint
class node_analytics,node_reports toneRose
class node_customer_actor,node_staff_actor toneIndigo
```

## Components

### Customer Website

- [Restaurant Site](https://github.com/bryanthelai/restaurantproject/blob/main/customerSide/home/home.php): `customerSide/home/home.php`
- [Customer Accounts](https://github.com/bryanthelai/restaurantproject/tree/main/customerSide/customerLogin): `customerSide/customerLogin`
- [Customer Reservations](https://github.com/bryanthelai/restaurantproject/tree/main/customerSide/CustomerReservation): `customerSide/CustomerReservation`

### Staff Operations

- [Staff Login](https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/StaffLogin/login.php): `adminSide/StaffLogin/login.php`
- [POS Ordering](https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/posBackend/orderItem.php): `adminSide/posBackend/orderItem.php`
- [Kitchen Orders](https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/posBackend/kitchenBackend): `adminSide/posBackend/kitchenBackend`
- [Payment Processing](https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/posBackend/posCashPayment.php): `adminSide/posBackend/posCashPayment.php`
- [Receipts](https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/posBackend/receipt.php): `adminSide/posBackend/receipt.php`

### Restaurant Management

- [Menu Management](https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/menuCrud): `adminSide/menuCrud`
- [Table Management](https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/tableCrud): `adminSide/tableCrud`
- [Reservation Management](https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/reservationsCrud): `adminSide/reservationsCrud`
- [Customer Management](https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/customerCrud): `adminSide/customerCrud`
- [Staff Management](https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/staffCrud): `adminSide/staffCrud`
- [Account Management](https://github.com/bryanthelai/restaurantproject/tree/main/adminSide/accountCrud): `adminSide/accountCrud`

### Sales Insights

- [Sales Charts](https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/panel/sales-panel.php): `adminSide/panel/sales-panel.php`
- [Report Generation](https://github.com/bryanthelai/restaurantproject/blob/main/adminSide/report/generate_report.php): `adminSide/report/generate_report.php`

### Other components

- **Customer**
- **Staff**
- **Restaurant Database**

## Connections

- Customer → Restaurant Site: browses
- Customer → Customer Accounts: registers
- Customer → Customer Reservations: reserves
- Staff → Staff Login: signs in
- Staff → POS Ordering: takes orders
- Staff → Kitchen Orders: views orders
- Staff → Menu Management: manages menu
- Staff → Table Management: manages tables
- Staff → Reservation Management: manages bookings
- Staff → Customer Management: manages customers
- Staff → Staff Management: manages staff
- Staff → Account Management: manages accounts
- Staff → Sales Charts: views charts
- Staff → Report Generation: downloads reports
- POS Ordering → Restaurant Database: reads menu and bills
- Customer Accounts → Restaurant Database: writes accounts
- Customer Reservations → Restaurant Database: stores reservations
- Payment Processing → Restaurant Database: records payments
- Report Generation → Restaurant Database: queries sales
- Sales Charts → Restaurant Database: queries sales
- POS Ordering → Kitchen Orders: sends orders
- POS Ordering → Payment Processing: submits bill
- Payment Processing → Receipts: produces receipt
