# richard190104/domveli-fe architecture

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

- Interactive diagram: https://gitdiagram.com/richard190104/domveli-fe
- Repository: https://github.com/richard190104/domveli-fe

## Overview

DOMVELI is a browser-side customization layer for a Shoptet storefront, loaded through a single script and branching by page type. The main flow is storefront page → conditional enhancements → rendered shopping, content, and navigation features. The graph reflects the loader and sampled call/event relationships; unsampled modules are included where the source index or loader identifies their roles, but their internal connections are not inferred.

Main entry points: [`loader.src.js`](https://github.com/richard190104/domveli-fe/blob/main/loader.src.js) (Page-aware loader), [`scripts/domveli-config-loader.js`](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-config-loader.js) (Config loader), [`scripts/domveli.js`](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli.js) (Homepage features), [`scripts/domveli-footer.js`](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-footer.js) (Configurable footer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_loading["Loading and configuration"]
  node_loader["Page-aware loader<br/>[loader.src.js]"]
  node_config_loader["Config loader"]
  node_config["Storefront configuration<br/>[domveli-config.js]"]
end

subgraph group_storefront["Storefront experience"]
  node_home["Homepage features<br/>[domveli.js]"]
  node_carousel["Carousel engine"]
  node_footer["Configurable footer<br/>[domveli-footer.js]"]
  node_menu_alt["Category image alt text"]
end

subgraph group_commerce["Shopping interactions"]
  node_listing["Product listing and quantities<br/>[domveli-listing.js]"]
  node_cart_popup["Add-to-cart popup"]
  node_product_benefits["Product benefits"]
end

subgraph group_content["Content and engagement"]
  node_notifications["Banners and popups"]
  node_blog["Blog listing enhancements<br/>[domveli-blog.js]"]
  node_share["Article sharing<br/>[domveli-share.js]"]
  node_gallery_tracking["Gallery interaction tracking"]
end

node_shopper(("Shopper"))
node_shoptet["Shoptet storefront"]
node_external_config["Hosted config JSON"]
node_analytics["Google Analytics"]

node_shopper -->|"browses"| node_shoptet
node_shoptet -->|"loads script"| node_loader
node_loader -->|"fetches config"| node_external_config
node_loader -->|"loads module"| node_config_loader
node_loader -->|"loads module"| node_carousel
node_loader -->|"loads module"| node_footer
node_loader -->|"loads module"| node_notifications
node_loader -->|"loads module"| node_cart_popup
node_loader -->|"loads module"| node_menu_alt
node_loader -->|"loads on blog"| node_share
node_loader -->|"loads on homepage"| node_home
node_loader -->|"loads on category"| node_listing
node_loader -->|"loads on product"| node_product_benefits
node_loader -->|"loads on product"| node_gallery_tracking
node_loader -->|"loads on blog"| node_blog
node_home -->|"loads config"| node_config_loader
node_home -->|"creates carousels"| node_carousel
node_footer -->|"loads config"| node_config_loader
node_notifications -->|"loads config"| node_config_loader
node_listing -->|"updates cart"| node_shoptet
node_cart_popup -->|"handles cart events"| node_shoptet
node_gallery_tracking -->|"sends events"| node_analytics
node_shopper -->|"shares article"| node_share

click node_loader "https://github.com/richard190104/domveli-fe/blob/main/loader.src.js"
click node_config_loader "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-config-loader.js"
click node_config "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-config.js"
click node_home "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli.js"
click node_carousel "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-carousel.js"
click node_footer "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-footer.js"
click node_menu_alt "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-menu-alt.js"
click node_listing "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-listing.js"
click node_cart_popup "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-cart-popup.js"
click node_product_benefits "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-product-benefits.js"
click node_notifications "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-notifications.js"
click node_blog "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-blog.js"
click node_share "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-share.js"
click node_gallery_tracking "https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-gallery-tracking.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_loader,node_config_loader,node_config toneBlue
class node_home,node_carousel,node_footer,node_menu_alt toneAmber
class node_listing,node_cart_popup,node_product_benefits toneMint
class node_notifications,node_blog,node_share,node_gallery_tracking toneRose
class node_shopper,node_shoptet,node_external_config,node_analytics toneIndigo
```

## Components

### Loading and configuration

- [Page-aware loader](https://github.com/richard190104/domveli-fe/blob/main/loader.src.js): `loader.src.js`
- [Config loader](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-config-loader.js): `scripts/domveli-config-loader.js`
- [Storefront configuration](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-config.js): `scripts/domveli-config.js`

### Storefront experience

- [Homepage features](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli.js): `scripts/domveli.js`
- [Carousel engine](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-carousel.js): `scripts/domveli-carousel.js`
- [Configurable footer](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-footer.js): `scripts/domveli-footer.js`
- [Category image alt text](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-menu-alt.js): `scripts/domveli-menu-alt.js`

### Shopping interactions

- [Product listing and quantities](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-listing.js): `scripts/domveli-listing.js`
- [Add-to-cart popup](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-cart-popup.js): `scripts/domveli-cart-popup.js`
- [Product benefits](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-product-benefits.js): `scripts/domveli-product-benefits.js`

### Content and engagement

- [Banners and popups](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-notifications.js): `scripts/domveli-notifications.js`
- [Blog listing enhancements](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-blog.js): `scripts/domveli-blog.js`
- [Article sharing](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-share.js): `scripts/domveli-share.js`
- [Gallery interaction tracking](https://github.com/richard190104/domveli-fe/blob/main/scripts/domveli-gallery-tracking.js): `scripts/domveli-gallery-tracking.js`

### Other components

- **Shopper**
- **Shoptet storefront**
- **Hosted config JSON**
- **Google Analytics**

## Connections

- Shopper → Shoptet storefront: browses (evidence: `README.md`)
- Shoptet storefront → Page-aware loader: loads script (evidence: `README.md`)
- Page-aware loader → Hosted config JSON: fetches config (evidence: `loader.src.js`)
- Page-aware loader → Config loader: loads module (evidence: `loader.src.js`)
- Page-aware loader → Carousel engine: loads module (evidence: `loader.src.js`)
- Page-aware loader → Configurable footer: loads module (evidence: `loader.src.js`)
- Page-aware loader → Banners and popups: loads module (evidence: `loader.src.js`)
- Page-aware loader → Add-to-cart popup: loads module (evidence: `loader.src.js`)
- Page-aware loader → Category image alt text: loads module (evidence: `loader.src.js`)
- Page-aware loader → Article sharing: loads on blog (evidence: `loader.src.js`)
- Page-aware loader → Homepage features: loads on homepage (evidence: `loader.src.js`)
- Page-aware loader → Product listing and quantities: loads on category (evidence: `loader.src.js`)
- Page-aware loader → Product benefits: loads on product (evidence: `loader.src.js`)
- Page-aware loader → Gallery interaction tracking: loads on product (evidence: `loader.src.js`)
- Page-aware loader → Blog listing enhancements: loads on blog (evidence: `loader.src.js`)
- Homepage features → Config loader: loads config (evidence: `scripts/domveli.js`)
- Homepage features → Carousel engine: creates carousels (evidence: `scripts/domveli.js`)
- Configurable footer → Config loader: loads config (evidence: `scripts/domveli-footer.js`)
- Banners and popups → Config loader: loads config (evidence: `scripts/domveli-notifications.js`)
- Product listing and quantities → Shoptet storefront: updates cart (evidence: `scripts/domveli-listing.js`)
- Add-to-cart popup → Shoptet storefront: handles cart events (evidence: `scripts/domveli-cart-popup.js`)
- Gallery interaction tracking → Google Analytics: sends events (evidence: `scripts/domveli-gallery-tracking.js`)
- Shopper → Article sharing: shares article (evidence: `scripts/domveli-share.js`)
