# kcautivof-cmd/meteo architecture

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

- Interactive diagram: https://gitdiagram.com/kcautivof-cmd/meteo
- Repository: https://github.com/kcautivof-cmd/meteo

## Overview

#### Purpose and entry point
This is a static meteorological analysis tool for operational bulletin support. The browser entry point is `index.html`; it presents weather variables and public alert/geospatial reference data. No server application or package-managed runtime is present in the repository.

#### Browser visualization layer
`index.html` is the primary application surface and likely contains the client-side UI, map rendering, and requests to public weather/visualization providers. It is the boundary between user interaction and externally sourced meteorological data.

Grounding:
- `index.html`

#### Meteorological data integrations
The stated live-data sources are Open-Meteo and external Windy visualizations. These are consumed from the browser rather than through a repository-hosted API layer, so availability, CORS behavior, and source schema changes are external dependencies.

Grounding:
- `index.html`
- `README.md`

#### Official alerts data
Country-level official alert snapshots are versioned as JSON assets for display or overlay in the client. These provide a local/static data boundary separate from live weather-model requests.

Grounding:
- `bolivia_alerts_official.json`
- `peru_alerts_official.json`

#### Geographic operational overlays
GeoJSON assets define operational map context: Chilean airports and PRD zones, plus SENAMHI-related coverage/features for Bolivia and Peru. The browser layer can load these directly as static map layers.

Grounding:
- `chile_airports.geojson`
- `chile_prd_zones.geojson`
- `senamhi_bolivia.geojson`
- `senamhi_peru.geojson`

#### DMC cache refresh pipeline
A Python script retrieves or transforms DMC data into a checked-in cache consumed by the static site. This is the repository’s only explicit backend-like processing stage: scheduled automation runs Python, updates `dmc_cache.json`, and persists the resulting artifact in the repository.

Grounding:
- `fetch_dmc.py`
- `dmc_cache.json`
- `.github/workflows/dmc_cache.yml`

#### Runtime and deployment model
The application is deployable as static files: HTML plus JSON/GeoJSON assets. GitHub Actions provides scheduled or event-driven cache maintenance; GitHub is therefore both source control and the likely artifact publication/update mechanism. There is no evidence of a database, application server, authentication system, or internal API.

Grounding:
- `.github/workflows/dmc_cache.yml`
- `index.html`
- `dmc_cache.json`

