# eng-shenouda/beit-el-lokma-full-menu-order-online architecture

> Architecture diagram of the GitHub repository eng-shenouda/beit-el-lokma-full-menu-order-online, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eng-shenouda/beit-el-lokma-full-menu-order-online
- Repository: https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online

## Overview

Beit El Lokma is a static Arabic restaurant-ordering site backed by Firebase Authentication and an n8n order workflow. The customer signs in, selects menu items, submits an order, and receives a result after server-side identity and order validation; valid orders are logged and emailed. The README documents these stages and the integrations, but the front-end and workflow definitions were not excerpted, so their nodes use the exact documented file paths and the README supports the workflow edges.

Main entry points: [`add_website_branch.json`](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json) (Validity decision), [`index.html`](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html) (Ordering interface), [`config.js`](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/config.js) (Firebase and webhook config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer_site["Customer site"]
  node_site["Ordering interface<br/>[index.html]"]
  node_menu["Menu browsing<br/>[index.html]"]
  node_cart["Cart and quantities<br/>[index.html]"]
  node_order_form["Customer and order form<br/>[index.html]"]
  node_firebase_config["Firebase and webhook config<br/>[config.js]"]
end

subgraph group_identity["Identity"]
  node_firebase_auth["Firebase Authentication"]
end

subgraph group_order_workflow["Order workflow"]
  node_webhook["Order webhook"]
  node_token_check["Verify ID token"]
  node_order_validation["Validate and reprice"]
  node_validity_branch["Validity decision"]
  node_order_response["Order response"]
end

subgraph group_fulfillment["Order records and email"]
  node_sheets[("Google Sheets orders")]
  node_customer_email["Customer confirmation"]
  node_owner_email["Owner alert"]
end

node_customer(("Customer"))
node_firebase_service["Firebase Auth service"]
node_n8n_service["n8n runtime"]
node_google_sheets[("Google Sheets")]
node_gmail["Gmail"]

node_customer -->|"uses"| node_site
node_site -->|"shows"| node_menu
node_customer -->|"selects items"| node_cart
node_menu -->|"adds items"| node_cart
node_cart -->|"submits order"| node_order_form
node_site -.->|"uses config"| node_firebase_config
node_firebase_config -->|"configures"| node_firebase_auth
node_firebase_auth -->|"authenticates"| node_firebase_service
node_order_form -->|"posts token and order"| node_webhook
node_firebase_config -->|"sets webhook URL"| node_n8n_service
node_n8n_service -->|"routes request"| node_webhook
node_webhook -->|"dispatches"| node_token_check
node_token_check -->|"verifies token"| node_firebase_service
node_token_check -->|"passes verified order"| node_order_validation
node_order_validation -->|"returns validation"| node_validity_branch
node_validity_branch -->|"valid orders append"| node_sheets
node_sheets -->|"writes order"| node_google_sheets
node_validity_branch -->|"valid orders email"| node_customer_email
node_customer_email -->|"sends confirmation"| node_gmail
node_validity_branch -->|"valid orders alert"| node_owner_email
node_owner_email -->|"sends alert"| node_gmail
node_validity_branch -->|"returns result"| node_order_response
node_order_response -->|"returns order status"| node_site

click node_site "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html"
click node_menu "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html"
click node_cart "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html"
click node_order_form "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html"
click node_firebase_config "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/config.js"
click node_webhook "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json"
click node_token_check "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json"
click node_order_validation "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json"
click node_validity_branch "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json"
click node_order_response "https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json"

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_site,node_menu,node_cart,node_order_form,node_firebase_config toneBlue
class node_firebase_auth,node_google_sheets toneAmber
class node_webhook,node_token_check,node_order_validation,node_validity_branch,node_order_response toneMint
class node_sheets,node_customer_email,node_owner_email toneRose
class node_customer,node_firebase_service,node_n8n_service,node_gmail toneIndigo
```

## Components

### Customer site

- [Ordering interface](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html): `index.html`
- [Menu browsing](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html): `index.html`
- [Cart and quantities](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html): `index.html`
- [Customer and order form](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/index.html): `index.html`
- [Firebase and webhook config](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/config.js): `config.js`

### Identity

- **Firebase Authentication**

### Order workflow

- [Order webhook](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json): `add_website_branch.json`
- [Verify ID token](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json): `add_website_branch.json`
- [Validate and reprice](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json): `add_website_branch.json`
- [Validity decision](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json): `add_website_branch.json`
- [Order response](https://github.com/eng-shenouda/beit-el-lokma-full-menu-order-online/blob/main/add_website_branch.json): `add_website_branch.json`

### Order records and email

- **Google Sheets orders**
- **Customer confirmation**
- **Owner alert**

### Other components

- **Customer**
- **Firebase Auth service**
- **n8n runtime**
- **Google Sheets**
- **Gmail**

## Connections

- Customer → Ordering interface: uses (evidence: `README.md`)
- Ordering interface → Menu browsing: shows (evidence: `README.md`)
- Customer → Cart and quantities: selects items (evidence: `README.md`)
- Menu browsing → Cart and quantities: adds items (evidence: `README.md`)
- Cart and quantities → Customer and order form: submits order (evidence: `README.md`)
- Ordering interface → Firebase and webhook config: uses config
- Firebase and webhook config → Firebase Authentication: configures (evidence: `README.md`)
- Firebase Authentication → Firebase Auth service: authenticates (evidence: `README.md`)
- Customer and order form → Order webhook: posts token and order (evidence: `README.md`)
- Firebase and webhook config → n8n runtime: sets webhook URL (evidence: `config.js`)
- n8n runtime → Order webhook: routes request (evidence: `README.md`)
- Order webhook → Verify ID token: dispatches (evidence: `README.md`)
- Verify ID token → Firebase Auth service: verifies token (evidence: `README.md`)
- Verify ID token → Validate and reprice: passes verified order (evidence: `README.md`)
- Validate and reprice → Validity decision: returns validation (evidence: `README.md`)
- Validity decision → Google Sheets orders: valid orders append (evidence: `README.md`)
- Google Sheets orders → Google Sheets: writes order (evidence: `README.md`)
- Validity decision → Customer confirmation: valid orders email (evidence: `README.md`)
- Customer confirmation → Gmail: sends confirmation (evidence: `README.md`)
- Validity decision → Owner alert: valid orders alert (evidence: `README.md`)
- Owner alert → Gmail: sends alert (evidence: `README.md`)
- Validity decision → Order response: returns result (evidence: `README.md`)
- Order response → Ordering interface: returns order status (evidence: `README.md`)
