# imamhasan1/lamiya-fashion-house architecture

> Architecture diagram of the GitHub repository imamhasan1/lamiya-fashion-house, 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/imamhasan1/lamiya-fashion-house
- Repository: https://github.com/imamhasan1/lamiya-fashion-house

## Overview

Lamiya Fashion House is a customer-facing kamiz catalogue with an owner-only admin panel, not a commerce checkout system. Customers browse, filter, search, and inspect products, then contact the business directly. The app loads the live catalogue when Supabase is configured and otherwise has local sample data. The owner signs in to manage products, photos, and categories. Relationships for unsampled setup and access-policy details are limited to what the README documents.

Main entry points: [`src/data/catalog-api.ts`](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/data/catalog-api.ts) (Catalogue API), [`src/App.tsx`](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/App.tsx) (Catalogue interface), [`src/components/AdminPanel.tsx`](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/components/AdminPanel.tsx) (Admin panel), [`src/lib/supabase.ts`](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/lib/supabase.ts) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_app["Catalogue interface<br/>[App.tsx]"]
end

subgraph group_catalog["Catalogue domain"]
  node_local_products["Sample products<br/>[products.ts]"]
  node_local_categories["Sample categories<br/>[categories.ts]"]
  node_catalog_api["Catalogue API<br/>[catalog-api.ts]"]
  node_product_model["Product model<br/>[product.ts]"]
  node_category_model["Category model<br/>[category.ts]"]
end

subgraph group_admin["Administration"]
  node_admin_panel["Admin panel<br/>[AdminPanel.tsx]"]
end

subgraph group_platform["Supabase platform"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_supabase_types["Database types<br/>[supabase-types.ts]"]
  node_supabase_db[("Supabase database")]
  node_photo_storage[("Product photo bucket")]
  node_supabase_auth["Supabase Auth"]
end

node_customer(("Customer"))
node_owner(("Catalogue owner"))

node_customer -->|"browses"| node_app
node_customer -->|"contacts business"| node_app
node_owner -->|"opens admin"| node_app
node_app -->|"loads catalogue"| node_catalog_api
node_app -->|"uses fallback"| node_local_products
node_app -->|"uses fallback"| node_local_categories
node_app -->|"renders"| node_admin_panel
node_admin_panel -->|"manages catalogue"| node_catalog_api
node_admin_panel -->|"signs in"| node_supabase_auth
node_catalog_api -->|"requires client"| node_supabase_client
node_catalog_api -->|"reads and writes"| node_supabase_db
node_catalog_api -->|"uploads and removes"| node_photo_storage
node_supabase_client -->|"uses schema types"| node_supabase_types
node_supabase_client -->|"provides auth client"| node_supabase_auth
node_catalog_api -->|"maps products"| node_product_model
node_catalog_api -->|"maps categories"| node_category_model

click node_app "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/App.tsx"
click node_admin_panel "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/components/AdminPanel.tsx"
click node_local_products "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/data/products.ts"
click node_local_categories "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/data/categories.ts"
click node_catalog_api "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/data/catalog-api.ts"
click node_product_model "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/types/product.ts"
click node_category_model "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/types/category.ts"
click node_supabase_client "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/lib/supabase.ts"
click node_supabase_types "https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/lib/supabase-types.ts"

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_app toneBlue
class node_local_products,node_local_categories,node_catalog_api,node_product_model,node_category_model toneAmber
class node_admin_panel toneMint
class node_supabase_client,node_supabase_types,node_supabase_db,node_photo_storage,node_supabase_auth toneRose
class node_customer,node_owner toneIndigo
```

## Components

### Web experience

- [Catalogue interface](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/App.tsx): `src/App.tsx`

### Catalogue domain

- [Sample products](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/data/products.ts): `src/data/products.ts`
- [Sample categories](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/data/categories.ts): `src/data/categories.ts`
- [Catalogue API](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/data/catalog-api.ts): `src/data/catalog-api.ts`
- [Product model](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/types/product.ts): `src/types/product.ts`
- [Category model](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/types/category.ts): `src/types/category.ts`

### Administration

- [Admin panel](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/components/AdminPanel.tsx): `src/components/AdminPanel.tsx`

### Supabase platform

- [Supabase client](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Database types](https://github.com/imamhasan1/lamiya-fashion-house/blob/main/src/lib/supabase-types.ts): `src/lib/supabase-types.ts`
- **Supabase database**
- **Product photo bucket**
- **Supabase Auth**

### Other components

- **Customer**
- **Catalogue owner**

## Connections

- Customer → Catalogue interface: browses (evidence: `README.md`)
- Customer → Catalogue interface: contacts business (evidence: `README.md`)
- Catalogue owner → Catalogue interface: opens admin (evidence: `README.md`)
- Catalogue interface → Catalogue API: loads catalogue (evidence: `src/App.tsx`)
- Catalogue interface → Sample products: uses fallback (evidence: `src/App.tsx`)
- Catalogue interface → Sample categories: uses fallback (evidence: `src/App.tsx`)
- Catalogue interface → Admin panel: renders (evidence: `src/App.tsx`)
- Admin panel → Catalogue API: manages catalogue (evidence: `src/components/AdminPanel.tsx`)
- Admin panel → Supabase Auth: signs in (evidence: `README.md`)
- Catalogue API → Supabase client: requires client (evidence: `src/data/catalog-api.ts`)
- Catalogue API → Supabase database: reads and writes (evidence: `src/data/catalog-api.ts`)
- Catalogue API → Product photo bucket: uploads and removes (evidence: `src/data/catalog-api.ts`)
- Supabase client → Database types: uses schema types (evidence: `src/lib/supabase.ts`)
- Supabase client → Supabase Auth: provides auth client (evidence: `src/lib/supabase.ts`)
- Catalogue API → Product model: maps products (evidence: `src/data/catalog-api.ts`)
- Catalogue API → Category model: maps categories (evidence: `src/data/catalog-api.ts`)
