# mohamednavith/stylix---ai-outfit-suggestor architecture

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

- Interactive diagram: https://gitdiagram.com/mohamednavith/stylix---ai-outfit-suggestor
- Repository: https://github.com/mohamednavith/stylix---ai-outfit-suggestor

## Overview

Stylix lets people catalog clothing, manage laundry and wardrobe rotation, and get context-aware outfit plans through a web/mobile dashboard or Telegram. The main flow runs from client requests through the FastAPI gateway to wardrobe or planning agents, which use Supabase-backed state and return catalog or outfit results. README-described calendar/weather context and Telegram integration are shown as capabilities, but sampled excerpts do not establish all of their runtime wiring; those relationships are omitted or marked unverified.

Main entry points: [`backend/agents/coordinator.py`](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/coordinator.py) (Cycle coordinator), [`frontend/src/App.jsx`](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/App.jsx) (Stylix dashboard), [`backend/main.py`](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/main.py) (FastAPI gateway), [`backend/agents/wardrobe.py`](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/wardrobe.py) (Wardrobe agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User interfaces"]
  node_webapp["Stylix dashboard<br/>[App.jsx]"]
  node_plan_ui["Routine planner<br/>[RoutinePlan.jsx]"]
  node_catalog_ui["Wardrobe catalog"]
  node_laundry_ui["Laundry hub<br/>[LaundryHub.jsx]"]
  node_admin_ui["Admin panel<br/>[AdminPanel.jsx]"]
  node_preview["3D mannequin"]
end

subgraph group_backend["API and orchestration"]
  node_gateway["FastAPI gateway<br/>[main.py]"]
  node_coordinator["Cycle coordinator<br/>[coordinator.py]"]
end

subgraph group_agents["Wardrobe intelligence"]
  node_wardrobe_agent["Wardrobe agent<br/>[wardrobe.py]"]
  node_stylist["Stylist agent<br/>[stylist.py]"]
  node_context["Calendar and weather context<br/>[coordinator.py]"]
end

subgraph group_state["Persistence and integrations"]
  node_database[("Wardrobe and plans<br/>[database.py]")]
  node_credentials["API configuration<br/>[config_keys.py]"]
  node_supabase[("Supabase")]
  node_gemini{{"Gemini Vision"}}
  node_groq{{"Groq Vision"}}
  node_bot_api{{"Telegram Bot API"}}
end

node_person(("Wardrobe user"))
node_telegram(("Telegram user"))

node_person -->|"uses"| node_webapp
node_webapp -->|"renders"| node_plan_ui
node_webapp -->|"renders"| node_catalog_ui
node_webapp -->|"renders"| node_laundry_ui
node_webapp -->|"renders"| node_admin_ui
node_plan_ui -->|"renders"| node_preview
node_webapp -.->|"requests"| node_gateway
node_plan_ui -->|"requests"| node_gateway
node_gateway -->|"orchestrates"| node_coordinator
node_gateway -.->|"catalogs garments"| node_wardrobe_agent
node_coordinator -->|"generates plans"| node_stylist
node_coordinator -->|"updates laundry"| node_wardrobe_agent
node_coordinator -->|"reads and writes"| node_database
node_stylist -->|"reads and writes"| node_database
node_wardrobe_agent -->|"reads and writes"| node_database
node_database -->|"persists remotely"| node_supabase
node_wardrobe_agent -->|"classifies images"| node_gemini
node_wardrobe_agent -->|"tries first"| node_groq
node_credentials -->|"configures"| node_database
node_credentials -->|"supplies keys"| node_wardrobe_agent
node_coordinator -->|"builds schedule context"| node_context
node_context -->|"informs plan"| node_coordinator
node_telegram -->|"sends messages"| node_bot_api
node_bot_api -->|"posts webhook"| node_gateway
node_gateway -->|"replies"| node_bot_api
node_coordinator -.->|"uses calendar and weather"| node_context

click node_webapp "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/App.jsx"
click node_plan_ui "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/RoutinePlan.jsx"
click node_catalog_ui "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/WardrobeCatalog.jsx"
click node_laundry_ui "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/LaundryHub.jsx"
click node_admin_ui "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/AdminPanel.jsx"
click node_preview "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/MannequinPreview.jsx"
click node_gateway "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/main.py"
click node_coordinator "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/coordinator.py"
click node_wardrobe_agent "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/wardrobe.py"
click node_stylist "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/stylist.py"
click node_database "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/database.py"
click node_credentials "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/config_keys.py"
click node_context "https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/coordinator.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_webapp,node_plan_ui,node_catalog_ui,node_laundry_ui,node_admin_ui,node_preview,node_person,node_telegram toneBlue
class node_gateway,node_coordinator toneAmber
class node_wardrobe_agent,node_stylist,node_context toneMint
class node_database,node_credentials,node_supabase,node_gemini,node_groq,node_bot_api toneRose
```

## Components

### User interfaces

- [Stylix dashboard](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Routine planner](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/RoutinePlan.jsx): `frontend/src/components/RoutinePlan.jsx`
- [Wardrobe catalog](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/WardrobeCatalog.jsx): `frontend/src/components/WardrobeCatalog.jsx`
- [Laundry hub](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/LaundryHub.jsx): `frontend/src/components/LaundryHub.jsx`
- [Admin panel](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/AdminPanel.jsx): `frontend/src/components/AdminPanel.jsx`
- [3D mannequin](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/frontend/src/components/MannequinPreview.jsx): `frontend/src/components/MannequinPreview.jsx`

### API and orchestration

- [FastAPI gateway](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/main.py): `backend/main.py`
- [Cycle coordinator](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/coordinator.py): `backend/agents/coordinator.py`

### Wardrobe intelligence

- [Wardrobe agent](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/wardrobe.py): `backend/agents/wardrobe.py`
- [Stylist agent](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/stylist.py): `backend/agents/stylist.py`
- [Calendar and weather context](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/agents/coordinator.py): `backend/agents/coordinator.py`

### Persistence and integrations

- [Wardrobe and plans](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/database.py): `backend/database.py`
- [API configuration](https://github.com/mohamednavith/stylix---ai-outfit-suggestor/blob/main/backend/config_keys.py): `backend/config_keys.py`
- **Supabase**
- **Gemini Vision**
- **Groq Vision**
- **Telegram Bot API**

### Other components

- **Wardrobe user**
- **Telegram user**

## Connections

- Wardrobe user → Stylix dashboard: uses (evidence: `README.md`)
- Stylix dashboard → Routine planner: renders (evidence: `frontend/src/App.jsx`)
- Stylix dashboard → Wardrobe catalog: renders (evidence: `frontend/src/App.jsx`)
- Stylix dashboard → Laundry hub: renders (evidence: `frontend/src/App.jsx`)
- Stylix dashboard → Admin panel: renders (evidence: `frontend/src/App.jsx`)
- Routine planner → 3D mannequin: renders (evidence: `frontend/src/components/RoutinePlan.jsx`)
- Stylix dashboard → FastAPI gateway: requests
- Routine planner → FastAPI gateway: requests (evidence: `frontend/src/components/RoutinePlan.jsx`)
- FastAPI gateway → Cycle coordinator: orchestrates (evidence: `backend/main.py`)
- FastAPI gateway → Wardrobe agent: catalogs garments
- Cycle coordinator → Stylist agent: generates plans (evidence: `backend/agents/coordinator.py`)
- Cycle coordinator → Wardrobe agent: updates laundry (evidence: `backend/agents/coordinator.py`)
- Cycle coordinator → Wardrobe and plans: reads and writes (evidence: `backend/agents/coordinator.py`)
- Stylist agent → Wardrobe and plans: reads and writes (evidence: `backend/agents/stylist.py`)
- Wardrobe agent → Wardrobe and plans: reads and writes (evidence: `backend/agents/wardrobe.py`)
- Wardrobe and plans → Supabase: persists remotely (evidence: `backend/database.py`)
- Wardrobe agent → Gemini Vision: classifies images (evidence: `backend/agents/wardrobe.py`)
- Wardrobe agent → Groq Vision: tries first (evidence: `backend/agents/wardrobe.py`)
- API configuration → Wardrobe and plans: configures (evidence: `backend/database.py`)
- API configuration → Wardrobe agent: supplies keys (evidence: `backend/agents/wardrobe.py`)
- Cycle coordinator → Calendar and weather context: builds schedule context (evidence: `backend/agents/coordinator.py`)
- Calendar and weather context → Cycle coordinator: informs plan (evidence: `backend/agents/coordinator.py`)
- Telegram user → Telegram Bot API: sends messages (evidence: `README.md`)
- Telegram Bot API → FastAPI gateway: posts webhook (evidence: `README.md`)
- FastAPI gateway → Telegram Bot API: replies (evidence: `backend/main.py`)
- Cycle coordinator → Calendar and weather context: uses calendar and weather (evidence: `backend/agents/coordinator.py`)
