# ziadwaleed23/elioderma architecture

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

- Interactive diagram: https://gitdiagram.com/ziadwaleed23/elioderma
- Repository: https://github.com/ziadwaleed23/elioderma

## Overview

Elio is a bilingual static storefront for aesthetic products. Visitors browse and search the catalog, inspect product details, build a persistent cart, and submit an order through WhatsApp; order details can also be logged to Google Sheets. The graph includes the documented catalog, localization, live-data, legal, and presentation capabilities. Some subsystem links are documented in the README rather than shown in sampled code; unsampled implementation details are not inferred.

Main entry points: [`js/shop-ui.js`](https://github.com/ziadwaleed23/elioderma/blob/main/js/shop-ui.js) (Product and cart UI), [`js/products.js`](https://github.com/ziadwaleed23/elioderma/blob/main/js/products.js) (Product records), [`index.html`](https://github.com/ziadwaleed23/elioderma/blob/main/index.html) (Home page), [`js/search.js`](https://github.com/ziadwaleed23/elioderma/blob/main/js/search.js) (Global search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home page<br/>[index.html]"]
  node_site["Shared site behavior<br/>[app.js]"]
  node_carousel["Category carousel"]
  node_loader["Page loader<br/>[loader.js]"]
  node_animations["Scroll animations<br/>[animations.js]"]
end

subgraph group_catalog["Catalog"]
  node_search["Global search<br/>[search.js]"]
  node_catalogpage["Product catalog<br/>[shop.js]"]
  node_filters["Catalog filters<br/>[filters.js]"]
  node_products["Product records<br/>[products.js]"]
  node_prices["Price formatting<br/>[prices.js]"]
end

subgraph group_checkout["Ordering"]
  node_shopui["Product and cart UI<br/>[shop-ui.js]"]
  node_cart[("Persistent cart")]
  node_orderlog["Order sync<br/>[shop-ui.js]"]
end

subgraph group_language["Language and content"]
  node_i18n["Language runtime<br/>[i18n.js]"]
  node_strings["Translated UI strings<br/>[i18n-strings.js]"]
  node_arabic["Arabic product text<br/>[products-ar.js]"]
  node_legal["Arabic legal content<br/>[legal-ar.js]"]
  node_legalpages["Legal pages<br/>[privacy.html]"]
end

subgraph group_operations["Operations"]
  node_apps["Apps Script receiver<br/>[Code.gs]"]
  node_config["Site configuration<br/>[config.js]"]
  node_live["Live catalog data<br/>[live-data.js]"]
end

node_customer(("Visitor"))
node_whatsapp(("WhatsApp"))
node_sheets[("Order tracker")]
node_firebase(("Firebase service"))

node_customer -->|"visits"| node_home
node_customer -->|"browses"| node_catalogpage
node_home -.->|"shows categories"| node_carousel
node_customer -->|"searches"| node_search
node_search -->|"matches"| node_products
node_search -->|"opens result"| node_catalogpage
node_catalogpage -->|"filters and sorts"| node_products
node_filters -->|"filters"| node_products
node_customer -->|"selects products"| node_shopui
node_shopui -->|"renders items"| node_products
node_shopui -->|"reads and writes"| node_cart
node_shopui -.->|"calculates totals"| node_prices
node_customer -->|"submits order"| node_shopui
node_shopui -->|"opens message"| node_whatsapp
node_shopui -->|"prepares payload"| node_orderlog
node_orderlog -->|"POSTs order"| node_apps
node_apps -->|"writes row"| node_sheets
node_config -->|"configures sync"| node_orderlog
node_live -.->|"fetches catalog"| node_firebase
node_live -->|"updates catalog"| node_products
node_i18n -.->|"loads translations"| node_strings
node_arabic -.->|"translates descriptions"| node_products
node_legalpages -->|"uses Arabic content"| node_legal
node_customer -.->|"reads policies"| node_legalpages
node_loader -.->|"reveals page"| node_home
node_animations -.->|"animates content"| node_home

click node_home "https://github.com/ziadwaleed23/elioderma/blob/main/index.html"
click node_site "https://github.com/ziadwaleed23/elioderma/blob/main/js/app.js"
click node_carousel "https://github.com/ziadwaleed23/elioderma/blob/main/js/categories-carousel.js"
click node_search "https://github.com/ziadwaleed23/elioderma/blob/main/js/search.js"
click node_catalogpage "https://github.com/ziadwaleed23/elioderma/blob/main/js/shop.js"
click node_filters "https://github.com/ziadwaleed23/elioderma/blob/main/js/filters.js"
click node_products "https://github.com/ziadwaleed23/elioderma/blob/main/js/products.js"
click node_prices "https://github.com/ziadwaleed23/elioderma/blob/main/js/prices.js"
click node_shopui "https://github.com/ziadwaleed23/elioderma/blob/main/js/shop-ui.js"
click node_orderlog "https://github.com/ziadwaleed23/elioderma/blob/main/js/shop-ui.js"
click node_apps "https://github.com/ziadwaleed23/elioderma/blob/main/google-apps-script/Code.gs"
click node_config "https://github.com/ziadwaleed23/elioderma/blob/main/js/config.js"
click node_live "https://github.com/ziadwaleed23/elioderma/blob/main/js/live-data.js"
click node_i18n "https://github.com/ziadwaleed23/elioderma/blob/main/js/i18n.js"
click node_strings "https://github.com/ziadwaleed23/elioderma/blob/main/js/i18n-strings.js"
click node_arabic "https://github.com/ziadwaleed23/elioderma/blob/main/js/products-ar.js"
click node_legal "https://github.com/ziadwaleed23/elioderma/blob/main/js/legal-ar.js"
click node_legalpages "https://github.com/ziadwaleed23/elioderma/blob/main/privacy.html"
click node_loader "https://github.com/ziadwaleed23/elioderma/blob/main/js/loader.js"
click node_animations "https://github.com/ziadwaleed23/elioderma/blob/main/js/animations.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_home,node_site,node_carousel,node_loader,node_animations toneBlue
class node_search,node_catalogpage,node_filters,node_products,node_prices,node_sheets toneAmber
class node_shopui,node_cart,node_orderlog toneMint
class node_i18n,node_strings,node_arabic,node_legal,node_legalpages toneRose
class node_apps,node_config,node_live,node_customer,node_whatsapp,node_firebase toneIndigo
```

## Components

### Storefront

- [Home page](https://github.com/ziadwaleed23/elioderma/blob/main/index.html): `index.html`
- [Shared site behavior](https://github.com/ziadwaleed23/elioderma/blob/main/js/app.js): `js/app.js`
- [Category carousel](https://github.com/ziadwaleed23/elioderma/blob/main/js/categories-carousel.js): `js/categories-carousel.js`
- [Page loader](https://github.com/ziadwaleed23/elioderma/blob/main/js/loader.js): `js/loader.js`
- [Scroll animations](https://github.com/ziadwaleed23/elioderma/blob/main/js/animations.js): `js/animations.js`

### Catalog

- [Global search](https://github.com/ziadwaleed23/elioderma/blob/main/js/search.js): `js/search.js`
- [Product catalog](https://github.com/ziadwaleed23/elioderma/blob/main/js/shop.js): `js/shop.js`
- [Catalog filters](https://github.com/ziadwaleed23/elioderma/blob/main/js/filters.js): `js/filters.js`
- [Product records](https://github.com/ziadwaleed23/elioderma/blob/main/js/products.js): `js/products.js`
- [Price formatting](https://github.com/ziadwaleed23/elioderma/blob/main/js/prices.js): `js/prices.js`

### Ordering

- [Product and cart UI](https://github.com/ziadwaleed23/elioderma/blob/main/js/shop-ui.js): `js/shop-ui.js`
- **Persistent cart**
- [Order sync](https://github.com/ziadwaleed23/elioderma/blob/main/js/shop-ui.js): `js/shop-ui.js`

### Language and content

- [Language runtime](https://github.com/ziadwaleed23/elioderma/blob/main/js/i18n.js): `js/i18n.js`
- [Translated UI strings](https://github.com/ziadwaleed23/elioderma/blob/main/js/i18n-strings.js): `js/i18n-strings.js`
- [Arabic product text](https://github.com/ziadwaleed23/elioderma/blob/main/js/products-ar.js): `js/products-ar.js`
- [Arabic legal content](https://github.com/ziadwaleed23/elioderma/blob/main/js/legal-ar.js): `js/legal-ar.js`
- [Legal pages](https://github.com/ziadwaleed23/elioderma/blob/main/privacy.html): `privacy.html`

### Operations

- [Apps Script receiver](https://github.com/ziadwaleed23/elioderma/blob/main/google-apps-script/Code.gs): `google-apps-script/Code.gs`
- [Site configuration](https://github.com/ziadwaleed23/elioderma/blob/main/js/config.js): `js/config.js`
- [Live catalog data](https://github.com/ziadwaleed23/elioderma/blob/main/js/live-data.js): `js/live-data.js`

### Other components

- **Visitor**
- **WhatsApp**
- **Order tracker**
- **Firebase service**

## Connections

- Visitor → Home page: visits (evidence: `README.md`)
- Visitor → Product catalog: browses (evidence: `README.md`)
- Home page → Category carousel: shows categories
- Visitor → Global search: searches (evidence: `js/search.js`)
- Global search → Product records: matches (evidence: `js/search.js`)
- Global search → Product catalog: opens result (evidence: `js/search.js`)
- Product catalog → Product records: filters and sorts (evidence: `js/shop.js`)
- Catalog filters → Product records: filters (evidence: `js/filters.js`)
- Visitor → Product and cart UI: selects products (evidence: `README.md`)
- Product and cart UI → Product records: renders items (evidence: `js/shop-ui.js`)
- Product and cart UI → Persistent cart: reads and writes (evidence: `README.md`)
- Product and cart UI → Price formatting: calculates totals
- Visitor → Product and cart UI: submits order (evidence: `README.md`)
- Product and cart UI → WhatsApp: opens message (evidence: `README.md`)
- Product and cart UI → Order sync: prepares payload (evidence: `js/shop-ui.js`)
- Order sync → Apps Script receiver: POSTs order (evidence: `README.md`)
- Apps Script receiver → Order tracker: writes row (evidence: `README.md`)
- Site configuration → Order sync: configures sync (evidence: `README.md`)
- Live catalog data → Firebase service: fetches catalog
- Live catalog data → Product records: updates catalog (evidence: `js/live-data.js`)
- Language runtime → Translated UI strings: loads translations
- Arabic product text → Product records: translates descriptions
- Legal pages → Arabic legal content: uses Arabic content (evidence: `js/legal-ar.js`)
- Visitor → Legal pages: reads policies
- Page loader → Home page: reveals page
- Scroll animations → Home page: animates content
