# chillaranand/weather-on-terminal architecture

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

- Interactive diagram: https://gitdiagram.com/chillaranand/weather-on-terminal
- Repository: https://github.com/chillaranand/weather-on-terminal

## Overview

Weather On Terminal is a small command-line weather utility. Its workflow discovers the user's public IP, queries WorldWeatherOnline for current conditions, then prints selected weather fields. The single source file contains all runtime stages; the README documents both external services. No separate storage or internal service layer is present.

Main entry points: [`weather.py`](https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_weather["Weather workflow"]
  node_entry["CLI entry<br/>[weather.py]"]
  node_ip_lookup["IP lookup<br/>[weather.py]"]
  node_weather_lookup["Weather lookup<br/>[weather.py]"]
  node_weather_output["Weather output<br/>[weather.py]"]
end

node_user(("Terminal user"))
node_ip_service["Public IP service"]
node_weather_service["WorldWeatherOnline"]

node_user -->|"runs"| node_entry
node_entry -->|"calls"| node_ip_lookup
node_ip_lookup -->|"fetches IP"| node_ip_service
node_ip_lookup -->|"returns IP"| node_weather_lookup
node_weather_lookup -->|"fetches conditions"| node_weather_service
node_entry -->|"calls"| node_weather_lookup
node_entry -->|"passes weather"| node_weather_output
node_weather_output -->|"prints forecast"| node_user

click node_entry "https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py"
click node_ip_lookup "https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py"
click node_weather_lookup "https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py"
click node_weather_output "https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py"

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_entry,node_ip_lookup,node_weather_lookup,node_weather_output,node_user toneBlue
class node_ip_service,node_weather_service toneIndigo
```

## Components

### Weather workflow

- [CLI entry](https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py): `weather.py`
- [IP lookup](https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py): `weather.py`
- [Weather lookup](https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py): `weather.py`
- [Weather output](https://github.com/chillaranand/weather-on-terminal/blob/master/weather.py): `weather.py`

### Other components

- **Terminal user**
- **Public IP service**
- **WorldWeatherOnline**

## Connections

- Terminal user → CLI entry: runs (evidence: `ReadMe.md`)
- CLI entry → IP lookup: calls (evidence: `weather.py`)
- IP lookup → Public IP service: fetches IP (evidence: `weather.py`)
- IP lookup → Weather lookup: returns IP (evidence: `weather.py`)
- Weather lookup → WorldWeatherOnline: fetches conditions (evidence: `weather.py`)
- CLI entry → Weather lookup: calls (evidence: `weather.py`)
- CLI entry → Weather output: passes weather (evidence: `weather.py`)
- Weather output → Terminal user: prints forecast (evidence: `weather.py`)