Main entry points: [`index.html`](https://github.com/kcautivof-cmd/meteo/blob/main/index.html) (Browser UI and map), [`fetch_dmc.py`](https://github.com/kcautivof-cmd/meteo/blob/main/fetch_dmc.py) (DMC fetch and transform), [`dmc_cache.json`](https://github.com/kcautivof-cmd/meteo/blob/main/dmc_cache.json) (DMC cache), [`.github/workflows/dmc_cache.yml`](https://github.com/kcautivof-cmd/meteo/blob/main/.github/workflows/dmc_cache.yml) (Cache workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_static["Static browser app"]
  node_browser["Browser UI and map<br/>static client<br/>[index.html]"]
  node_static_publish["Static publication<br/>repository-hosted static files"]
end

subgraph group_assets["Versioned data assets"]
  node_official_alerts["Official alert snapshots<br/>JSON assets"]
  node_bolivia_alerts["Bolivia alerts<br/>JSON asset"]
  node_peru_alerts["Peru alerts<br/>JSON asset"]
  node_map_overlays["Operational map overlays<br/>GeoJSON assets"]
  node_chile_airports["Chile airports<br/>GeoJSON asset"]
  node_chile_prd["Chile PRD zones<br/>GeoJSON asset"]
  node_senamhi_layers["SENAMHI layers<br/>GeoJSON assets"]
  node_senamhi_bolivia["SENAMHI Bolivia<br/>GeoJSON asset"]
  node_senamhi_peru["SENAMHI Peru<br/>GeoJSON asset"]
  node_dmc_cache["DMC cache<br/>JSON cache<br/>[dmc_cache.json]"]
end

subgraph group_refresh["DMC cache refresh"]
  node_github_actions["Cache workflow<br/>GitHub Actions workflow<br/>[dmc_cache.yml]"]
  node_fetch_dmc["DMC fetch and transform<br/>Python script<br/>[fetch_dmc.py]"]
end

node_user(("Operations user<br/>actor"))
node_open_meteo{{"Open-Meteo<br/>external weather API"}}
node_windy{{"Windy visualizations<br/>external visualization"}}
node_dmc_source{{"DMC data source<br/>external data source"}}

node_user -->|"uses"| node_browser
node_browser -->|"requests live weather"| node_open_meteo
node_browser -->|"loads visualizations"| node_windy
node_browser -->|"loads alerts"| node_official_alerts
node_official_alerts -.->|"includes"| node_bolivia_alerts
node_official_alerts -.->|"includes"| node_peru_alerts
node_browser -->|"loads map layers"| node_map_overlays
node_map_overlays -.->|"includes"| node_chile_airports
node_map_overlays -.->|"includes"| node_chile_prd
node_map_overlays -.->|"includes"| node_senamhi_layers
node_senamhi_layers -.->|"includes"| node_senamhi_bolivia
node_senamhi_layers -.->|"includes"| node_senamhi_peru
node_browser -->|"loads cached data"| node_dmc_cache
node_github_actions -->|"runs"| node_fetch_dmc
node_fetch_dmc -->|"retrieves data"| node_dmc_source
node_fetch_dmc -->|"updates"| node_dmc_cache
node_static_publish -->|"serves"| node_browser
node_static_publish -->|"publishes"| node_official_alerts
node_static_publish -->|"publishes"| node_map_overlays
node_static_publish -->|"publishes"| node_dmc_cache

click node_browser "https://github.com/kcautivof-cmd/meteo/blob/main/index.html"
click node_bolivia_alerts "https://github.com/kcautivof-cmd/meteo/blob/main/bolivia_alerts_official.json"
click node_peru_alerts "https://github.com/kcautivof-cmd/meteo/blob/main/peru_alerts_official.json"
click node_chile_airports "https://github.com/kcautivof-cmd/meteo/blob/main/chile_airports.geojson"
click node_chile_prd "https://github.com/kcautivof-cmd/meteo/blob/main/chile_prd_zones.geojson"
click node_senamhi_bolivia "https://github.com/kcautivof-cmd/meteo/blob/main/senamhi_bolivia.geojson"
click node_senamhi_peru "https://github.com/kcautivof-cmd/meteo/blob/main/senamhi_peru.geojson"
click node_dmc_cache "https://github.com/kcautivof-cmd/meteo/blob/main/dmc_cache.json"
click node_github_actions "https://github.com/kcautivof-cmd/meteo/blob/main/.github/workflows/dmc_cache.yml"
click node_fetch_dmc "https://github.com/kcautivof-cmd/meteo/blob/main/fetch_dmc.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_browser,node_static_publish toneBlue
class node_official_alerts,node_bolivia_alerts,node_peru_alerts,node_map_overlays,node_chile_airports,node_chile_prd,node_senamhi_layers,node_senamhi_bolivia,node_senamhi_peru,node_dmc_cache toneAmber
class node_github_actions,node_fetch_dmc toneMint
class node_user,node_open_meteo,node_windy,node_dmc_source toneNeutral
```

## Components

### Static browser app

- [Browser UI and map](https://github.com/kcautivof-cmd/meteo/blob/main/index.html): static client · Renders weather, alerts, and operational overlays. · `index.html`
- **Static publication**: repository-hosted static files · Publishes the HTML and checked-in assets.

### Versioned data assets

- **Official alert snapshots**: JSON assets · Country-level Bolivia and Peru alert data.
- [Bolivia alerts](https://github.com/kcautivof-cmd/meteo/blob/main/bolivia_alerts_official.json): JSON asset · `bolivia_alerts_official.json`
- [Peru alerts](https://github.com/kcautivof-cmd/meteo/blob/main/peru_alerts_official.json): JSON asset · `peru_alerts_official.json`
- **Operational map overlays**: GeoJSON assets · Airport, zone, and SENAMHI reference layers.
- [Chile airports](https://github.com/kcautivof-cmd/meteo/blob/main/chile_airports.geojson): GeoJSON asset · `chile_airports.geojson`
- [Chile PRD zones](https://github.com/kcautivof-cmd/meteo/blob/main/chile_prd_zones.geojson): GeoJSON asset · `chile_prd_zones.geojson`
- **SENAMHI layers**: GeoJSON assets
- [SENAMHI Bolivia](https://github.com/kcautivof-cmd/meteo/blob/main/senamhi_bolivia.geojson): GeoJSON asset · `senamhi_bolivia.geojson`
- [SENAMHI Peru](https://github.com/kcautivof-cmd/meteo/blob/main/senamhi_peru.geojson): GeoJSON asset · `senamhi_peru.geojson`
- [DMC cache](https://github.com/kcautivof-cmd/meteo/blob/main/dmc_cache.json): JSON cache · Checked-in DMC data served by the static site. · `dmc_cache.json`

### DMC cache refresh

- [Cache workflow](https://github.com/kcautivof-cmd/meteo/blob/main/.github/workflows/dmc_cache.yml): GitHub Actions workflow · Scheduled or event-driven cache maintenance. · `.github/workflows/dmc_cache.yml`
- [DMC fetch and transform](https://github.com/kcautivof-cmd/meteo/blob/main/fetch_dmc.py): Python script · `fetch_dmc.py`

### Other components

- **Operations user**: actor
- **Open-Meteo**: external weather API
- **Windy visualizations**: external visualization
- **DMC data source**: external data source

## Connections

- Operations user → Browser UI and map: uses
- Browser UI and map → Open-Meteo: requests live weather
- Browser UI and map → Windy visualizations: loads visualizations
- Browser UI and map → Official alert snapshots: loads alerts
- Official alert snapshots → Bolivia alerts: includes
- Official alert snapshots → Peru alerts: includes
- Browser UI and map → Operational map overlays: loads map layers
- Operational map overlays → Chile airports: includes
- Operational map overlays → Chile PRD zones: includes
- Operational map overlays → SENAMHI layers: includes
- SENAMHI layers → SENAMHI Bolivia: includes
- SENAMHI layers → SENAMHI Peru: includes
- Browser UI and map → DMC cache: loads cached data
- Cache workflow → DMC fetch and transform: runs
- DMC fetch and transform → DMC data source: retrieves data
- DMC fetch and transform → DMC cache: updates
- Static publication → Browser UI and map: serves
- Static publication → Official alert snapshots: publishes
- Static publication → Operational map overlays: publishes
- Static publication → DMC cache: publishes
