# revathikrishapk/wearwise-ai architecture

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

- Interactive diagram: https://gitdiagram.com/revathikrishapk/wearwise-ai
- Repository: https://github.com/revathikrishapk/wearwise-ai

## Overview

WearWise is a Flask fashion recommender: users provide occasion and location, and the app combines wardrobe data with live weather before generating an outfit and catalog image. Users can manage a wardrobe, revisit saved outfits, and access shopping links; admins review analytics, users, occasions, and feedback. The graph centers the sampled runtime in app.py; other feature links rely on README descriptions, since their implementation details were not sampled.

Main entry points: [`app.py`](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py) (Flask routes), [`result.html`](https://github.com/revathikrishapk/wearwise-ai/blob/main/result.html) (Recommendation result), [`login.html`](https://github.com/revathikrishapk/wearwise-ai/blob/main/login.html) (Login), [`register.html`](https://github.com/revathikrishapk/wearwise-ai/blob/main/register.html) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask routes<br/>[app.py]"]
  node_mysql[("MySQL data")]
end

subgraph group_recommend["Outfit recommendations"]
  node_weather_api["OpenWeather API"]
  node_openai["OpenAI models"]
  node_weather_context["Weather context<br/>[app.py]"]
  node_wardrobe_context["Wardrobe context<br/>[app.py]"]
  node_outfit_generation["Outfit generation<br/>[app.py]"]
  node_image_generation["Outfit image<br/>[app.py]"]
  node_shopping_links["Shopping links<br/>[app.py]"]
  node_result_page["Recommendation result<br/>[result.html]"]
end

subgraph group_account["User features"]
  node_login_page["Login<br/>[login.html]"]
  node_register_page["Registration<br/>[register.html]"]
  node_wardrobe_page["Wardrobe<br/>[wardrobe.html]"]
  node_wardrobe_storage[("Wardrobe records<br/>[app.py]")]
  node_saved_page["Saved outfits<br/>[saved.html]"]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin analytics"]
  node_admin_users["User management<br/>[admin_users.html]"]
  node_admin_occasions["Occasion management"]
  node_feedback[("Feedback records<br/>[app.py]")]
end

node_user(("User"))
node_admin_actor(("Admin"))

node_user -->|"submits requests"| node_flask
node_admin_actor -->|"uses admin routes"| node_flask
node_flask -->|"queries and writes"| node_mysql
node_flask -->|"fetches weather"| node_weather_context
node_weather_context -->|"requests conditions"| node_weather_api
node_flask -->|"loads wardrobe"| node_wardrobe_context
node_flask -->|"builds prompt"| node_outfit_generation
node_outfit_generation -->|"requests recommendation"| node_openai
node_flask -->|"requests image"| node_image_generation
node_image_generation -->|"generates image"| node_openai
node_flask -->|"renders result"| node_result_page
node_flask -->|"renders saved outfits"| node_saved_page
node_flask -->|"renders wardrobe"| node_wardrobe_page
node_flask -->|"renders dashboard"| node_admin_dashboard
node_flask -->|"stores wardrobe items"| node_wardrobe_storage
node_flask -->|"stores feedback"| node_feedback
node_flask -.->|"provides links"| node_shopping_links
node_flask -.->|"serves authentication"| node_login_page
node_flask -.->|"serves authentication"| node_register_page
node_flask -.->|"manages users"| node_admin_users
node_flask -.->|"manages occasions"| node_admin_occasions

click node_flask "https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py"
click node_weather_context "https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py"
click node_wardrobe_context "https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py"
click node_outfit_generation "https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py"
click node_image_generation "https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py"
click node_shopping_links "https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py"
click node_result_page "https://github.com/revathikrishapk/wearwise-ai/blob/main/result.html"
click node_login_page "https://github.com/revathikrishapk/wearwise-ai/blob/main/login.html"
click node_register_page "https://github.com/revathikrishapk/wearwise-ai/blob/main/register.html"
click node_wardrobe_page "https://github.com/revathikrishapk/wearwise-ai/blob/main/wardrobe.html"
click node_wardrobe_storage "https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py"
click node_saved_page "https://github.com/revathikrishapk/wearwise-ai/blob/main/saved.html"
click node_admin_dashboard "https://github.com/revathikrishapk/wearwise-ai/blob/main/admin_dashboard.html"
click node_admin_users "https://github.com/revathikrishapk/wearwise-ai/blob/main/admin_users.html"
click node_admin_occasions "https://github.com/revathikrishapk/wearwise-ai/blob/main/admin_occasions.html"
click node_feedback "https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py"

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_flask,node_mysql,node_user toneBlue
class node_weather_api,node_openai,node_weather_context,node_wardrobe_context,node_outfit_generation,node_image_generation,node_shopping_links,node_result_page toneAmber
class node_login_page,node_register_page,node_wardrobe_page,node_wardrobe_storage,node_saved_page toneMint
class node_admin_dashboard,node_admin_users,node_admin_occasions,node_feedback toneRose
class node_admin_actor toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py): `app.py`
- **MySQL data**

