# tamimtxd/restaurant-ordering-system architecture

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

- Interactive diagram: https://gitdiagram.com/tamimtxd/restaurant-ordering-system
- Repository: https://github.com/tamimtxd/restaurant-ordering-system

## Overview

Rannaghor is a browser-based restaurant ordering and operations app. The customer flow is table selection, browsing specials and menu items, cart checkout, order tracking, and post-meal ratings; staff manage order progress and waiter calls in the kitchen dashboard. A separate management page creates table QR codes. The README documents additional interface capabilities; sampled JavaScript excerpts show portions of their implementation, so the graph keeps those components but omits unverified connections. Supabase provides shared order data and realtime synchronization.

Main entry points: [`js/supabase-config.js`](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/supabase-config.js) (Supabase client), [`management/kitchen.html`](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/management/kitchen.html) (Kitchen dashboard), [`js/management.js`](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/management.js) (QR management), [`index.html`](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/index.html) (Customer app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer ordering"]
  node_customer_app["Customer app<br/>[index.html]"]
  node_table_session["Table session<br/>[script.js]"]
  node_menu_specials["Menu and specials<br/>[script.js]"]
  node_cart_checkout["Cart and checkout<br/>[script.js]"]
  node_order_tracking["Order tracking<br/>[script.js]"]
  node_dish_ratings["Dish ratings<br/>[script.js]"]
end

subgraph group_kitchen["Kitchen operations"]
  node_kitchen_dashboard["Kitchen dashboard<br/>[kitchen.html]"]
  node_order_operations["Order operations<br/>[kitchen.js]"]
  node_waiter_alerts["Waiter alerts<br/>[kitchen.js]"]
end

subgraph group_tables["Table management"]
  node_qr_management["QR management<br/>[management.js]"]
end

subgraph group_backend["Shared backend"]
  node_supabase_client["Supabase client<br/>[supabase-config.js]"]
end

node_diner(("Diner"))
node_kitchen_staff(("Kitchen staff"))
node_table_manager(("Table manager"))
node_qr_service["QR image service"]
node_supabase[("Supabase")]

node_diner -->|"opens"| node_customer_app
node_customer_app -->|"runs"| node_table_session
node_table_session -->|"loads"| node_menu_specials
node_diner -->|"browses"| node_menu_specials
node_diner -->|"checks out"| node_cart_checkout
node_cart_checkout -->|"saves order"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase
node_supabase -.->|"syncs status"| node_order_tracking
node_diner -->|"tracks"| node_order_tracking
node_diner -->|"rates dishes"| node_dish_ratings
node_kitchen_staff -->|"opens"| node_kitchen_dashboard
node_kitchen_dashboard -->|"runs"| node_order_operations
node_order_operations -->|"fetches and updates"| node_supabase_client
node_supabase_client -->|"streams changes"| node_order_operations
node_kitchen_dashboard -->|"shows"| node_waiter_alerts
node_waiter_alerts -->|"resolves calls"| node_supabase_client
node_table_manager -->|"generates codes"| node_qr_management
node_qr_management -->|"requests images"| node_qr_service
node_qr_management -->|"links table menu"| node_customer_app

click node_customer_app "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/index.html"
click node_table_session "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js"
click node_menu_specials "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js"
click node_cart_checkout "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js"
click node_order_tracking "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js"
click node_dish_ratings "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js"
click node_kitchen_dashboard "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/management/kitchen.html"
click node_order_operations "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/kitchen.js"
click node_waiter_alerts "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/kitchen.js"
click node_qr_management "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/management.js"
click node_supabase_client "https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/supabase-config.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_customer_app,node_table_session,node_menu_specials,node_cart_checkout,node_order_tracking,node_dish_ratings toneBlue
class node_kitchen_dashboard,node_order_operations,node_waiter_alerts,node_supabase toneAmber
class node_qr_management toneMint
class node_supabase_client toneRose
class node_diner,node_kitchen_staff,node_table_manager,node_qr_service toneIndigo
```

## Components

### Customer ordering

- [Customer app](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/index.html): `index.html`
- [Table session](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js): `js/script.js`
- [Menu and specials](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js): `js/script.js`
- [Cart and checkout](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js): `js/script.js`
- [Order tracking](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js): `js/script.js`
- [Dish ratings](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/script.js): `js/script.js`

### Kitchen operations

- [Kitchen dashboard](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/management/kitchen.html): `management/kitchen.html`
- [Order operations](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/kitchen.js): `js/kitchen.js`
- [Waiter alerts](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/kitchen.js): `js/kitchen.js`

### Table management

- [QR management](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/management.js): `js/management.js`

### Shared backend

- [Supabase client](https://github.com/tamimtxd/restaurant-ordering-system/blob/main/js/supabase-config.js): `js/supabase-config.js`

### Other components

- **Diner**
- **Kitchen staff**
- **Table manager**
- **QR image service**
- **Supabase**

## Connections

- Diner → Customer app: opens (evidence: `README.md`)
- Customer app → Table session: runs (evidence: `README.md`)
- Table session → Menu and specials: loads (evidence: `js/script.js`)
- Diner → Menu and specials: browses (evidence: `README.md`)
- Diner → Cart and checkout: checks out (evidence: `README.md`)
- Cart and checkout → Supabase client: saves order (evidence: `js/script.js`)
- Supabase client → Supabase: connects (evidence: `js/supabase-config.js`)
- Supabase → Order tracking: syncs status (evidence: `README.md`)
- Diner → Order tracking: tracks (evidence: `README.md`)
- Diner → Dish ratings: rates dishes (evidence: `README.md`)
- Kitchen staff → Kitchen dashboard: opens (evidence: `README.md`)
- Kitchen dashboard → Order operations: runs (evidence: `README.md`)
- Order operations → Supabase client: fetches and updates (evidence: `js/kitchen.js`)
- Supabase client → Order operations: streams changes (evidence: `js/kitchen.js`)
- Kitchen dashboard → Waiter alerts: shows (evidence: `js/kitchen.js`)
- Waiter alerts → Supabase client: resolves calls (evidence: `js/kitchen.js`)
- Table manager → QR management: generates codes (evidence: `js/management.js`)
- QR management → QR image service: requests images (evidence: `js/management.js`)
- QR management → Customer app: links table menu (evidence: `js/management.js`)
