# tashfiqul-islam/profile-weather-view architecture

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

- Interactive diagram: https://gitdiagram.com/tashfiqul-islam/profile-weather-view
- Repository: https://github.com/tashfiqul-islam/profile-weather-view

## Overview

Profile Weather View is a scheduled Bun job that fetches Open-Meteo conditions, transforms them into display-ready weather, patches a marked section of a profile README, and writes a GitHub Actions run summary. A separate publish job guards the changes, signs and verifies a commit, then pushes it. The core runtime connections are supported by source excerpts and the SOURCE INDEX; workflow and publishing details are documented in the README, but their implementation was not sampled.

Main entry points: [`src/index.ts`](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/index.ts) (Job entrypoint), [`src/weather.ts`](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/weather.ts) (Weather fetch), [`src/readme.ts`](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/readme.ts) (README update), [`src/summary.ts`](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/summary.ts) (Summary rendering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Weather runtime"]
  node_entry["Job entrypoint<br/>[index.ts]"]
  node_location["Location config<br/>[config.ts]"]
  node_weather["Weather fetch<br/>[weather.ts]"]
  node_retry["HTTP retries<br/>[http.ts]"]
  node_open_meteo["Open-Meteo"]
  node_icons["Weather icons<br/>[meteocons.ts]"]
  node_time["Time formatting<br/>[time.ts]"]
end

subgraph group_render["README rendering"]
  node_readme_update["README update<br/>[readme.ts]"]
  node_profile_readme["Profile README"]
end

subgraph group_report["Run reporting"]
  node_summary_render["Summary rendering<br/>[summary.ts]"]
  node_summary_file["Actions summary"]
end

subgraph group_publish["Scheduled publishing"]
  node_render_job["Render job<br/>[weather.yml]"]
  node_publish_job["Publish job<br/>[weather.yml]"]
  node_profile_repo["Profile repository"]
end

node_schedule(("Scheduled run"))

node_schedule -.->|"triggers"| node_render_job
node_render_job -.->|"runs"| node_entry
node_entry -->|"reads"| node_location
node_entry -->|"fetches"| node_weather
node_weather -->|"reads"| node_location
node_weather -->|"requests through"| node_retry
node_retry -->|"fetches"| node_open_meteo
node_weather -->|"maps conditions"| node_icons
node_weather -->|"formats sun times"| node_time
node_entry -->|"updates"| node_readme_update
node_readme_update -->|"reads and writes"| node_profile_readme
node_readme_update -->|"uses icon URLs"| node_icons
node_readme_update -->|"formats refresh stamp"| node_time
node_entry -->|"renders and writes"| node_summary_render
node_summary_render -->|"appends Markdown"| node_summary_file
node_summary_render -->|"uses icon URLs"| node_icons
node_summary_render -->|"formats timestamp"| node_time
node_render_job -.->|"hands off"| node_publish_job
node_publish_job -.->|"guards changes"| node_profile_readme
node_publish_job -.->|"signs and pushes"| node_profile_repo

click node_render_job "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/.github/workflows/weather.yml"
click node_entry "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/index.ts"
click node_location "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/config.ts"
click node_weather "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/weather.ts"
click node_retry "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/http.ts"
click node_icons "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/meteocons.ts"
click node_time "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/time.ts"
click node_readme_update "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/readme.ts"
click node_summary_render "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/summary.ts"
click node_publish_job "https://github.com/tashfiqul-islam/profile-weather-view/blob/main/.github/workflows/weather.yml"

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_location,node_weather,node_retry,node_open_meteo,node_icons,node_time toneBlue
class node_readme_update,node_profile_readme toneAmber
class node_summary_render,node_summary_file toneMint
class node_render_job,node_publish_job,node_profile_repo toneRose
class node_schedule toneIndigo
```

## Components

### Weather runtime

- [Job entrypoint](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/index.ts): `src/index.ts`
- [Location config](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/config.ts): `src/config.ts`
- [Weather fetch](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/weather.ts): `src/weather.ts`
- [HTTP retries](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/http.ts): `src/http.ts`
- **Open-Meteo**
- [Weather icons](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/meteocons.ts): `src/meteocons.ts`
- [Time formatting](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/time.ts): `src/time.ts`

### README rendering

- [README update](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/readme.ts): `src/readme.ts`
- **Profile README**

### Run reporting

- [Summary rendering](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/src/summary.ts): `src/summary.ts`
- **Actions summary**

### Scheduled publishing

- [Render job](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/.github/workflows/weather.yml): `.github/workflows/weather.yml`
- [Publish job](https://github.com/tashfiqul-islam/profile-weather-view/blob/main/.github/workflows/weather.yml): `.github/workflows/weather.yml`
- **Profile repository**

### Other components

- **Scheduled run**

## Connections

- Scheduled run → Render job: triggers (evidence: `README.md`)
- Render job → Job entrypoint: runs (evidence: `README.md`)
- Job entrypoint → Location config: reads (evidence: `src/index.ts`)
- Job entrypoint → Weather fetch: fetches (evidence: `src/index.ts`)
- Weather fetch → Location config: reads (evidence: `src/weather.ts`)
- Weather fetch → HTTP retries: requests through (evidence: `src/weather.ts`)
- HTTP retries → Open-Meteo: fetches (evidence: `README.md`)
- Weather fetch → Weather icons: maps conditions (evidence: `src/weather.ts`)
- Weather fetch → Time formatting: formats sun times (evidence: `src/weather.ts`)
- Job entrypoint → README update: updates (evidence: `src/index.ts`)
- README update → Profile README: reads and writes (evidence: `src/readme.ts`)
- README update → Weather icons: uses icon URLs (evidence: `src/readme.ts`)
- README update → Time formatting: formats refresh stamp (evidence: `src/readme.ts`)
- Job entrypoint → Summary rendering: renders and writes (evidence: `src/index.ts`)
- Summary rendering → Actions summary: appends Markdown (evidence: `README.md`)
- Summary rendering → Weather icons: uses icon URLs (evidence: `src/summary.ts`)
- Summary rendering → Time formatting: formats timestamp (evidence: `src/summary.ts`)
- Render job → Publish job: hands off (evidence: `README.md`)
- Publish job → Profile README: guards changes (evidence: `README.md`)
- Publish job → Profile repository: signs and pushes (evidence: `README.md`)
