# aqsa-yahya/apna-tailor-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/aqsa-yahya/apna-tailor-v2
- Repository: https://github.com/aqsa-yahya/apna-tailor-v2

## Overview

ApnaTailor is a React web app for browsing garment styles and preparing a visual design to share with a tailor. Visitors navigate from the home page to a catalog or AI builder; catalog selections open detail pages with tailor guidance and downloadable design cards, while the builder requests generated outfit images and can export its preview. The graph reflects documented routing and sampled calls. The README is only the Vite template, and unsampled modules are represented only where their paths and role are supported by the source index.

Main entry points: [`src/App.jsx`](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/App.jsx) (Route shell), [`src/pages/DesignDetail.jsx`](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/DesignDetail.jsx) (Design details), [`src/pages/DesignBuilder.jsx`](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/DesignBuilder.jsx) (Design builder), [`src/pages/Home.jsx`](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/Home.jsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[main.jsx]"]
  node_routes["Route shell<br/>[App.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_footer["Site footer<br/>[Footer.jsx]"]
end

subgraph group_browse["Style discovery"]
  node_home["Home page<br/>[Home.jsx]"]
  node_hero["Hero section<br/>[Hero.jsx]"]
  node_why["Value highlights<br/>[WhyUseUs.jsx]"]
  node_catalog["Design catalog<br/>[Design.jsx]"]
  node_designs["Design catalog data<br/>[designData.js]"]
  node_detail["Design details<br/>[DesignDetail.jsx]"]
  node_card["Design card export"]
  node_trending["Trending styles<br/>[TrendingStyles.jsx]"]
  node_trendingdata["Trending data<br/>[trendingDesigns.js]"]
end

subgraph group_create["Design creation"]
  node_builder["Design builder<br/>[DesignBuilder.jsx]"]
  node_imagegen["Image generation client<br/>[imageGen.js]"]
  node_api["Image endpoint<br/>[generate-image.js]"]
  node_gemini["Gemini helper<br/>[gemini.js]"]
end

subgraph group_info["Product information"]
  node_about["About page<br/>[About.jsx]"]
  node_how["How it works<br/>[HowItWorks.jsx]"]
  node_contact["Contact page<br/>[Contact.jsx]"]
end

node_visitor(("Visitor"))
node_image_service{{"Image generation service"}}

node_visitor -->|"opens app"| node_entry
node_entry -->|"renders"| node_routes
node_routes -->|"renders"| node_navbar
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_catalog
node_routes -->|"routes to"| node_builder
node_routes -->|"routes to"| node_trending
node_routes -->|"routes to"| node_detail
node_routes -->|"routes to"| node_about
node_routes -->|"routes to"| node_how
node_routes -->|"routes to"| node_contact
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_why
node_home -->|"renders"| node_footer
node_hero -->|"links to"| node_builder
node_catalog -->|"reads designs"| node_designs
node_catalog -->|"navigates to"| node_detail
node_detail -->|"reads details"| node_designs
node_detail -->|"requests export"| node_card
node_detail -->|"links to"| node_builder
node_trending -->|"reads styles"| node_trendingdata
node_builder -->|"requests images"| node_imagegen
node_imagegen -->|"fetches image"| node_api
node_builder -->|"exports preview"| node_image_service

click node_entry "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/main.jsx"
click node_routes "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/App.jsx"
click node_navbar "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/components/Navbar.jsx"
click node_home "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/Home.jsx"
click node_hero "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/components/Hero.jsx"
click node_why "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/components/WhyUseUs.jsx"
click node_footer "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/components/Footer.jsx"
click node_catalog "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/Design.jsx"
click node_designs "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/designData.js"
click node_detail "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/DesignDetail.jsx"
click node_card "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/downloadDesignCard.js"
click node_trending "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/TrendingStyles.jsx"
click node_trendingdata "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/trendingDesigns.js"
click node_builder "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/DesignBuilder.jsx"
click node_imagegen "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/lib/imageGen.js"
click node_api "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/netlify/functions/generate-image.js"
click node_gemini "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/lib/gemini.js"
click node_about "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/About.jsx"
click node_how "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/HowItWorks.jsx"
click node_contact "https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/Contact.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_entry,node_routes,node_navbar,node_footer toneBlue
class node_home,node_hero,node_why,node_catalog,node_designs,node_detail,node_card,node_trending,node_trendingdata toneAmber
class node_builder,node_imagegen,node_api,node_gemini toneMint
class node_about,node_how,node_contact toneRose
class node_visitor,node_image_service toneIndigo
```

## Components

### Application shell

- [React entry](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/main.jsx): `src/main.jsx`
- [Route shell](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Site footer](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`

### Style discovery

- [Home page](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Hero section](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/components/Hero.jsx): `src/components/Hero.jsx`
- [Value highlights](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/components/WhyUseUs.jsx): `src/components/WhyUseUs.jsx`
- [Design catalog](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/Design.jsx): `src/pages/Design.jsx`
- [Design catalog data](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/designData.js): `src/pages/designData.js`
- [Design details](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/DesignDetail.jsx): `src/pages/DesignDetail.jsx`
- [Design card export](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/downloadDesignCard.js): `src/pages/downloadDesignCard.js`
- [Trending styles](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/TrendingStyles.jsx): `src/pages/TrendingStyles.jsx`
- [Trending data](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/trendingDesigns.js): `src/pages/trendingDesigns.js`

### Design creation

- [Design builder](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/DesignBuilder.jsx): `src/pages/DesignBuilder.jsx`
- [Image generation client](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/lib/imageGen.js): `src/lib/imageGen.js`
- [Image endpoint](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/netlify/functions/generate-image.js): `netlify/functions/generate-image.js`
- [Gemini helper](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/lib/gemini.js): `src/lib/gemini.js`

### Product information

- [About page](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/About.jsx): `src/pages/About.jsx`
- [How it works](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/HowItWorks.jsx): `src/pages/HowItWorks.jsx`
- [Contact page](https://github.com/aqsa-yahya/apna-tailor-v2/blob/main/src/pages/Contact.jsx): `src/pages/Contact.jsx`

### Other components

- **Visitor**
- **Image generation service**

## Connections

- Visitor → React entry: opens app (evidence: `src/main.jsx`)
- React entry → Route shell: renders (evidence: `src/main.jsx`)
- Route shell → Navigation: renders (evidence: `src/App.jsx`)
- Route shell → Home page: routes to (evidence: `src/App.jsx`)
- Route shell → Design catalog: routes to (evidence: `src/App.jsx`)
- Route shell → Design builder: routes to (evidence: `src/App.jsx`)
- Route shell → Trending styles: routes to (evidence: `src/App.jsx`)
- Route shell → Design details: routes to (evidence: `src/App.jsx`)
- Route shell → About page: routes to (evidence: `src/App.jsx`)
- Route shell → How it works: routes to (evidence: `src/App.jsx`)
- Route shell → Contact page: routes to (evidence: `src/App.jsx`)
- Home page → Hero section: renders (evidence: `src/pages/Home.jsx`)
- Home page → Value highlights: renders (evidence: `src/pages/Home.jsx`)
- Home page → Site footer: renders (evidence: `src/pages/Home.jsx`)
- Hero section → Design builder: links to (evidence: `src/components/Hero.jsx`)
- Design catalog → Design catalog data: reads designs (evidence: `src/pages/Design.jsx`)
- Design catalog → Design details: navigates to (evidence: `src/pages/Design.jsx`)
- Design details → Design catalog data: reads details (evidence: `src/pages/DesignDetail.jsx`)
- Design details → Design card export: requests export (evidence: `src/pages/DesignDetail.jsx`)
- Design details → Design builder: links to (evidence: `src/pages/DesignDetail.jsx`)
- Trending styles → Trending data: reads styles (evidence: `src/pages/TrendingStyles.jsx`)
- Design builder → Image generation client: requests images (evidence: `src/pages/DesignBuilder.jsx`)
- Image generation client → Image endpoint: fetches image (evidence: `src/lib/imageGen.js`)
- Design builder → Image generation service: exports preview (evidence: `src/pages/DesignBuilder.jsx`)
