# devenderbohra/ai-wardrobe-stylist architecture

> Architecture diagram of the GitHub repository devenderbohra/ai-wardrobe-stylist, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devenderbohra/ai-wardrobe-stylist
- Repository: https://github.com/devenderbohra/ai-wardrobe-stylist

## Overview

AI Wardrobe Stylist lets a user set style preferences, add clothing, organize a digital wardrobe, and request AI-generated outfit visualizations. The graph follows the sampled page-to-API calls and the sampled clothing API’s storage branches. Other API internals are represented by their exact route paths, but their unsampled persistence and dispatch details are not inferred.

Main entry points: [`src/utils/api.ts`](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/utils/api.ts) (API client), [`src/pages/profile/index.tsx`](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/profile/index.tsx) (Style profile), [`src/pages/api/clothing/index.ts`](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/clothing/index.ts) (Clothing API), [`src/lib/demo-session.ts`](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/demo-session.ts) (Demo session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_home["Welcome<br/>[index.tsx]"]
  node_profile["Style profile<br/>[index.tsx]"]
  node_add["Add clothing<br/>[index.tsx]"]
  node_wardrobe["Digital wardrobe<br/>[index.tsx]"]
  node_styling["AI styling<br/>[index.tsx]"]
end

subgraph group_api["Application API"]
  node_profile_api["Profile API<br/>[profile.ts]"]
  node_upload_api["Image upload API<br/>[image.ts]"]
  node_clothing_api["Clothing API<br/>[index.ts]"]
  node_item_api["Clothing item API<br/>[&#91;id&#93;.ts]"]
  node_import_api["URL import API<br/>[import-url.ts]"]
  node_outfit_api["Outfit generation API<br/>[generate-outfit.ts]"]
end

subgraph group_services["Services and data"]
  node_session["Demo session<br/>[demo-session.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_gemini_service["Gemini service<br/>[gemini.ts]"]
  node_seed_data["Seed wardrobe data<br/>[seed-data.ts]"]
  node_prisma[("Prisma database<br/>[prisma.ts]")]
  node_memory_db[("Memory database<br/>[memory-db.ts]")]
end

subgraph group_integrations["External integration"]
  node_gemini["Google Gemini"]
end

node_user(("User"))

node_user -->|"opens"| node_home
node_home -->|"links to"| node_profile
node_home -->|"links to"| node_wardrobe
node_profile -->|"reads session"| node_session
node_add -->|"reads session"| node_session
node_wardrobe -->|"reads session"| node_session
node_styling -->|"reads session"| node_session
node_profile -->|"calls"| node_api_client
node_api_client -->|"requests"| node_profile_api
node_profile -->|"uploads to"| node_upload_api
node_add -->|"calls"| node_api_client
node_api_client -->|"requests"| node_upload_api
node_api_client -->|"requests"| node_import_api
node_wardrobe -->|"calls"| node_api_client
node_api_client -->|"requests"| node_clothing_api
node_api_client -->|"requests"| node_item_api
node_styling -->|"calls"| node_api_client
node_api_client -->|"requests"| node_outfit_api
node_clothing_api -->|"reads and writes"| node_memory_db
node_clothing_api -->|"reads and writes"| node_prisma
node_clothing_api -->|"creates seed items"| node_seed_data
node_outfit_api -->|"delegates generation"| node_gemini_service
node_gemini_service -->|"generates images"| node_gemini

click node_home "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/index.tsx"
click node_profile "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/profile/index.tsx"
click node_add "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/add/index.tsx"
click node_wardrobe "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/wardrobe/index.tsx"
click node_styling "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/style/index.tsx"
click node_profile_api "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/user/profile.ts"
click node_upload_api "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/upload/image.ts"
click node_clothing_api "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/clothing/index.ts"
click node_item_api "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/clothing/%5Bid%5D.ts"
click node_import_api "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/clothing/import-url.ts"
click node_outfit_api "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/ai/generate-outfit.ts"
click node_session "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/demo-session.ts"
click node_api_client "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/utils/api.ts"
click node_gemini_service "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/gemini.ts"
click node_seed_data "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/seed-data.ts"
click node_prisma "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/prisma.ts"
click node_memory_db "https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/memory-db.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_home,node_profile,node_add,node_wardrobe,node_styling,node_user toneBlue
class node_profile_api,node_upload_api,node_clothing_api,node_item_api,node_import_api,node_outfit_api toneAmber
class node_session,node_api_client,node_gemini_service,node_seed_data,node_prisma,node_memory_db toneMint
class node_gemini toneRose
```

## Components

### User experience

- [Welcome](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/index.tsx): `src/pages/index.tsx`
- [Style profile](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/profile/index.tsx): `src/pages/profile/index.tsx`
- [Add clothing](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/add/index.tsx): `src/pages/add/index.tsx`
- [Digital wardrobe](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/wardrobe/index.tsx): `src/pages/wardrobe/index.tsx`
- [AI styling](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/style/index.tsx): `src/pages/style/index.tsx`

### Application API

- [Profile API](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/user/profile.ts): `src/pages/api/user/profile.ts`
- [Image upload API](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/upload/image.ts): `src/pages/api/upload/image.ts`
- [Clothing API](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/clothing/index.ts): `src/pages/api/clothing/index.ts`
- [Clothing item API](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/clothing/%5Bid%5D.ts): `src/pages/api/clothing/[id].ts`
- [URL import API](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/clothing/import-url.ts): `src/pages/api/clothing/import-url.ts`
- [Outfit generation API](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/pages/api/ai/generate-outfit.ts): `src/pages/api/ai/generate-outfit.ts`

### Services and data

- [Demo session](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/demo-session.ts): `src/lib/demo-session.ts`
- [API client](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/utils/api.ts): `src/utils/api.ts`
- [Gemini service](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/gemini.ts): `src/lib/gemini.ts`
- [Seed wardrobe data](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/seed-data.ts): `src/lib/seed-data.ts`
- [Prisma database](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/prisma.ts): `src/lib/prisma.ts`
- [Memory database](https://github.com/devenderbohra/ai-wardrobe-stylist/blob/main/src/lib/memory-db.ts): `src/lib/memory-db.ts`

### External integration

- **Google Gemini**

### Other components

- **User**

## Connections

- User → Welcome: opens
- Welcome → Style profile: links to
- Welcome → Digital wardrobe: links to
- Style profile → Demo session: reads session
- Add clothing → Demo session: reads session
- Digital wardrobe → Demo session: reads session
- AI styling → Demo session: reads session
- Style profile → API client: calls
- API client → Profile API: requests
- Style profile → Image upload API: uploads to
- Add clothing → API client: calls
- API client → Image upload API: requests
- API client → URL import API: requests
- Digital wardrobe → API client: calls
- API client → Clothing API: requests
- API client → Clothing item API: requests
- AI styling → API client: calls
- API client → Outfit generation API: requests
- Clothing API → Memory database: reads and writes
- Clothing API → Prisma database: reads and writes
- Clothing API → Seed wardrobe data: creates seed items
- Outfit generation API → Gemini service: delegates generation
- Gemini service → Google Gemini: generates images
