# izhanruaif/glassify architecture

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

- Interactive diagram: https://gitdiagram.com/izhanruaif/glassify
- Repository: https://github.com/izhanruaif/glassify

## Overview

Glassify is a static glasses e-commerce site with a webcam-based virtual try-on feature, plus two React integration demos for the Jeeliz widget. The main user path is browsing the storefront, consulting product/SKU information, and opening the try-on experience; authentication and cart pages are additional documented capabilities. The excerpts support the storefront navigation script and the React demos’ widget lifecycle and controls, but do not show the static pages’ wiring or the underlying widget implementation, so those relationships are left unasserted.

Main entry points: [`dist/JeelizVTOWidget.js`](https://github.com/izhanruaif/glassify/blob/main/dist/JeelizVTOWidget.js) (Jeeliz widget), [`home.html`](https://github.com/izhanruaif/glassify/blob/main/home.html) (Home page), [`products.html`](https://github.com/izhanruaif/glassify/blob/main/products.html) (Products page), [`index3.html`](https://github.com/izhanruaif/glassify/blob/main/index3.html) (Try-on page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Glassify storefront"]
  node_home["Home page<br/>[home.html]"]
  node_products["Products page<br/>[products.html]"]
  node_catalog["SKU catalog<br/>[glassesSKU.csv]"]
  node_cart["Cart page<br/>[cart.html]"]
  node_authentication["Account pages<br/>[login.html]"]
  node_about["About page<br/>[about.html]"]
  node_contact["Contact page<br/>[contact.html]"]
  node_storefront_script["Storefront interactions<br/>[script.js]"]
end

subgraph group_vto["Virtual try-on"]
  node_tryon_page["Try-on page<br/>[index3.html]"]
  node_widget_bundle["Jeeliz widget<br/>[JeelizVTOWidget.js]"]
  node_models["Glasses models"]
end

subgraph group_reactdemo["React demos"]
  node_react_entry["Webpack demo entry<br/>[index.js]"]
  node_react_canvas["Webpack try-on canvas<br/>[AppCanvas.js]"]
  node_vite_entry["Vite demo entry<br/>[main.jsx]"]
  node_vite_app["Vite app<br/>[App.jsx]"]
  node_vite_canvas["Vite try-on canvas<br/>[AppCanvas.jsx]"]
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_home
node_shopper -->|"browses"| node_products
node_shopper -->|"manages cart"| node_cart
node_shopper -->|"signs in"| node_authentication
node_shopper -->|"visits"| node_about
node_shopper -->|"visits"| node_contact
node_home -->|"redirects"| node_tryon_page
node_products -->|"uses SKUs"| node_catalog
node_shopper -->|"opens demo"| node_react_entry
node_react_entry -->|"renders"| node_react_canvas
node_react_canvas -.->|"starts and controls"| node_widget_bundle
node_shopper -->|"opens demo"| node_vite_entry
node_vite_entry -->|"renders"| node_vite_app
node_vite_app -->|"renders"| node_vite_canvas
node_vite_canvas -.->|"starts and controls"| node_widget_bundle
node_tryon_page -.->|"uses"| node_widget_bundle
node_widget_bundle -.->|"loads models"| node_models

click node_home "https://github.com/izhanruaif/glassify/blob/main/home.html"
click node_products "https://github.com/izhanruaif/glassify/blob/main/products.html"
click node_catalog "https://github.com/izhanruaif/glassify/blob/main/glassesSKU.csv"
click node_cart "https://github.com/izhanruaif/glassify/blob/main/cart.html"
click node_authentication "https://github.com/izhanruaif/glassify/blob/main/login.html"
click node_about "https://github.com/izhanruaif/glassify/blob/main/about.html"
click node_contact "https://github.com/izhanruaif/glassify/blob/main/contact.html"
click node_storefront_script "https://github.com/izhanruaif/glassify/blob/main/js/script.js"
click node_tryon_page "https://github.com/izhanruaif/glassify/blob/main/index3.html"
click node_widget_bundle "https://github.com/izhanruaif/glassify/blob/main/dist/JeelizVTOWidget.js"
click node_models "https://github.com/izhanruaif/glassify/tree/main/glasses3D"
click node_react_entry "https://github.com/izhanruaif/glassify/blob/main/reactIntegrationDemo/src/index.js"
click node_react_canvas "https://github.com/izhanruaif/glassify/blob/main/reactIntegrationDemo/src/js/components/AppCanvas.js"
click node_vite_entry "https://github.com/izhanruaif/glassify/blob/main/reactViteIntegrationDemo/src/main.jsx"
click node_vite_app "https://github.com/izhanruaif/glassify/blob/main/reactViteIntegrationDemo/src/App.jsx"
click node_vite_canvas "https://github.com/izhanruaif/glassify/blob/main/reactViteIntegrationDemo/src/components/AppCanvas.jsx"

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_products,node_catalog,node_cart,node_authentication,node_about,node_contact,node_storefront_script toneBlue
class node_tryon_page,node_widget_bundle,node_models toneAmber
class node_react_entry,node_react_canvas,node_vite_entry,node_vite_app,node_vite_canvas toneMint
class node_shopper toneIndigo
```

## Components

### Glassify storefront

- [Home page](https://github.com/izhanruaif/glassify/blob/main/home.html): `home.html`
- [Products page](https://github.com/izhanruaif/glassify/blob/main/products.html): `products.html`
- [SKU catalog](https://github.com/izhanruaif/glassify/blob/main/glassesSKU.csv): `glassesSKU.csv`
- [Cart page](https://github.com/izhanruaif/glassify/blob/main/cart.html): `cart.html`
- [Account pages](https://github.com/izhanruaif/glassify/blob/main/login.html): `login.html`
- [About page](https://github.com/izhanruaif/glassify/blob/main/about.html): `about.html`
- [Contact page](https://github.com/izhanruaif/glassify/blob/main/contact.html): `contact.html`
- [Storefront interactions](https://github.com/izhanruaif/glassify/blob/main/js/script.js): `js/script.js`

### Virtual try-on

- [Try-on page](https://github.com/izhanruaif/glassify/blob/main/index3.html): `index3.html`
- [Jeeliz widget](https://github.com/izhanruaif/glassify/blob/main/dist/JeelizVTOWidget.js): `dist/JeelizVTOWidget.js`
- [Glasses models](https://github.com/izhanruaif/glassify/tree/main/glasses3D): `glasses3D`

### React demos

- [Webpack demo entry](https://github.com/izhanruaif/glassify/blob/main/reactIntegrationDemo/src/index.js): `reactIntegrationDemo/src/index.js`
- [Webpack try-on canvas](https://github.com/izhanruaif/glassify/blob/main/reactIntegrationDemo/src/js/components/AppCanvas.js): `reactIntegrationDemo/src/js/components/AppCanvas.js`
- [Vite demo entry](https://github.com/izhanruaif/glassify/blob/main/reactViteIntegrationDemo/src/main.jsx): `reactViteIntegrationDemo/src/main.jsx`
- [Vite app](https://github.com/izhanruaif/glassify/blob/main/reactViteIntegrationDemo/src/App.jsx): `reactViteIntegrationDemo/src/App.jsx`
- [Vite try-on canvas](https://github.com/izhanruaif/glassify/blob/main/reactViteIntegrationDemo/src/components/AppCanvas.jsx): `reactViteIntegrationDemo/src/components/AppCanvas.jsx`

### Other components

- **Shopper**

## Connections

- Shopper → Home page: browses (evidence: `README.md`)
- Shopper → Products page: browses (evidence: `README.md`)
- Shopper → Cart page: manages cart (evidence: `README.md`)
- Shopper → Account pages: signs in (evidence: `README.md`)
- Shopper → About page: visits (evidence: `README.md`)
- Shopper → Contact page: visits (evidence: `README.md`)
- Home page → Try-on page: redirects (evidence: `README.md`)
- Products page → SKU catalog: uses SKUs (evidence: `README.md`)
- Shopper → Webpack demo entry: opens demo (evidence: `reactIntegrationDemo/src/index.js`)
- Webpack demo entry → Webpack try-on canvas: renders (evidence: `reactIntegrationDemo/src/index.js`)
- Webpack try-on canvas → Jeeliz widget: starts and controls
- Shopper → Vite demo entry: opens demo (evidence: `reactViteIntegrationDemo/src/main.jsx`)
- Vite demo entry → Vite app: renders (evidence: `reactViteIntegrationDemo/src/main.jsx`)
- Vite app → Vite try-on canvas: renders (evidence: `reactViteIntegrationDemo/src/App.jsx`)
- Vite try-on canvas → Jeeliz widget: starts and controls
- Try-on page → Jeeliz widget: uses
- Jeeliz widget → Glasses models: loads models
