# hajrahejaz/hannah-montana-personal-stylist architecture

> Architecture diagram of the GitHub repository hajrahejaz/hannah-montana-personal-stylist, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hajrahejaz/hannah-montana-personal-stylist
- Repository: https://github.com/hajrahejaz/hannah-montana-personal-stylist

## Overview

Trend Radar is a console-based personal stylist: users enter student profiles, wardrobe items, and trend mentions, then request ranked outfits or a suitable hair/hijab style. The CLI parses and validates commands and delegates to Stylist, which maintains student wardrobes and trend counts. Outfit requests apply occasion, modesty, and colour rules during backtracking, retain the best k with a min-heap, and return formatted suggestions; style requests rank eligible styles by trend mentions. The graph reflects README capabilities and shown calls; unsampled implementation details are represented only where documented.

Main entry points: [`Stylist.cpp`](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp) (Stylist API), [`main.cpp`](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/main.cpp) (Command parser), [`Stylist.h`](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.h) (Dynamic arrays)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Command line"]
  node_cli["Command parser<br/>[main.cpp]"]
  node_results["Console results<br/>[main.cpp]"]
end

subgraph group_domain["Stylist domain"]
  node_stylist["Stylist API<br/>[Stylist.cpp]"]
  node_profiles[("Student profiles<br/>[Stylist.cpp]")]
  node_wardrobes[("Wardrobe items<br/>[Stylist.cpp]")]
  node_trends[("Trend mentions<br/>[Stylist.cpp]")]
  node_arrays["Dynamic arrays<br/>[Stylist.h]"]
end

subgraph group_ranking["Suggestion engine"]
  node_outfit_search["Outfit search<br/>[Stylist.cpp]"]
  node_style_rules["Profile rules<br/>[Stylist.cpp]"]
  node_heap["Top-k heap<br/>[Stylist.cpp]"]
  node_hair_styles["Hair and hijab styles<br/>[Stylist.cpp]"]
end

node_user(("Console user"))

node_user -->|"enters commands"| node_cli
node_cli -->|"dispatches requests"| node_stylist
node_stylist -->|"manages profiles"| node_profiles
node_stylist -->|"manages items"| node_wardrobes
node_stylist -->|"records mentions"| node_trends
node_stylist -->|"builds suggestions"| node_outfit_search
node_outfit_search -->|"checks eligibility"| node_style_rules
node_outfit_search -->|"searches items"| node_wardrobes
node_outfit_search -->|"retains best k"| node_heap
node_outfit_search -->|"scores mentions"| node_trends
node_stylist -->|"selects style"| node_hair_styles
node_hair_styles -->|"ranks mentions"| node_trends
node_cli -->|"prints suggestions"| node_results
node_stylist -->|"stores state"| node_arrays

click node_cli "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/main.cpp"
click node_stylist "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp"
click node_profiles "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp"
click node_wardrobes "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp"
click node_trends "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp"
click node_outfit_search "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp"
click node_style_rules "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp"
click node_heap "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp"
click node_hair_styles "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp"
click node_arrays "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.h"
click node_results "https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/main.cpp"

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_cli,node_results,node_user toneBlue
class node_stylist,node_profiles,node_wardrobes,node_trends,node_arrays toneAmber
class node_outfit_search,node_style_rules,node_heap,node_hair_styles toneMint
```

## Components

### Command line

- [Command parser](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/main.cpp): `main.cpp`
- [Console results](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/main.cpp): `main.cpp`

### Stylist domain

- [Stylist API](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp): `Stylist.cpp`
- [Student profiles](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp): `Stylist.cpp`
- [Wardrobe items](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp): `Stylist.cpp`
- [Trend mentions](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp): `Stylist.cpp`
- [Dynamic arrays](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.h): `Stylist.h`

### Suggestion engine

- [Outfit search](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp): `Stylist.cpp`
- [Profile rules](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp): `Stylist.cpp`
- [Top-k heap](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp): `Stylist.cpp`
- [Hair and hijab styles](https://github.com/hajrahejaz/hannah-montana-personal-stylist/blob/main/Stylist.cpp): `Stylist.cpp`

### Other components

- **Console user**

## Connections

- Console user → Command parser: enters commands (evidence: `main.cpp`)
- Command parser → Stylist API: dispatches requests (evidence: `main.cpp`)
- Stylist API → Student profiles: manages profiles (evidence: `Stylist.cpp`)
- Stylist API → Wardrobe items: manages items (evidence: `Stylist.cpp`)
- Stylist API → Trend mentions: records mentions (evidence: `Stylist.cpp`)
- Stylist API → Outfit search: builds suggestions (evidence: `README.md`)
- Outfit search → Profile rules: checks eligibility (evidence: `Stylist.cpp`)
- Outfit search → Wardrobe items: searches items (evidence: `Stylist.cpp`)
- Outfit search → Top-k heap: retains best k (evidence: `README.md`)
- Outfit search → Trend mentions: scores mentions (evidence: `README.md`)
- Stylist API → Hair and hijab styles: selects style (evidence: `Stylist.cpp`)
- Hair and hijab styles → Trend mentions: ranks mentions (evidence: `Stylist.cpp`)
- Command parser → Console results: prints suggestions (evidence: `main.cpp`)
- Stylist API → Dynamic arrays: stores state (evidence: `Stylist.h`)
