# bader8110/safa-makkah-kuwait architecture

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

- Interactive diagram: https://gitdiagram.com/bader8110/safa-makkah-kuwait
- Repository: https://github.com/bader8110/safa-makkah-kuwait

## Overview

Safa Makkah Kuwait is an Arabic, right-to-left demo storefront that runs entirely in the browser. Shoppers browse products, build a cart, enter delivery details, and create a demo order; they can then track it locally. The app also presents delivery estimates, mosque-supply requests, repeat ordering, account and admin demos, and WhatsApp message preparation. The sampled code is a single large app.js file; these components describe its responsibilities, not separate modules. Source excerpts do not show the full checkout or page wiring, so those links are limited to documented behavior.

Main entry points: [`app.js`](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js) (Storefront UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shopping["Shopping"]
  node_storefront["Storefront UI<br/>[app.js]"]
  node_catalog["Product catalog<br/>[app.js]"]
  node_cart["Shopping cart<br/>[app.js]"]
end

subgraph group_orders["Orders and delivery"]
  node_checkout["Checkout<br/>[app.js]"]
  node_order_tracking["Order tracking<br/>[app.js]"]
  node_delivery["Delivery estimates<br/>[app.js]"]
  node_mosque_supply["Mosque supply<br/>[app.js]"]
end

subgraph group_support["Account and support"]
  node_account_admin["Account and admin<br/>[app.js]"]
  node_browser_storage[("Browser storage")]
end

node_shopper(("Shopper"))
node_whatsapp["WhatsApp"]

node_shopper -->|"uses"| node_storefront
node_storefront -->|"shows products"| node_catalog
node_storefront -->|"adds items"| node_cart
node_storefront -->|"opens checkout"| node_checkout
node_storefront -->|"starts tracking"| node_order_tracking
node_storefront -.->|"selects region"| node_delivery
node_storefront -->|"prepares request"| node_mosque_supply
node_storefront -->|"opens panels"| node_account_admin
node_checkout -.->|"stores demo data"| node_browser_storage
node_order_tracking -->|"reads local data"| node_browser_storage
node_account_admin -->|"reads and saves"| node_browser_storage
node_mosque_supply -->|"prepares message"| node_whatsapp
node_cart -->|"prepares message"| node_whatsapp

click node_storefront "https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js"
click node_catalog "https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js"
click node_cart "https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js"
click node_checkout "https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js"
click node_order_tracking "https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js"
click node_delivery "https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js"
click node_mosque_supply "https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js"
click node_account_admin "https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.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_storefront,node_catalog,node_cart toneBlue
class node_checkout,node_order_tracking,node_delivery,node_mosque_supply toneAmber
class node_account_admin,node_browser_storage toneMint
class node_shopper,node_whatsapp toneIndigo
```

## Components

### Shopping

- [Storefront UI](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js): `app.js`
- [Product catalog](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js): `app.js`
- [Shopping cart](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js): `app.js`

### Orders and delivery

- [Checkout](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js): `app.js`
- [Order tracking](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js): `app.js`
- [Delivery estimates](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js): `app.js`
- [Mosque supply](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js): `app.js`

### Account and support

- [Account and admin](https://github.com/bader8110/safa-makkah-kuwait/blob/main/app.js): `app.js`
- **Browser storage**

### Other components

- **Shopper**
- **WhatsApp**

## Connections

- Shopper → Storefront UI: uses (evidence: `app.js`)
- Storefront UI → Product catalog: shows products (evidence: `app.js`)
- Storefront UI → Shopping cart: adds items (evidence: `app.js`)
- Storefront UI → Checkout: opens checkout (evidence: `app.js`)
- Storefront UI → Order tracking: starts tracking (evidence: `app.js`)
- Storefront UI → Delivery estimates: selects region (evidence: `app.js`)
- Storefront UI → Mosque supply: prepares request (evidence: `app.js`)
- Storefront UI → Account and admin: opens panels (evidence: `app.js`)
- Checkout → Browser storage: stores demo data (evidence: `README.md`)
- Order tracking → Browser storage: reads local data (evidence: `app.js`)
- Account and admin → Browser storage: reads and saves (evidence: `app.js`)
- Mosque supply → WhatsApp: prepares message (evidence: `app.js`)
- Shopping cart → WhatsApp: prepares message (evidence: `app.js`)
