# rajaselvam19/smart-dress-advisor architecture

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

- Interactive diagram: https://gitdiagram.com/rajaselvam19/smart-dress-advisor
- Repository: https://github.com/rajaselvam19/smart-dress-advisor

## Overview

This is a client-side fashion outfit recommendation app. A visitor starts from the landing page, opens a six-step preference wizard, and receives a locally generated outfit with clothing, footwear, accessories, and styling guidance. The wizard owns preference state and invokes the recommendation logic; the result view renders that response. The graph emphasizes this workflow and its reusable UI layer. Source excerpts establish the main calls; unsampled peripheral UI components and styling details are omitted.

Main entry points: [`src/components/FashionWizard.tsx`](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/FashionWizard.tsx) (Preference Wizard), [`src/pages/Index.tsx`](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/pages/Index.tsx) (Landing Page), [`src/components/OptionCard.tsx`](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/OptionCard.tsx) (Option Card), [`src/components/RecommendationDisplay.tsx`](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/RecommendationDisplay.tsx) (Recommendation Display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_entry["React Entry<br/>[main.tsx]"]
  node_app_shell["App Routes<br/>[App.tsx]"]
end

subgraph group_journey["User Journey"]
  node_landing["Landing Page<br/>[Index.tsx]"]
  node_header["Header<br/>[Header.tsx]"]
  node_hero["Hero Section<br/>[HeroSection.tsx]"]
  node_wizard["Preference Wizard<br/>[FashionWizard.tsx]"]
  node_occasion["Occasion Step<br/>[OccasionStep.tsx]"]
  node_gender["Gender Step<br/>[GenderStep.tsx]"]
  node_age["Age Step<br/>[AgeStep.tsx]"]
  node_body_type["Body Type Step<br/>[BodyTypeStep.tsx]"]
  node_skin_tone["Skin Tone Step<br/>[SkinToneStep.tsx]"]
  node_budget["Budget Step<br/>[BudgetStep.tsx]"]
end

subgraph group_recommendation["Recommendation"]
  node_preferences["Preference Types<br/>[fashion.ts]"]
  node_generator["Outfit Generator"]
  node_result["Recommendation Display"]
end

subgraph group_ui["Reusable UI"]
  node_step_indicator["Step Indicator<br/>[StepIndicator.tsx]"]
  node_outfit_card["Outfit Card<br/>[OutfitCard.tsx]"]
  node_option_card["Option Card<br/>[OptionCard.tsx]"]
  node_button["Button<br/>[button.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_landing
node_entry -->|"renders"| node_app_shell
node_app_shell -->|"routes to"| node_landing
node_landing -->|"renders"| node_header
node_landing -->|"renders"| node_hero
node_landing -->|"shows on start"| node_wizard
node_hero -.->|"starts wizard"| node_landing
node_wizard -->|"renders"| node_step_indicator
node_wizard -->|"renders step"| node_occasion
node_wizard -->|"renders step"| node_gender
node_wizard -->|"renders step"| node_age
node_wizard -->|"renders step"| node_body_type
node_wizard -->|"renders step"| node_skin_tone
node_wizard -->|"renders step"| node_budget
node_wizard -->|"tracks values"| node_preferences
node_wizard -->|"requests recommendation"| node_generator
node_generator -->|"uses types"| node_preferences
node_wizard -->|"passes result"| node_result
node_result -->|"renders sections"| node_outfit_card
node_occasion -->|"renders options"| node_option_card
node_gender -->|"renders options"| node_option_card
node_age -->|"renders options"| node_option_card
node_body_type -->|"renders options"| node_option_card
node_budget -->|"renders options"| node_option_card
node_wizard -->|"uses controls"| node_button
node_result -->|"uses actions"| node_button

click node_entry "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/main.tsx"
click node_app_shell "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/App.tsx"
click node_landing "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/pages/Index.tsx"
click node_header "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/Header.tsx"
click node_hero "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/HeroSection.tsx"
click node_wizard "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/FashionWizard.tsx"
click node_step_indicator "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/StepIndicator.tsx"
click node_occasion "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/OccasionStep.tsx"
click node_gender "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/GenderStep.tsx"
click node_age "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/AgeStep.tsx"
click node_body_type "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/BodyTypeStep.tsx"
click node_skin_tone "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/SkinToneStep.tsx"
click node_budget "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/BudgetStep.tsx"
click node_preferences "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/types/fashion.ts"
click node_generator "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/lib/fashionRecommendations.ts"
click node_result "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/RecommendationDisplay.tsx"
click node_outfit_card "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/OutfitCard.tsx"
click node_option_card "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/OptionCard.tsx"
click node_button "https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/ui/button.tsx"

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_app_shell toneBlue
class node_landing,node_header,node_hero,node_wizard,node_occasion,node_gender,node_age,node_body_type,node_skin_tone,node_budget toneAmber
class node_preferences,node_generator,node_result toneMint
class node_step_indicator,node_outfit_card,node_option_card,node_button toneRose
class node_visitor toneIndigo
```

## Components

### App Shell

- [React Entry](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/main.tsx): `src/main.tsx`
- [App Routes](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/App.tsx): `src/App.tsx`

### User Journey

- [Landing Page](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/pages/Index.tsx): `src/pages/Index.tsx`
- [Header](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Hero Section](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/HeroSection.tsx): `src/components/HeroSection.tsx`
- [Preference Wizard](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/FashionWizard.tsx): `src/components/FashionWizard.tsx`
- [Occasion Step](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/OccasionStep.tsx): `src/components/steps/OccasionStep.tsx`
- [Gender Step](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/GenderStep.tsx): `src/components/steps/GenderStep.tsx`
- [Age Step](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/AgeStep.tsx): `src/components/steps/AgeStep.tsx`
- [Body Type Step](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/BodyTypeStep.tsx): `src/components/steps/BodyTypeStep.tsx`
- [Skin Tone Step](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/SkinToneStep.tsx): `src/components/steps/SkinToneStep.tsx`
- [Budget Step](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/steps/BudgetStep.tsx): `src/components/steps/BudgetStep.tsx`

### Recommendation

- [Preference Types](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/types/fashion.ts): `src/types/fashion.ts`
- [Outfit Generator](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/lib/fashionRecommendations.ts): `src/lib/fashionRecommendations.ts`
- [Recommendation Display](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/RecommendationDisplay.tsx): `src/components/RecommendationDisplay.tsx`

### Reusable UI

- [Step Indicator](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/StepIndicator.tsx): `src/components/StepIndicator.tsx`
- [Outfit Card](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/OutfitCard.tsx): `src/components/OutfitCard.tsx`
- [Option Card](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/OptionCard.tsx): `src/components/OptionCard.tsx`
- [Button](https://github.com/rajaselvam19/smart-dress-advisor/blob/main/src/components/ui/button.tsx): `src/components/ui/button.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Landing Page: opens app (evidence: `src/pages/Index.tsx`)
- React Entry → App Routes: renders (evidence: `src/main.tsx`)
- App Routes → Landing Page: routes to (evidence: `src/App.tsx`)
- Landing Page → Header: renders (evidence: `src/pages/Index.tsx`)
- Landing Page → Hero Section: renders (evidence: `src/pages/Index.tsx`)
- Landing Page → Preference Wizard: shows on start (evidence: `src/pages/Index.tsx`)
- Hero Section → Landing Page: starts wizard (evidence: `src/pages/Index.tsx`)
- Preference Wizard → Step Indicator: renders (evidence: `src/components/FashionWizard.tsx`)
- Preference Wizard → Occasion Step: renders step (evidence: `src/components/FashionWizard.tsx`)
- Preference Wizard → Gender Step: renders step (evidence: `src/components/FashionWizard.tsx`)
- Preference Wizard → Age Step: renders step (evidence: `src/components/FashionWizard.tsx`)
- Preference Wizard → Body Type Step: renders step (evidence: `src/components/FashionWizard.tsx`)
- Preference Wizard → Skin Tone Step: renders step (evidence: `src/components/FashionWizard.tsx`)
- Preference Wizard → Budget Step: renders step (evidence: `src/components/FashionWizard.tsx`)
- Preference Wizard → Preference Types: tracks values (evidence: `src/components/FashionWizard.tsx`)
- Preference Wizard → Outfit Generator: requests recommendation (evidence: `src/components/FashionWizard.tsx`)
- Outfit Generator → Preference Types: uses types (evidence: `src/lib/fashionRecommendations.ts`)
- Preference Wizard → Recommendation Display: passes result (evidence: `src/components/FashionWizard.tsx`)
- Recommendation Display → Outfit Card: renders sections (evidence: `src/components/RecommendationDisplay.tsx`)
- Occasion Step → Option Card: renders options (evidence: `src/components/steps/OccasionStep.tsx`)
- Gender Step → Option Card: renders options (evidence: `src/components/steps/GenderStep.tsx`)
- Age Step → Option Card: renders options (evidence: `src/components/steps/AgeStep.tsx`)
- Body Type Step → Option Card: renders options (evidence: `src/components/steps/BodyTypeStep.tsx`)
- Budget Step → Option Card: renders options (evidence: `src/components/steps/BudgetStep.tsx`)
- Preference Wizard → Button: uses controls (evidence: `src/components/FashionWizard.tsx`)
- Recommendation Display → Button: uses actions (evidence: `src/components/RecommendationDisplay.tsx`)
