# kalacademynp/local-weather-app-wc8 architecture

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

- Interactive diagram: https://gitdiagram.com/kalacademynp/local-weather-app-wc8
- Repository: https://github.com/kalacademynp/local-weather-app-wc8

## Overview

LocalWeatherApp is a small Angular weather lookup UI. The intended workflow is city search, weather retrieval, response mapping, and display; the sampled code confirms search emission and the lookup/mapping path, but not the parent-template bindings that connect search and display to the root component. The graph therefore leaves those UI connections out. The README documents no additional product capabilities; routing is present but has no configured routes.

Main entry points: [`src/app/weather.service.ts`](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/weather.service.ts) (Weather service), [`src/app/app.module.ts`](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/app.module.ts) (App module), [`src/app/app.component.ts`](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/app.component.ts) (Root component), [`src/app/icurrent-weather.ts`](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/icurrent-weather.ts) (Weather model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_search["City search"]
  node_root["Root component<br/>[app.component.ts]"]
  node_weather_view["Weather display"]
end

subgraph group_weather["Weather lookup"]
  node_lookup["Weather service<br/>[weather.service.ts]"]
  node_provider["OpenWeather API"]
  node_environment["API configuration<br/>[environment.ts]"]
  node_fake_service["Fake weather service"]
end

subgraph group_contracts["Data contracts"]
  node_weather_data["API response type"]
  node_weather_model["Weather model"]
  node_service_contract["Service contract"]
end

subgraph group_startup["Application setup"]
  node_bootstrap["Bootstrap entry<br/>[main.ts]"]
  node_app_module["App module<br/>[app.module.ts]"]
  node_routing["Routing module"]
end

node_user(("User"))

node_user -.->|"enters query"| node_search
node_search -.->|"emits query"| node_root
node_root -->|"requests weather"| node_lookup
node_lookup -->|"requests data"| node_provider
node_lookup -->|"reads API key"| node_environment
node_lookup -->|"maps response"| node_weather_data
node_lookup -->|"returns model"| node_weather_model
node_root -->|"holds result"| node_weather_model
node_root -.->|"passes result"| node_weather_view
node_weather_view -->|"accepts input"| node_weather_model
node_lookup -->|"implements"| node_service_contract
node_fake_service -->|"implements"| node_service_contract
node_fake_service -->|"returns model"| node_weather_model
node_bootstrap -->|"bootstraps"| node_app_module
node_app_module -->|"declares"| node_root
node_app_module -->|"declares"| node_search
node_app_module -->|"declares"| node_weather_view
node_app_module -->|"provides"| node_lookup
node_app_module -->|"imports"| node_routing

click node_search "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/city-search/city-search.component.ts"
click node_root "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/app.component.ts"
click node_weather_view "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/current-weather/current-weather.component.ts"
click node_lookup "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/weather.service.ts"
click node_environment "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/environments/environment.ts"
click node_fake_service "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/weather-service-fake.service.ts"
click node_weather_data "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/icurrent-weather-data.ts"
click node_weather_model "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/icurrent-weather.ts"
click node_service_contract "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/iweather-service.ts"
click node_bootstrap "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/main.ts"
click node_app_module "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/app.module.ts"
click node_routing "https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/app-routing.module.ts"

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_search,node_root,node_weather_view,node_user toneBlue
class node_lookup,node_provider,node_environment,node_fake_service toneAmber
class node_weather_data,node_weather_model,node_service_contract toneMint
class node_bootstrap,node_app_module,node_routing toneRose
```

## Components

### User interface

- [City search](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/city-search/city-search.component.ts): `src/app/city-search/city-search.component.ts`
- [Root component](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/app.component.ts): `src/app/app.component.ts`
- [Weather display](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/current-weather/current-weather.component.ts): `src/app/current-weather/current-weather.component.ts`

### Weather lookup

- [Weather service](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/weather.service.ts): `src/app/weather.service.ts`
- **OpenWeather API**
- [API configuration](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/environments/environment.ts): `src/environments/environment.ts`
- [Fake weather service](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/weather-service-fake.service.ts): `src/app/weather-service-fake.service.ts`

### Data contracts

- [API response type](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/icurrent-weather-data.ts): `src/app/icurrent-weather-data.ts`
- [Weather model](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/icurrent-weather.ts): `src/app/icurrent-weather.ts`
- [Service contract](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/iweather-service.ts): `src/app/iweather-service.ts`

### Application setup

- [Bootstrap entry](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/main.ts): `src/main.ts`
- [App module](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/app.module.ts): `src/app/app.module.ts`
- [Routing module](https://github.com/kalacademynp/local-weather-app-wc8/blob/master/src/app/app-routing.module.ts): `src/app/app-routing.module.ts`

### Other components

- **User**

## Connections

- User → City search: enters query
- City search → Root component: emits query
- Root component → Weather service: requests weather (evidence: `src/app/app.component.ts`)
- Weather service → OpenWeather API: requests data (evidence: `src/app/weather.service.ts`)
- Weather service → API configuration: reads API key (evidence: `src/app/weather.service.ts`)
- Weather service → API response type: maps response (evidence: `src/app/weather.service.ts`)
- Weather service → Weather model: returns model (evidence: `src/app/weather.service.ts`)
- Root component → Weather model: holds result (evidence: `src/app/app.component.ts`)
- Root component → Weather display: passes result
- Weather display → Weather model: accepts input (evidence: `src/app/current-weather/current-weather.component.ts`)
- Weather service → Service contract: implements (evidence: `src/app/weather.service.ts`)
- Fake weather service → Service contract: implements (evidence: `src/app/weather-service-fake.service.ts`)
- Fake weather service → Weather model: returns model (evidence: `src/app/weather-service-fake.service.ts`)
- Bootstrap entry → App module: bootstraps (evidence: `src/main.ts`)
- App module → Root component: declares (evidence: `src/app/app.module.ts`)
- App module → City search: declares (evidence: `src/app/app.module.ts`)
- App module → Weather display: declares (evidence: `src/app/app.module.ts`)
- App module → Weather service: provides (evidence: `src/app/app.module.ts`)
- App module → Routing module: imports (evidence: `src/app/app.module.ts`)
