# anikahmedrudra/essentra architecture

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

- Interactive diagram: https://gitdiagram.com/anikahmedrudra/essentra
- Repository: https://github.com/anikahmedrudra/essentra

## Overview

Essentra is a fragrance-commerce storefront with customer accounts, checkout, delivery-area selection, promotions, and administration. The principal workflow is browsing the collection, adding items to a cart, completing checkout, and receiving an order confirmation. The graph includes documented routing, popup management, and the Supabase-backed data path. The README is empty and the source excerpts are partial, so some capabilities are represented by their main implementation file without inferred links to unsampled modules.

Main entry points: [`router.js`](https://github.com/anikahmedrudra/essentra/blob/main/router.js) (Page routing), [`script.js`](https://github.com/anikahmedrudra/essentra/blob/main/script.js) (Cart and checkout), [`popups.js`](https://github.com/anikahmedrudra/essentra/blob/main/popups.js) (Popup display), [`popups-admin.js`](https://github.com/anikahmedrudra/essentra/blob/main/popups-admin.js) (Popup manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_routing["Page routing<br/>[router.js]"]
  node_catalog["Product catalog<br/>[script.js]"]
  node_scent["Scent finder<br/>[script.js]"]
end

subgraph group_commerce["Commerce"]
  node_delivery["Delivery areas<br/>[locations.js]"]
  node_cart["Cart and checkout<br/>[script.js]"]
  node_orders["Orders and stock<br/>[script.js]"]
  node_accounts["Customer accounts<br/>[script.js]"]
end

subgraph group_operations["Operations"]
  node_admin["Store administration<br/>[script.js]"]
  node_popup_admin["Popup manager<br/>[popups-admin.js]"]
  node_popup_config["Popup offers<br/>[popups-config.js]"]
  node_popup_engine["Popup display<br/>[popups.js]"]
end

subgraph group_platform["Platform"]
  node_stability["Overlay stability<br/>[fixes.js]"]
  node_browser_state[("Browser storage")]
  node_supabase_client["Supabase client<br/>[supabase-config.js]"]
  node_supabase_service[("Supabase")]
end

node_visitor(("Visitor"))

node_visitor -->|"navigates"| node_routing
node_routing -->|"shows collection"| node_catalog
node_routing -->|"shows finder"| node_scent
node_routing -->|"shows account"| node_accounts
node_routing -->|"switches tab"| node_admin
node_popup_config -->|"configures offers"| node_popup_engine
node_popup_admin -->|"stores settings"| node_browser_state
node_popup_engine -->|"tracks display"| node_browser_state
node_popup_engine -->|"prefills coupon"| node_cart
node_cart -->|"creates order"| node_orders
node_cart -->|"requests confirmation"| node_supabase_service
node_orders -->|"saves orders"| node_browser_state
node_supabase_client -->|"creates client"| node_supabase_service

click node_routing "https://github.com/anikahmedrudra/essentra/blob/main/router.js"
click node_catalog "https://github.com/anikahmedrudra/essentra/blob/main/script.js"
click node_scent "https://github.com/anikahmedrudra/essentra/blob/main/script.js"
click node_delivery "https://github.com/anikahmedrudra/essentra/blob/main/locations.js"
click node_cart "https://github.com/anikahmedrudra/essentra/blob/main/script.js"
click node_orders "https://github.com/anikahmedrudra/essentra/blob/main/script.js"
click node_accounts "https://github.com/anikahmedrudra/essentra/blob/main/script.js"
click node_admin "https://github.com/anikahmedrudra/essentra/blob/main/script.js"
click node_popup_admin "https://github.com/anikahmedrudra/essentra/blob/main/popups-admin.js"
click node_popup_config "https://github.com/anikahmedrudra/essentra/blob/main/popups-config.js"
click node_popup_engine "https://github.com/anikahmedrudra/essentra/blob/main/popups.js"
click node_stability "https://github.com/anikahmedrudra/essentra/blob/main/fixes.js"
click node_supabase_client "https://github.com/anikahmedrudra/essentra/blob/main/supabase-config.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_routing,node_catalog,node_scent toneBlue
class node_delivery,node_cart,node_orders,node_accounts toneAmber
class node_admin,node_popup_admin,node_popup_config,node_popup_engine toneMint
class node_stability,node_browser_state,node_supabase_client,node_supabase_service toneRose
class node_visitor toneIndigo
```

## Components

### Storefront

- [Page routing](https://github.com/anikahmedrudra/essentra/blob/main/router.js): `router.js`
- [Product catalog](https://github.com/anikahmedrudra/essentra/blob/main/script.js): `script.js`
- [Scent finder](https://github.com/anikahmedrudra/essentra/blob/main/script.js): `script.js`

### Commerce

- [Delivery areas](https://github.com/anikahmedrudra/essentra/blob/main/locations.js): `locations.js`
- [Cart and checkout](https://github.com/anikahmedrudra/essentra/blob/main/script.js): `script.js`
- [Orders and stock](https://github.com/anikahmedrudra/essentra/blob/main/script.js): `script.js`
- [Customer accounts](https://github.com/anikahmedrudra/essentra/blob/main/script.js): `script.js`

### Operations

- [Store administration](https://github.com/anikahmedrudra/essentra/blob/main/script.js): `script.js`
- [Popup manager](https://github.com/anikahmedrudra/essentra/blob/main/popups-admin.js): `popups-admin.js`
- [Popup offers](https://github.com/anikahmedrudra/essentra/blob/main/popups-config.js): `popups-config.js`
- [Popup display](https://github.com/anikahmedrudra/essentra/blob/main/popups.js): `popups.js`

### Platform

- [Overlay stability](https://github.com/anikahmedrudra/essentra/blob/main/fixes.js): `fixes.js`
- **Browser storage**
- [Supabase client](https://github.com/anikahmedrudra/essentra/blob/main/supabase-config.js): `supabase-config.js`
- **Supabase**

### Other components

- **Visitor**

## Connections

- Visitor → Page routing: navigates (evidence: `router.js`)
- Page routing → Product catalog: shows collection (evidence: `router.js`)
- Page routing → Scent finder: shows finder (evidence: `router.js`)
- Page routing → Customer accounts: shows account (evidence: `router.js`)
- Page routing → Store administration: switches tab (evidence: `router.js`)
- Popup offers → Popup display: configures offers (evidence: `popups.js`)
- Popup manager → Browser storage: stores settings (evidence: `popups-admin.js`)
- Popup display → Browser storage: tracks display (evidence: `popups.js`)
- Popup display → Cart and checkout: prefills coupon (evidence: `popups.js`)
- Cart and checkout → Orders and stock: creates order (evidence: `script.js`)
- Cart and checkout → Supabase: requests confirmation (evidence: `script.js`)
- Orders and stock → Browser storage: saves orders (evidence: `script.js`)
- Supabase client → Supabase: creates client (evidence: `supabase-config.js`)
