# vojtechgero/stin_weather architecture

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

- Interactive diagram: https://gitdiagram.com/vojtechgero/stin_weather
- Repository: https://github.com/vojtechgero/stin_weather

## Overview

STIN_Weather is a server-rendered interactive weather application with account management, saved locations, forecast retrieval, and map/table/weather views. The verified forecast request path runs from the authenticated API endpoint through location selection and forecast construction to Open-Meteo. The README is empty; UI and account capabilities are represented from the repository tree, but their detailed wiring is not inferred from unsampled components.

Main entry points: [`STIN_Weather/Components/Routes.razor`](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Routes.razor) (Page routing), [`STIN_Weather/WeatherReportUtils/WeatherApi.cs`](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/WeatherReportUtils/WeatherApi.cs) (Weather API client), [`STIN_Weather/Program.cs`](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Program.cs) (ASP.NET host), [`STIN_Weather/Endpoints/WeatherController.cs`](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Endpoints/WeatherController.cs) (Forecast endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_host["ASP.NET host<br/>[Program.cs]"]
  node_app["Razor app<br/>[App.razor]"]
  node_routes["Page routing<br/>[Routes.razor]"]
  node_home["Home view<br/>[Home.razor]"]
  node_locations["Locations table"]
  node_map["Map view<br/>[MapView.razor]"]
  node_weatherpage["Weather response"]
end

subgraph group_forecast["Forecast workflow"]
  node_controller["Forecast endpoint"]
  node_selection["Location selection"]
  node_forecastservice["Forecast service"]
end

subgraph group_identity["Accounts and storage"]
  node_accountpages["Login and registration"]
  node_identity["Identity services<br/>[Program.cs]"]
  node_usermanager["User manager"]
  node_userstore["JSON user store"]
  node_userfile[("User JSON file")]
end

subgraph group_weatherdata["Weather integration"]
  node_requestbuilder["Request builder<br/>[RequestBuilder.cs]"]
  node_weatherapi["Weather API client<br/>[WeatherApi.cs]"]
  node_weatherutils["Weather code mapping<br/>[WeatherUtils.cs]"]
  node_forecastmodel["Forecast model<br/>[DailyForecast.cs]"]
end

node_browser(("User browser"))
node_openmeteo{{"Open-Meteo"}}

node_browser -->|"opens"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_locations
node_routes -->|"routes to"| node_map
node_routes -->|"routes to"| node_weatherpage
node_host -->|"maps"| node_app
node_host -->|"maps"| node_controller
node_host -->|"configures"| node_identity
node_controller -->|"finds user"| node_usermanager
node_controller -->|"calls"| node_selection
node_selection -->|"creates and calls"| node_forecastservice
node_forecastservice -->|"builds request"| node_requestbuilder
node_forecastservice -->|"requests weather"| node_weatherapi
node_weatherapi -->|"HTTP request"| node_openmeteo
node_weatherapi -->|"maps codes"| node_weatherutils
node_weatherapi -->|"creates forecasts"| node_forecastmodel
node_identity -->|"enables endpoints"| node_accountpages
node_identity -->|"registers store"| node_usermanager
node_usermanager -->|"uses"| node_userstore
node_userstore -->|"reads and writes"| node_userfile

click node_host "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Program.cs"
click node_app "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/App.razor"
click node_routes "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Routes.razor"
click node_home "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Pages/Home.razor"
click node_locations "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Pages/LocationsTable.razor"
click node_map "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Pages/MapView.razor"
click node_weatherpage "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Pages/WeatherRespose.razor"
click node_controller "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Endpoints/WeatherController.cs"
click node_selection "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Services/LocationSelectionService.cs"
click node_forecastservice "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Services/WeatherForecastService.cs"
click node_requestbuilder "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/WeatherReportUtils/RequestBuilder.cs"
click node_weatherapi "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/WeatherReportUtils/WeatherApi.cs"
click node_weatherutils "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/WeatherReportUtils/WeatherUtils.cs"
click node_forecastmodel "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Data/DailyForecast.cs"
click node_accountpages "https://github.com/vojtechgero/stin_weather/tree/master/STIN_Weather/Components/Account/Pages"
click node_identity "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Program.cs"
click node_userstore "https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Data/JsonFileUserStore.cs"

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_host,node_app,node_routes,node_home,node_locations,node_map,node_weatherpage,node_browser toneBlue
class node_controller,node_selection,node_forecastservice toneAmber
class node_accountpages,node_identity,node_usermanager,node_userstore,node_userfile toneMint
class node_requestbuilder,node_weatherapi,node_weatherutils,node_forecastmodel toneRose
class node_openmeteo toneIndigo
```

## Components

### Web experience

- [ASP.NET host](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Program.cs): `STIN_Weather/Program.cs`
- [Razor app](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/App.razor): `STIN_Weather/Components/App.razor`
- [Page routing](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Routes.razor): `STIN_Weather/Components/Routes.razor`
- [Home view](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Pages/Home.razor): `STIN_Weather/Components/Pages/Home.razor`
- [Locations table](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Pages/LocationsTable.razor): `STIN_Weather/Components/Pages/LocationsTable.razor`
- [Map view](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Pages/MapView.razor): `STIN_Weather/Components/Pages/MapView.razor`
- [Weather response](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Components/Pages/WeatherRespose.razor): `STIN_Weather/Components/Pages/WeatherRespose.razor`

### Forecast workflow

- [Forecast endpoint](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Endpoints/WeatherController.cs): `STIN_Weather/Endpoints/WeatherController.cs`
- [Location selection](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Services/LocationSelectionService.cs): `STIN_Weather/Services/LocationSelectionService.cs`
- [Forecast service](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Services/WeatherForecastService.cs): `STIN_Weather/Services/WeatherForecastService.cs`

### Accounts and storage

- [Login and registration](https://github.com/vojtechgero/stin_weather/tree/master/STIN_Weather/Components/Account/Pages): `STIN_Weather/Components/Account/Pages`
- [Identity services](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Program.cs): `STIN_Weather/Program.cs`
- **User manager**
- [JSON user store](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Data/JsonFileUserStore.cs): `STIN_Weather/Data/JsonFileUserStore.cs`
- **User JSON file**

### Weather integration

- [Request builder](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/WeatherReportUtils/RequestBuilder.cs): `STIN_Weather/WeatherReportUtils/RequestBuilder.cs`
- [Weather API client](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/WeatherReportUtils/WeatherApi.cs): `STIN_Weather/WeatherReportUtils/WeatherApi.cs`
- [Weather code mapping](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/WeatherReportUtils/WeatherUtils.cs): `STIN_Weather/WeatherReportUtils/WeatherUtils.cs`
- [Forecast model](https://github.com/vojtechgero/stin_weather/blob/master/STIN_Weather/Data/DailyForecast.cs): `STIN_Weather/Data/DailyForecast.cs`

### Other components

- **User browser**
- **Open-Meteo**

## Connections

- User browser → Razor app: opens
- Razor app → Page routing: renders
- Page routing → Home view: routes to
- Page routing → Locations table: routes to
- Page routing → Map view: routes to
- Page routing → Weather response: routes to
- ASP.NET host → Razor app: maps
- ASP.NET host → Forecast endpoint: maps
- ASP.NET host → Identity services: configures
- Forecast endpoint → User manager: finds user
- Forecast endpoint → Location selection: calls
- Location selection → Forecast service: creates and calls
- Forecast service → Request builder: builds request
- Forecast service → Weather API client: requests weather
- Weather API client → Open-Meteo: HTTP request
- Weather API client → Weather code mapping: maps codes
- Weather API client → Forecast model: creates forecasts
- Identity services → Login and registration: enables endpoints
- Identity services → User manager: registers store
- User manager → JSON user store: uses
- JSON user store → User JSON file: reads and writes
