# mitsuha-24/what-should-i-wear architecture

> Architecture diagram of the GitHub repository mitsuha-24/what-should-i-wear, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mitsuha-24/what-should-i-wear
- Repository: https://github.com/mitsuha-24/what-should-i-wear

## Overview

What-should-I-wear is a Spring Boot API that accepts a city-based recommendation request and returns weather-based outfit guidance. The README documents real-time weather-condition mapping, tier-based recommendation logic, and REST endpoints; the source excerpts are unavailable, so internal calls and any external weather provider cannot be verified. The graph shows the documented request-to-result stages and the relevant source files without asserting unshown implementation details.

Main entry points: [`src/main/java/com/wear/demo/ClothingController.java`](https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/ClothingController.java) (Clothing controller), [`src/main/java/com/wear/demo/WeatherService.java`](https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/WeatherService.java) (Weather service), [`src/main/java/com/wear/demo/wearing.java`](https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/wearing.java) (Outfit rules), [`src/main/java/com/wear/demo/WeatherResponse.java`](https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/WeatherResponse.java) (Weather response)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["REST API"]
  node_controller["Clothing controller"]
end

subgraph group_recommendation["Recommendation"]
  node_weather["Weather service"]
  node_logic["Outfit rules<br/>[wearing.java]"]
  node_weather_response["Weather response"]
end

node_user(("API user"))

node_user -->|"requests recommendation"| node_controller
node_controller -.->|"gets recommendation"| node_weather
node_weather -.->|"maps conditions"| node_logic
node_weather -.->|"uses weather data"| node_weather_response
node_controller -->|"serves result"| node_user

click node_controller "https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/ClothingController.java"
click node_weather "https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/WeatherService.java"
click node_logic "https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/wearing.java"
click node_weather_response "https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/WeatherResponse.java"

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_controller,node_user toneBlue
class node_weather,node_logic,node_weather_response toneAmber
```

## Components

### REST API

- [Clothing controller](https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/ClothingController.java): `src/main/java/com/wear/demo/ClothingController.java`

### Recommendation

- [Weather service](https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/WeatherService.java): `src/main/java/com/wear/demo/WeatherService.java`
- [Outfit rules](https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/wearing.java): `src/main/java/com/wear/demo/wearing.java`
- [Weather response](https://github.com/mitsuha-24/what-should-i-wear/blob/main/src/main/java/com/wear/demo/WeatherResponse.java): `src/main/java/com/wear/demo/WeatherResponse.java`

### Other components

- **API user**

## Connections

- API user → Clothing controller: requests recommendation (evidence: `README.md`)
- Clothing controller → Weather service: gets recommendation
- Weather service → Outfit rules: maps conditions
- Weather service → Weather response: uses weather data
- Clothing controller → API user: serves result (evidence: `README.md`)
