# whizz76/weatherapp architecture

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

- Interactive diagram: https://gitdiagram.com/whizz76/weatherapp
- Repository: https://github.com/whizz76/weatherapp

## Overview

This is a Spring-based weather lookup app with a browser UI: users search by city and see current conditions and related measurements. The browser code requests `/api/weather` and renders the returned data; the tree identifies corresponding controller, service, and response-model modules. Backend source and README content were not available to verify controller-to-service calls or any weather-data provider, so those links are omitted.

Main entry points: [`app/src/main/resources/static/script.js`](https://github.com/whizz76/weatherapp/blob/main/app/src/main/resources/static/script.js) (Weather UI), [`app/src/main/resources/static/index.html`](https://github.com/whizz76/weatherapp/blob/main/app/src/main/resources/static/index.html) (Weather page), [`app/src/main/java/com/example/WeatherApp/controller/WeatherController.java`](https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/controller/WeatherController.java) (Weather controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_page["Weather page<br/>[index.html]"]
  node_browser["Weather UI<br/>[script.js]"]
end

subgraph group_backend["Weather backend"]
  node_controller["Weather controller"]
  node_service["Weather service"]
  node_response["Weather response"]
  node_application["Application startup"]
end

node_user(("Visitor"))

node_user -->|"opens"| node_page
node_page -->|"loads"| node_browser
node_browser -->|"requests weather"| node_controller
node_controller -->|"returns response"| node_browser

click node_page "https://github.com/whizz76/weatherapp/blob/main/app/src/main/resources/static/index.html"
click node_browser "https://github.com/whizz76/weatherapp/blob/main/app/src/main/resources/static/script.js"
click node_controller "https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/controller/WeatherController.java"
click node_service "https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/service/WeatherService.java"
click node_response "https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/model/WeatherResponse.java"
click node_application "https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/WeatherAppApplication.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_page,node_browser toneBlue
class node_controller,node_service,node_response,node_application toneAmber
class node_user toneIndigo
```

## Components

### Browser experience

- [Weather page](https://github.com/whizz76/weatherapp/blob/main/app/src/main/resources/static/index.html): `app/src/main/resources/static/index.html`
- [Weather UI](https://github.com/whizz76/weatherapp/blob/main/app/src/main/resources/static/script.js): `app/src/main/resources/static/script.js`

### Weather backend

- [Weather controller](https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/controller/WeatherController.java): `app/src/main/java/com/example/WeatherApp/controller/WeatherController.java`
- [Weather service](https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/service/WeatherService.java): `app/src/main/java/com/example/WeatherApp/service/WeatherService.java`
- [Weather response](https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/model/WeatherResponse.java): `app/src/main/java/com/example/WeatherApp/model/WeatherResponse.java`
- [Application startup](https://github.com/whizz76/weatherapp/blob/main/app/src/main/java/com/example/WeatherApp/WeatherAppApplication.java): `app/src/main/java/com/example/WeatherApp/WeatherAppApplication.java`

### Other components

- **Visitor**

## Connections

- Visitor → Weather page: opens
- Weather page → Weather UI: loads
- Weather UI → Weather controller: requests weather
- Weather controller → Weather UI: returns response
