# chelsealoreengaspar/leilo-blinds architecture

> Architecture diagram of the GitHub repository chelsealoreengaspar/leilo-blinds, 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/chelsealoreengaspar/leilo-blinds
- Repository: https://github.com/chelsealoreengaspar/leilo-blinds

## Overview

Leilo Blinds is a browser-based blind sales and order-management app. Staff sign in, select blind styles and fabrics, configure a customer’s order, preview and price it, then submit it; administrators can review orders, update statuses, add charges, view summaries, and print acknowledgements. The graph separates the storefront and admin workflows from shared services and Supabase-backed data access. Some page excerpts are partial; edges for those pages rely on the SOURCE INDEX’s import references, and unsampled behavior is not inferred.

Main entry points: [`src/pages/StorefrontPage.js`](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/pages/StorefrontPage.js) (Storefront), [`src/pages/AdminPage.js`](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/pages/AdminPage.js) (Admin Page), [`src/main.js`](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/main.js) (App Router), [`src/config/SupabaseClient.js`](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/config/SupabaseClient.js) (Supabase Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and Access"]
  node_router["App Router<br/>[main.js]"]
  node_login["Login Page<br/>[LoginPage.js]"]
end

subgraph group_sales["Order Sales"]
  node_storefront["Storefront<br/>[StorefrontPage.js]"]
  node_catalog["Fabric Catalog"]
  node_styles["Blind Styles<br/>[StyleRepository.js]"]
  node_cartitem["Cart Item<br/>[CartItem.js]"]
  node_cart["Shopping Cart<br/>[Cart.js]"]
  node_preview["Blind Preview<br/>[BlindPreview.js]"]
end

subgraph group_admin["Order Management"]
  node_admin["Admin Page<br/>[AdminPage.js]"]
  node_reports["Order Reports<br/>[ReportService.js]"]
end

subgraph group_shared["Shared Services and Data"]
  node_auth["Authentication<br/>[AuthService.js]"]
  node_pricing["Live Pricing<br/>[PricingService.js]"]
  node_orders["Order Repository<br/>[OrderRepository.js]"]
  node_shopinfo["Shop Settings<br/>[ShopInfo.js]"]
  node_brand["Brand Display<br/>[Brand.js]"]
  node_format["Formatting<br/>[format.js]"]
  node_supabaseclient["Supabase Client<br/>[SupabaseClient.js]"]
end

node_staff(("Staff"))
node_supabase[("Supabase")]

node_staff -->|"opens app"| node_router
node_router -->|"checks role"| node_auth
node_router -->|"renders"| node_login
node_router -->|"renders"| node_storefront
node_router -->|"routes admin"| node_admin
node_login -->|"uses auth"| node_auth
node_auth -->|"gets client"| node_supabaseclient
node_storefront -->|"loads fabrics"| node_catalog
node_storefront -->|"loads styles"| node_styles
node_storefront -->|"creates items"| node_cartitem
node_storefront -->|"uses cart"| node_cart
node_storefront -->|"shows prices"| node_pricing
node_storefront -->|"renders preview"| node_preview
node_storefront -->|"places orders"| node_orders
node_cart -->|"calculates totals"| node_pricing
node_catalog -->|"gets client"| node_supabaseclient
node_styles -->|"gets client"| node_supabaseclient
node_orders -->|"gets client"| node_supabaseclient
node_supabaseclient -->|"connects"| node_supabase
node_admin -->|"loads and updates"| node_orders
node_admin -->|"summarizes orders"| node_reports
node_admin -->|"reads settings"| node_shopinfo
node_admin -->|"signs out"| node_auth
node_storefront -->|"renders branding"| node_brand
node_admin -->|"renders branding"| node_brand
node_login -->|"renders branding"| node_brand
node_preview -->|"escapes text"| node_format
node_storefront -->|"formats display"| node_format
node_admin -->|"formats display"| node_format

click node_router "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/main.js"
click node_login "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/pages/LoginPage.js"
click node_auth "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/services/AuthService.js"
click node_storefront "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/pages/StorefrontPage.js"
click node_catalog "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/repositories/FabricRepository.js"
click node_styles "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/repositories/StyleRepository.js"
click node_cartitem "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/models/CartItem.js"
click node_cart "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/services/Cart.js"
click node_pricing "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/services/PricingService.js"
click node_preview "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/components/BlindPreview.js"
click node_orders "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/repositories/OrderRepository.js"
click node_admin "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/pages/AdminPage.js"
click node_reports "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/services/ReportService.js"
click node_shopinfo "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/config/ShopInfo.js"
click node_brand "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/components/Brand.js"
click node_format "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/utils/format.js"
click node_supabaseclient "https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/config/SupabaseClient.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_router,node_login toneBlue
class node_storefront,node_catalog,node_styles,node_cartitem,node_cart,node_preview,node_supabase toneAmber
class node_admin,node_reports toneMint
class node_auth,node_pricing,node_orders,node_shopinfo,node_brand,node_format,node_supabaseclient toneRose
class node_staff toneIndigo
```

## Components

### App and Access

- [App Router](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/main.js): `src/main.js`
- [Login Page](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/pages/LoginPage.js): `src/pages/LoginPage.js`

### Order Sales

- [Storefront](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/pages/StorefrontPage.js): `src/pages/StorefrontPage.js`
- [Fabric Catalog](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/repositories/FabricRepository.js): `src/repositories/FabricRepository.js`
- [Blind Styles](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/repositories/StyleRepository.js): `src/repositories/StyleRepository.js`
- [Cart Item](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/models/CartItem.js): `src/models/CartItem.js`
- [Shopping Cart](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/services/Cart.js): `src/services/Cart.js`
- [Blind Preview](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/components/BlindPreview.js): `src/components/BlindPreview.js`

### Order Management

- [Admin Page](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/pages/AdminPage.js): `src/pages/AdminPage.js`
- [Order Reports](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/services/ReportService.js): `src/services/ReportService.js`

### Shared Services and Data

- [Authentication](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/services/AuthService.js): `src/services/AuthService.js`
- [Live Pricing](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/services/PricingService.js): `src/services/PricingService.js`
- [Order Repository](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/repositories/OrderRepository.js): `src/repositories/OrderRepository.js`
- [Shop Settings](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/config/ShopInfo.js): `src/config/ShopInfo.js`
- [Brand Display](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/components/Brand.js): `src/components/Brand.js`
- [Formatting](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/utils/format.js): `src/utils/format.js`
- [Supabase Client](https://github.com/chelsealoreengaspar/leilo-blinds/blob/main/src/config/SupabaseClient.js): `src/config/SupabaseClient.js`

### Other components

- **Staff**
- **Supabase**

## Connections

- Staff → App Router: opens app
- App Router → Authentication: checks role (evidence: `src/main.js`)
- App Router → Login Page: renders (evidence: `src/main.js`)
- App Router → Storefront: renders (evidence: `src/main.js`)
- App Router → Admin Page: routes admin (evidence: `src/main.js`)
- Login Page → Authentication: uses auth (evidence: `src/pages/LoginPage.js`)
- Authentication → Supabase Client: gets client (evidence: `src/services/AuthService.js`)
- Storefront → Fabric Catalog: loads fabrics (evidence: `src/pages/StorefrontPage.js`)
- Storefront → Blind Styles: loads styles (evidence: `src/pages/StorefrontPage.js`)
- Storefront → Cart Item: creates items (evidence: `src/pages/StorefrontPage.js`)
- Storefront → Shopping Cart: uses cart (evidence: `src/pages/StorefrontPage.js`)
- Storefront → Live Pricing: shows prices (evidence: `src/pages/StorefrontPage.js`)
- Storefront → Blind Preview: renders preview (evidence: `src/pages/StorefrontPage.js`)
- Storefront → Order Repository: places orders (evidence: `src/pages/StorefrontPage.js`)
- Shopping Cart → Live Pricing: calculates totals (evidence: `src/services/Cart.js`)
- Fabric Catalog → Supabase Client: gets client (evidence: `src/repositories/FabricRepository.js`)
- Blind Styles → Supabase Client: gets client (evidence: `src/repositories/StyleRepository.js`)
- Order Repository → Supabase Client: gets client (evidence: `src/repositories/OrderRepository.js`)
- Supabase Client → Supabase: connects (evidence: `src/config/SupabaseClient.js`)
- Admin Page → Order Repository: loads and updates (evidence: `src/pages/AdminPage.js`)
- Admin Page → Order Reports: summarizes orders (evidence: `src/pages/AdminPage.js`)
- Admin Page → Shop Settings: reads settings (evidence: `src/pages/AdminPage.js`)
- Admin Page → Authentication: signs out (evidence: `src/pages/AdminPage.js`)
- Storefront → Brand Display: renders branding (evidence: `src/pages/StorefrontPage.js`)
- Admin Page → Brand Display: renders branding (evidence: `src/pages/AdminPage.js`)
- Login Page → Brand Display: renders branding (evidence: `src/pages/LoginPage.js`)
- Blind Preview → Formatting: escapes text (evidence: `src/components/BlindPreview.js`)
- Storefront → Formatting: formats display (evidence: `src/pages/StorefrontPage.js`)
- Admin Page → Formatting: formats display (evidence: `src/pages/AdminPage.js`)
