# abhijith-utla/stylemaxx architecture

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

- Interactive diagram: https://gitdiagram.com/abhijith-utla/stylemaxx
- Repository: https://github.com/abhijith-utla/stylemaxx

## Overview

StyleMax is a Flask web app for authenticated face-color analysis and outfit matching. The implemented workflow accepts an item image and type at `/chef_up`, matches it against paired apparel features, uses a KNN model to find similar complementary items, and returns suggestions for display. A separate upload route analyzes facial features and stores palette results in the session. The README describes React and Firebase capabilities, but those implementations are not in the supplied tree or excerpts; the shown server configures Auth0. Those documented integrations are marked as unverified.

Main entry points: [`outfit_matcher.py`](https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py) (Outfit matcher), [`app.py`](https://github.com/Abhijith-utla/Stylemaxx/blob/main/app.py) (Flask routes), [`templates/index.html`](https://github.com/Abhijith-utla/Stylemaxx/blob/main/templates/index.html) (Style interface), [`facerec.py`](https://github.com/Abhijith-utla/Stylemaxx/blob/main/facerec.py) (Face analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask routes<br/>[app.py]"]
  node_auth["Auth0 login<br/>[app.py]"]
  node_template["Style interface<br/>[index.html]"]
  node_session[("Session results<br/>[app.py]")]
end

subgraph group_analysis["Style analysis"]
  node_face["Face analysis<br/>[facerec.py]"]
  node_palette["Color palette<br/>[facerec.py]"]
end

subgraph group_matching["Outfit matching"]
  node_matcher["Outfit matcher<br/>[outfit_matcher.py]"]
  node_orb["ORB features<br/>[outfit_matcher.py]"]
  node_paired["Paired apparel data<br/>[outfit_matcher.py]"]
  node_resnet["ResNet features<br/>[outfit_matcher.py]"]
  node_knn["KNN neighbor search<br/>[outfit_matcher.py]"]
  node_model[("KNN model files")]
  node_images["Apparel images<br/>[outfit_matcher.py]"]
end

subgraph group_integrations["External services"]
  node_auth0_service{{"Auth0"}}
  node_firebase[("Firebase services")]
end

node_user(("User"))
node_image_source(("Image URL source"))

node_user -->|"submits image"| node_flask
node_user -->|"signs in"| node_auth
node_auth -->|"authorizes"| node_auth0_service
node_auth -->|"sets profile"| node_flask
node_flask -->|"analyzes upload"| node_face
node_face -->|"generates palette"| node_palette
node_flask -->|"stores results"| node_session
node_flask -->|"calls matching"| node_matcher
node_matcher -->|"extracts features"| node_orb
node_matcher -->|"loads pairs"| node_paired
node_image_source -->|"provides image"| node_orb
node_paired -->|"selects pair"| node_matcher
node_matcher -->|"extracts features"| node_resnet
node_matcher -->|"searches neighbors"| node_knn
node_knn -->|"loads model"| node_model
node_knn -->|"indexes images"| node_images
node_matcher -->|"returns suggestions"| node_session
node_flask -->|"renders results"| node_template
node_user -.->|"uses documented services"| node_firebase
node_template -.->|"documented integration"| node_firebase

click node_flask "https://github.com/Abhijith-utla/Stylemaxx/blob/main/app.py"
click node_auth "https://github.com/Abhijith-utla/Stylemaxx/blob/main/app.py"
click node_template "https://github.com/Abhijith-utla/Stylemaxx/blob/main/templates/index.html"
click node_session "https://github.com/Abhijith-utla/Stylemaxx/blob/main/app.py"
click node_face "https://github.com/Abhijith-utla/Stylemaxx/blob/main/facerec.py"
click node_palette "https://github.com/Abhijith-utla/Stylemaxx/blob/main/facerec.py"
click node_matcher "https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py"
click node_orb "https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py"
click node_paired "https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py"
click node_resnet "https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py"
click node_knn "https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py"
click node_model "https://github.com/Abhijith-utla/Stylemaxx/blob/main/men_bottoms_knn.joblib"
click node_images "https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.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_auth,node_template,node_session,node_user toneBlue
class node_face,node_palette toneAmber
class node_matcher,node_orb,node_paired,node_resnet,node_knn,node_model,node_images toneMint
class node_auth0_service,node_firebase toneRose
class node_image_source toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/Abhijith-utla/Stylemaxx/blob/main/app.py): `app.py`
- [Auth0 login](https://github.com/Abhijith-utla/Stylemaxx/blob/main/app.py): `app.py`
- [Style interface](https://github.com/Abhijith-utla/Stylemaxx/blob/main/templates/index.html): `templates/index.html`
- [Session results](https://github.com/Abhijith-utla/Stylemaxx/blob/main/app.py): `app.py`

### Style analysis

- [Face analysis](https://github.com/Abhijith-utla/Stylemaxx/blob/main/facerec.py): `facerec.py`
- [Color palette](https://github.com/Abhijith-utla/Stylemaxx/blob/main/facerec.py): `facerec.py`

### Outfit matching

- [Outfit matcher](https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py): `outfit_matcher.py`
- [ORB features](https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py): `outfit_matcher.py`
- [Paired apparel data](https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py): `outfit_matcher.py`
- [ResNet features](https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py): `outfit_matcher.py`
- [KNN neighbor search](https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py): `outfit_matcher.py`
- [KNN model files](https://github.com/Abhijith-utla/Stylemaxx/blob/main/men_bottoms_knn.joblib): `men_bottoms_knn.joblib`
- [Apparel images](https://github.com/Abhijith-utla/Stylemaxx/blob/main/outfit_matcher.py): `outfit_matcher.py`

### External services

- **Auth0**
- **Firebase services**

### Other components

- **User**
- **Image URL source**

## Connections

- User → Flask routes: submits image (evidence: `README.md`)
- User → Auth0 login: signs in (evidence: `README.md`)
- Auth0 login → Auth0: authorizes (evidence: `app.py`)
- Auth0 login → Flask routes: sets profile (evidence: `app.py`)
- Flask routes → Face analysis: analyzes upload (evidence: `app.py`)
- Face analysis → Color palette: generates palette (evidence: `facerec.py`)
- Flask routes → Session results: stores results (evidence: `app.py`)
- Flask routes → Outfit matcher: calls matching (evidence: `app.py`)
- Outfit matcher → ORB features: extracts features (evidence: `outfit_matcher.py`)
- Outfit matcher → Paired apparel data: loads pairs (evidence: `outfit_matcher.py`)
- Image URL source → ORB features: provides image (evidence: `outfit_matcher.py`)
- Paired apparel data → Outfit matcher: selects pair (evidence: `outfit_matcher.py`)
- Outfit matcher → ResNet features: extracts features (evidence: `outfit_matcher.py`)
- Outfit matcher → KNN neighbor search: searches neighbors (evidence: `outfit_matcher.py`)
- KNN neighbor search → KNN model files: loads model (evidence: `outfit_matcher.py`)
- KNN neighbor search → Apparel images: indexes images (evidence: `outfit_matcher.py`)
- Outfit matcher → Session results: returns suggestions (evidence: `app.py`)
- Flask routes → Style interface: renders results (evidence: `app.py`)
- User → Firebase services: uses documented services (evidence: `README.md`)
- Style interface → Firebase services: documented integration (evidence: `README.md`)
