# unclecamswaterplans/blesstherains architecture

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

- Interactive diagram: https://gitdiagram.com/unclecamswaterplans/blesstherains
- Repository: https://github.com/unclecamswaterplans/blesstherains

## Overview

BlessTheRains is a Next.js app for exploring historical Australian daily rainfall from SILO. The main workflow loads station metadata, lets a user choose a station on the map or enter its number, fetches a selected month or year of rainfall through an app route, and displays an intensity-coloured chart. A separate station directory supports search and state filtering; About and Contact are additional pages. The map also requests OpenStreetMap tiles. The supplied excerpts show these core routes and components; unsampled page details are represented only as documented in the README.

Main entry points: [`app/components/Header.tsx`](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/Header.tsx) (Navigation header), [`app/page.tsx`](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/page.tsx) (Home route), [`app/components/HomeClient.tsx`](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/HomeClient.tsx) (Map and chart panel), [`app/stations/page.tsx`](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/stations/page.tsx) (Stations route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_home_page["Home route<br/>[page.tsx]"]
  node_home_client["Map and chart panel<br/>[HomeClient.tsx]"]
  node_station_map["Station map<br/>[StationsMap.tsx]"]
end

subgraph group_station_data["Station directory"]
  node_stations_page["Stations route<br/>[page.tsx]"]
  node_stations_table["Searchable directory<br/>[StationsTable.tsx]"]
  node_stations_api["Stations API<br/>[route.ts]"]
  node_station_loader["Station fetch and parse<br/>[stations.ts]"]
end

subgraph group_rainfall["Rainfall exploration"]
  node_plotly_chart["Rainfall controls and chart<br/>[PlotlyChart.tsx]"]
  node_rainfall_api["Rainfall API<br/>[route.ts]"]
end

subgraph group_shell["App shell"]
  node_header["Navigation header<br/>[Header.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
  node_layout["Root layout<br/>[layout.tsx]"]
  node_about_page["About page<br/>[page.tsx]"]
  node_contact_page["Contact page<br/>[page.tsx]"]
end

node_user(("Visitor"))
node_osm["OpenStreetMap tiles"]
node_silo[("SILO climate data")]

node_user -->|"opens"| node_home_page
node_home_page -->|"loads stations"| node_station_loader
node_home_page -->|"renders"| node_home_client
node_home_client -->|"renders"| node_station_map
node_home_client -->|"renders"| node_plotly_chart
node_station_map -->|"selects station"| node_home_client
node_station_map -->|"loads tiles"| node_osm
node_user -->|"opens"| node_stations_page
node_stations_page -->|"loads stations"| node_station_loader
node_stations_page -->|"renders"| node_stations_table
node_stations_api -->|"calls"| node_station_loader
node_station_loader -->|"fetches metadata"| node_silo
node_plotly_chart -->|"requests rainfall"| node_rainfall_api
node_rainfall_api -->|"fetches records"| node_silo
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_header -->|"links to"| node_home_page
node_header -->|"links to"| node_stations_page
node_header -->|"links to"| node_about_page
node_header -->|"links to"| node_contact_page

click node_home_page "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/page.tsx"
click node_home_client "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/HomeClient.tsx"
click node_station_map "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/StationsMap.tsx"
click node_stations_page "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/stations/page.tsx"
click node_stations_table "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/StationsTable.tsx"
click node_stations_api "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/api/stations/route.ts"
click node_station_loader "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/lib/stations.ts"
click node_plotly_chart "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/PlotlyChart.tsx"
click node_rainfall_api "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/api/rainfall/route.ts"
click node_header "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/Header.tsx"
click node_footer "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/Footer.tsx"
click node_layout "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/layout.tsx"
click node_about_page "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/about/page.tsx"
click node_contact_page "https://github.com/unclecamswaterplans/blesstherains/blob/main/app/contact/page.tsx"

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_home_page,node_home_client,node_station_map toneBlue
class node_stations_page,node_stations_table,node_stations_api,node_station_loader,node_silo toneAmber
class node_plotly_chart,node_rainfall_api toneMint
class node_header,node_footer,node_layout,node_about_page,node_contact_page toneRose
class node_user,node_osm toneIndigo
```

## Components

### User experience

- [Home route](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/page.tsx): `app/page.tsx`
- [Map and chart panel](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/HomeClient.tsx): `app/components/HomeClient.tsx`
- [Station map](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/StationsMap.tsx): `app/components/StationsMap.tsx`

### Station directory

- [Stations route](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/stations/page.tsx): `app/stations/page.tsx`
- [Searchable directory](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/StationsTable.tsx): `app/components/StationsTable.tsx`
- [Stations API](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/api/stations/route.ts): `app/api/stations/route.ts`
- [Station fetch and parse](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/lib/stations.ts): `app/lib/stations.ts`

### Rainfall exploration

- [Rainfall controls and chart](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/PlotlyChart.tsx): `app/components/PlotlyChart.tsx`
- [Rainfall API](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/api/rainfall/route.ts): `app/api/rainfall/route.ts`

### App shell

- [Navigation header](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/Header.tsx): `app/components/Header.tsx`
- [Footer](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/components/Footer.tsx): `app/components/Footer.tsx`
- [Root layout](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/layout.tsx): `app/layout.tsx`
- [About page](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/about/page.tsx): `app/about/page.tsx`
- [Contact page](https://github.com/unclecamswaterplans/blesstherains/blob/main/app/contact/page.tsx): `app/contact/page.tsx`

### Other components

- **Visitor**
- **OpenStreetMap tiles**
- **SILO climate data**

## Connections

- Visitor → Home route: opens (evidence: `README.md`)
- Home route → Station fetch and parse: loads stations (evidence: `app/page.tsx`)
- Home route → Map and chart panel: renders (evidence: `app/page.tsx`)
- Map and chart panel → Station map: renders (evidence: `app/components/HomeClient.tsx`)
- Map and chart panel → Rainfall controls and chart: renders (evidence: `app/components/HomeClient.tsx`)
- Station map → Map and chart panel: selects station (evidence: `app/components/HomeClient.tsx`)
- Station map → OpenStreetMap tiles: loads tiles (evidence: `app/components/StationsMap.tsx`)
- Visitor → Stations route: opens (evidence: `README.md`)
- Stations route → Station fetch and parse: loads stations (evidence: `app/stations/page.tsx`)
- Stations route → Searchable directory: renders (evidence: `app/stations/page.tsx`)
- Stations API → Station fetch and parse: calls (evidence: `app/api/stations/route.ts`)
- Station fetch and parse → SILO climate data: fetches metadata (evidence: `app/lib/stations.ts`)
- Rainfall controls and chart → Rainfall API: requests rainfall (evidence: `app/components/PlotlyChart.tsx`)
- Rainfall API → SILO climate data: fetches records (evidence: `app/api/rainfall/route.ts`)
- Root layout → Navigation header: renders (evidence: `app/layout.tsx`)
- Root layout → Footer: renders (evidence: `app/layout.tsx`)
- Navigation header → Home route: links to (evidence: `app/components/Header.tsx`)
- Navigation header → Stations route: links to (evidence: `app/components/Header.tsx`)
- Navigation header → About page: links to (evidence: `app/components/Header.tsx`)
- Navigation header → Contact page: links to (evidence: `app/components/Header.tsx`)