### Outfit recommendations

- **OpenWeather API**
- **OpenAI models**
- [Weather context](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py): `app.py`
- [Wardrobe context](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py): `app.py`
- [Outfit generation](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py): `app.py`
- [Outfit image](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py): `app.py`
- [Shopping links](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py): `app.py`
- [Recommendation result](https://github.com/revathikrishapk/wearwise-ai/blob/main/result.html): `result.html`

### User features

- [Login](https://github.com/revathikrishapk/wearwise-ai/blob/main/login.html): `login.html`
- [Registration](https://github.com/revathikrishapk/wearwise-ai/blob/main/register.html): `register.html`
- [Wardrobe](https://github.com/revathikrishapk/wearwise-ai/blob/main/wardrobe.html): `wardrobe.html`
- [Wardrobe records](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py): `app.py`
- [Saved outfits](https://github.com/revathikrishapk/wearwise-ai/blob/main/saved.html): `saved.html`

### Administration

- [Admin analytics](https://github.com/revathikrishapk/wearwise-ai/blob/main/admin_dashboard.html): `admin_dashboard.html`
- [User management](https://github.com/revathikrishapk/wearwise-ai/blob/main/admin_users.html): `admin_users.html`
- [Occasion management](https://github.com/revathikrishapk/wearwise-ai/blob/main/admin_occasions.html): `admin_occasions.html`
- [Feedback records](https://github.com/revathikrishapk/wearwise-ai/blob/main/app.py): `app.py`

### Other components

- **User**
- **Admin**

## Connections

- User → Flask routes: submits requests (evidence: `README.md`)
- Admin → Flask routes: uses admin routes (evidence: `README.md`)
- Flask routes → MySQL data: queries and writes (evidence: `app.py`)
- Flask routes → Weather context: fetches weather (evidence: `app.py`)
- Weather context → OpenWeather API: requests conditions (evidence: `app.py`)
- Flask routes → Wardrobe context: loads wardrobe (evidence: `app.py`)
- Flask routes → Outfit generation: builds prompt (evidence: `app.py`)
- Outfit generation → OpenAI models: requests recommendation (evidence: `app.py`)
- Flask routes → Outfit image: requests image (evidence: `app.py`)
- Outfit image → OpenAI models: generates image (evidence: `app.py`)
- Flask routes → Recommendation result: renders result (evidence: `app.py`)
- Flask routes → Saved outfits: renders saved outfits (evidence: `app.py`)
- Flask routes → Wardrobe: renders wardrobe (evidence: `app.py`)
- Flask routes → Admin analytics: renders dashboard (evidence: `app.py`)
- Flask routes → Wardrobe records: stores wardrobe items (evidence: `app.py`)
- Flask routes → Feedback records: stores feedback (evidence: `app.py`)
- Flask routes → Shopping links: provides links (evidence: `README.md`)
- Flask routes → Login: serves authentication (evidence: `README.md`)
- Flask routes → Registration: serves authentication (evidence: `README.md`)
- Flask routes → User management: manages users (evidence: `README.md`)
- Flask routes → Occasion management: manages occasions (evidence: `README.md`)
