# azhar-paraouty/order-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/azhar-paraouty/order-management-system
- Repository: https://github.com/azhar-paraouty/order-management-system

## Overview

Island Bites is a PHP/MySQL restaurant order-management system. Staff log in to role-specific screens: desk staff build orders for kitchen processing and track delivery, kitchen staff advance orders through cooking stages, and administrators manage products. Pages and PHP handlers combine presentation, role checks, and database work; the shared configuration opens the MySQL connection. The README documents the broader capabilities, while the excerpts confirm only selected page-to-handler and database relationships, so unsampled links are omitted.

Main entry points: [`php/configuration.php`](https://github.com/azhar-paraouty/order-management-system/blob/main/php/configuration.php) (Database connection), [`database/island_bites.sql`](https://github.com/azhar-paraouty/order-management-system/blob/main/database/island_bites.sql) (MySQL schema), [`pages/kitchen_queue.php`](https://github.com/azhar-paraouty/order-management-system/blob/main/pages/kitchen_queue.php) (Kitchen queues), [`pages/admin.php`](https://github.com/azhar-paraouty/order-management-system/blob/main/pages/admin.php) (Product administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and sessions"]
  node_entry["Application entry<br/>[index.php]"]
  node_login["Role login<br/>[login.php]"]
  node_logout["Session logout<br/>[logout.php]"]
end

subgraph group_desk["Desk operations"]
  node_dashboard["Order dashboard"]
  node_order_builder["Order builder UI<br/>[order_dashboard.js]"]
  node_confirm["Order submission<br/>[confirm_order.php]"]
  node_status["Order tracking<br/>[order_status.php]"]
  node_status_ui["Status interactions<br/>[order_status.js]"]
  node_deliver["Delivery handler<br/>[deliver_order.php]"]
  node_cancel["Cancellation handler<br/>[cancel_order.php]"]
end

subgraph group_kitchen["Kitchen workflow"]
  node_kitchen_page["Kitchen queues<br/>[kitchen_queue.php]"]
  node_kitchen_ui["Kitchen interactions<br/>[kitchen_queue.js]"]
  node_cook["Cooking handler<br/>[cook_order.php]"]
  node_ready["Ready handler<br/>[ready_order.php]"]
  node_clear["Queue clearance<br/>[clear_order.php]"]
end

subgraph group_catalog["Product management"]
  node_admin_page["Product administration<br/>[admin.php]"]
  node_admin_ui["Admin interactions<br/>[admin.js]"]
  node_create_product["Create product<br/>[create_product.php]"]
  node_update_product["Update product<br/>[update_product.php]"]
  node_delete_product["Delete product<br/>[delete_product.php]"]
end

subgraph group_persistence["Persistence"]
  node_connection["Database connection<br/>[configuration.php]"]
  node_database[("MySQL schema<br/>[island_bites.sql]")]
end

node_staff(("Restaurant staff"))

node_staff -->|"authenticates"| node_login
node_login -->|"queries users"| node_connection
node_login -->|"routes admin"| node_admin_page
node_login -->|"routes desk"| node_dashboard
node_login -->|"routes kitchen"| node_kitchen_page
node_dashboard -->|"loads products"| node_connection
node_dashboard -->|"opens tracking"| node_status
node_staff -->|"creates orders"| node_dashboard
node_dashboard -.->|"submits order"| node_confirm
node_confirm -->|"opens connection"| node_connection
node_confirm -->|"writes order data"| node_database
node_status -->|"loads orders"| node_connection
node_status -.->|"offers delivery"| node_deliver
node_status -.->|"offers cancellation"| node_cancel
node_deliver -->|"opens connection"| node_connection
node_deliver -->|"updates status"| node_database
node_cancel -->|"opens connection"| node_connection
node_cancel -->|"updates status"| node_database
node_kitchen_page -->|"loads queues"| node_connection
node_kitchen_page -.->|"offers cooking"| node_cook
node_kitchen_page -.->|"offers ready"| node_ready
node_kitchen_page -.->|"offers clearance"| node_clear
node_staff -->|"processes orders"| node_kitchen_page
node_cook -->|"opens connection"| node_connection
node_cook -->|"updates status"| node_database
node_ready -->|"opens connection"| node_connection
node_ready -->|"updates status"| node_database
node_clear -->|"opens connection"| node_connection
node_clear -->|"checks status"| node_database
node_admin_page -->|"reads products"| node_connection
node_admin_page -->|"submits create"| node_create_product
node_admin_page -->|"submits update"| node_update_product
node_admin_page -->|"submits delete"| node_delete_product
node_staff -->|"manages products"| node_admin_page
node_create_product -->|"opens connection"| node_connection
node_update_product -->|"opens connection"| node_connection
node_delete_product -->|"opens connection"| node_connection
node_connection -->|"connects MySQL"| node_database

click node_entry "https://github.com/azhar-paraouty/order-management-system/blob/main/index.php"
click node_login "https://github.com/azhar-paraouty/order-management-system/blob/main/pages/login.php"
click node_logout "https://github.com/azhar-paraouty/order-management-system/blob/main/pages/logout.php"
click node_dashboard "https://github.com/azhar-paraouty/order-management-system/blob/main/pages/order_dashboard.php"
click node_order_builder "https://github.com/azhar-paraouty/order-management-system/blob/main/js/order_dashboard.js"
click node_confirm "https://github.com/azhar-paraouty/order-management-system/blob/main/php/confirm_order.php"
click node_status "https://github.com/azhar-paraouty/order-management-system/blob/main/pages/order_status.php"
click node_status_ui "https://github.com/azhar-paraouty/order-management-system/blob/main/js/order_status.js"
click node_deliver "https://github.com/azhar-paraouty/order-management-system/blob/main/php/deliver_order.php"
click node_cancel "https://github.com/azhar-paraouty/order-management-system/blob/main/php/cancel_order.php"
click node_kitchen_page "https://github.com/azhar-paraouty/order-management-system/blob/main/pages/kitchen_queue.php"
click node_kitchen_ui "https://github.com/azhar-paraouty/order-management-system/blob/main/js/kitchen_queue.js"
click node_cook "https://github.com/azhar-paraouty/order-management-system/blob/main/php/cook_order.php"
click node_ready "https://github.com/azhar-paraouty/order-management-system/blob/main/php/ready_order.php"
click node_clear "https://github.com/azhar-paraouty/order-management-system/blob/main/php/clear_order.php"
click node_admin_page "https://github.com/azhar-paraouty/order-management-system/blob/main/pages/admin.php"
click node_admin_ui "https://github.com/azhar-paraouty/order-management-system/blob/main/js/admin.js"
click node_create_product "https://github.com/azhar-paraouty/order-management-system/blob/main/php/create_product.php"
click node_update_product "https://github.com/azhar-paraouty/order-management-system/blob/main/php/update_product.php"
click node_delete_product "https://github.com/azhar-paraouty/order-management-system/blob/main/php/delete_product.php"
click node_connection "https://github.com/azhar-paraouty/order-management-system/blob/main/php/configuration.php"
click node_database "https://github.com/azhar-paraouty/order-management-system/blob/main/database/island_bites.sql"

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_entry,node_login,node_logout toneBlue
class node_dashboard,node_order_builder,node_confirm,node_status,node_status_ui,node_deliver,node_cancel toneAmber
class node_kitchen_page,node_kitchen_ui,node_cook,node_ready,node_clear toneMint
class node_admin_page,node_admin_ui,node_create_product,node_update_product,node_delete_product toneRose
class node_connection,node_database,node_staff toneIndigo
```

## Components

### Access and sessions

- [Application entry](https://github.com/azhar-paraouty/order-management-system/blob/main/index.php): `index.php`
- [Role login](https://github.com/azhar-paraouty/order-management-system/blob/main/pages/login.php): `pages/login.php`
- [Session logout](https://github.com/azhar-paraouty/order-management-system/blob/main/pages/logout.php): `pages/logout.php`

### Desk operations

- [Order dashboard](https://github.com/azhar-paraouty/order-management-system/blob/main/pages/order_dashboard.php): `pages/order_dashboard.php`
- [Order builder UI](https://github.com/azhar-paraouty/order-management-system/blob/main/js/order_dashboard.js): `js/order_dashboard.js`
- [Order submission](https://github.com/azhar-paraouty/order-management-system/blob/main/php/confirm_order.php): `php/confirm_order.php`
- [Order tracking](https://github.com/azhar-paraouty/order-management-system/blob/main/pages/order_status.php): `pages/order_status.php`
- [Status interactions](https://github.com/azhar-paraouty/order-management-system/blob/main/js/order_status.js): `js/order_status.js`
- [Delivery handler](https://github.com/azhar-paraouty/order-management-system/blob/main/php/deliver_order.php): `php/deliver_order.php`
- [Cancellation handler](https://github.com/azhar-paraouty/order-management-system/blob/main/php/cancel_order.php): `php/cancel_order.php`

### Kitchen workflow

- [Kitchen queues](https://github.com/azhar-paraouty/order-management-system/blob/main/pages/kitchen_queue.php): `pages/kitchen_queue.php`
- [Kitchen interactions](https://github.com/azhar-paraouty/order-management-system/blob/main/js/kitchen_queue.js): `js/kitchen_queue.js`
- [Cooking handler](https://github.com/azhar-paraouty/order-management-system/blob/main/php/cook_order.php): `php/cook_order.php`
- [Ready handler](https://github.com/azhar-paraouty/order-management-system/blob/main/php/ready_order.php): `php/ready_order.php`
- [Queue clearance](https://github.com/azhar-paraouty/order-management-system/blob/main/php/clear_order.php): `php/clear_order.php`

### Product management

- [Product administration](https://github.com/azhar-paraouty/order-management-system/blob/main/pages/admin.php): `pages/admin.php`
- [Admin interactions](https://github.com/azhar-paraouty/order-management-system/blob/main/js/admin.js): `js/admin.js`
- [Create product](https://github.com/azhar-paraouty/order-management-system/blob/main/php/create_product.php): `php/create_product.php`
- [Update product](https://github.com/azhar-paraouty/order-management-system/blob/main/php/update_product.php): `php/update_product.php`
- [Delete product](https://github.com/azhar-paraouty/order-management-system/blob/main/php/delete_product.php): `php/delete_product.php`

### Persistence

- [Database connection](https://github.com/azhar-paraouty/order-management-system/blob/main/php/configuration.php): `php/configuration.php`
- [MySQL schema](https://github.com/azhar-paraouty/order-management-system/blob/main/database/island_bites.sql): `database/island_bites.sql`

### Other components

- **Restaurant staff**

## Connections

- Restaurant staff → Role login: authenticates (evidence: `README.md`)
- Role login → Database connection: queries users (evidence: `pages/login.php`)
- Role login → Product administration: routes admin (evidence: `pages/login.php`)
- Role login → Order dashboard: routes desk (evidence: `pages/login.php`)
- Role login → Kitchen queues: routes kitchen (evidence: `pages/login.php`)
- Order dashboard → Database connection: loads products (evidence: `pages/order_dashboard.php`)
- Order dashboard → Order tracking: opens tracking (evidence: `pages/order_dashboard.php`)
- Restaurant staff → Order dashboard: creates orders (evidence: `README.md`)
- Order dashboard → Order submission: submits order
- Order submission → Database connection: opens connection (evidence: `php/confirm_order.php`)
- Order submission → MySQL schema: writes order data (evidence: `php/confirm_order.php`)
- Order tracking → Database connection: loads orders (evidence: `pages/order_status.php`)
- Order tracking → Delivery handler: offers delivery
- Order tracking → Cancellation handler: offers cancellation
- Delivery handler → Database connection: opens connection (evidence: `php/deliver_order.php`)
- Delivery handler → MySQL schema: updates status (evidence: `php/deliver_order.php`)
- Cancellation handler → Database connection: opens connection (evidence: `php/cancel_order.php`)
- Cancellation handler → MySQL schema: updates status (evidence: `php/cancel_order.php`)
- Kitchen queues → Database connection: loads queues (evidence: `pages/kitchen_queue.php`)
- Kitchen queues → Cooking handler: offers cooking
- Kitchen queues → Ready handler: offers ready
- Kitchen queues → Queue clearance: offers clearance
- Restaurant staff → Kitchen queues: processes orders (evidence: `README.md`)
- Cooking handler → Database connection: opens connection (evidence: `php/cook_order.php`)
- Cooking handler → MySQL schema: updates status (evidence: `php/cook_order.php`)
- Ready handler → Database connection: opens connection (evidence: `php/ready_order.php`)
- Ready handler → MySQL schema: updates status (evidence: `php/ready_order.php`)
- Queue clearance → Database connection: opens connection (evidence: `php/clear_order.php`)
- Queue clearance → MySQL schema: checks status (evidence: `php/clear_order.php`)
- Product administration → Database connection: reads products (evidence: `pages/admin.php`)
- Product administration → Create product: submits create (evidence: `pages/admin.php`)
- Product administration → Update product: submits update (evidence: `pages/admin.php`)
- Product administration → Delete product: submits delete (evidence: `pages/admin.php`)
- Restaurant staff → Product administration: manages products (evidence: `README.md`)
- Create product → Database connection: opens connection (evidence: `php/create_product.php`)
- Update product → Database connection: opens connection (evidence: `php/update_product.php`)
- Delete product → Database connection: opens connection (evidence: `php/delete_product.php`)
- Database connection → MySQL schema: connects MySQL (evidence: `README.md`)
