# ibalajisivarajan/daily-pulse-v2 architecture

> Architecture diagram of the GitHub repository ibalajisivarajan/daily-pulse-v2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ibalajisivarajan/daily-pulse-v2
- Repository: https://github.com/ibalajisivarajan/daily-pulse-v2
- Video tour (about a minute): https://gitdiagram.com/ibalajisivarajan/daily-pulse-v2/video

## Overview

Daily Pulse is a browser-based, full-screen news feed. Its principal workflow gathers stories, enriches or formats them into JSON, and presents them to readers; a separate refresh endpoint can save preferences and trigger scheduled fetching. The source excerpts support the agent and basic fetch implementations, while the README documents weather and scheduled hosting. The unsampled page and workflow prevent confirming their internal wiring, so those links are limited to documented behavior.

Main entry points: [`scripts/agent.js`](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/agent.js) (News agent), [`index.html`](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/index.html) (News feed), [`scripts/fetch.js`](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/fetch.js) (HN fetcher), [`scripts/news-mcp-server.js`](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/news-mcp-server.js) (News sources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Reader experience"]
  node_page["News feed<br/>[index.html]"]
  node_display_logic["Feed formatting<br/>[app-logic.js]"]
end

subgraph group_collection["Story collection"]
  node_fetch_job["Scheduled fetch<br/>[fetch-stories.yml]"]
  node_basic_fetch["HN fetcher<br/>[fetch.js]"]
  node_mcp_server["News sources<br/>[news-mcp-server.js]"]
end

subgraph group_enrichment["Curation and refresh"]
  node_agent["News agent<br/>[agent.js]"]
  node_refresh_worker["Refresh endpoint"]
end

subgraph group_state["Data and integrations"]
  node_stories["Story data<br/>[stories.json]"]
  node_preferences["Reader preferences<br/>[preferences.json]"]
end

node_reader(("Reader"))
node_hn{{"HN Algolia"}}
node_rss{{"RSS publishers"}}
node_groq{{"Groq"}}
node_unsplash{{"Unsplash"}}
node_story_sites{{"Story websites"}}
node_weather{{"Open-Meteo"}}
node_github_api{{"GitHub API"}}
node_github_pages{{"GitHub Pages"}}

node_reader -->|"views"| node_page
node_page -->|"reads"| node_stories
node_page -->|"reads"| node_preferences
node_page -->|"uses"| node_display_logic
node_page -.->|"gets weather"| node_weather
node_fetch_job -->|"runs"| node_basic_fetch
node_basic_fetch -->|"fetches stories"| node_hn
node_basic_fetch -->|"scrapes images"| node_story_sites
node_basic_fetch -->|"writes"| node_stories
node_agent -->|"reads"| node_preferences
node_agent -->|"calls tools"| node_mcp_server
node_mcp_server -->|"fetches stories"| node_hn
node_mcp_server -->|"fetches feeds"| node_rss
node_agent -->|"enriches stories"| node_groq
node_agent -->|"gets images"| node_story_sites
node_agent -->|"searches images"| node_unsplash
node_agent -->|"writes"| node_stories
node_reader -.->|"requests refresh"| node_refresh_worker
node_refresh_worker -->|"updates preferences"| node_github_api
node_refresh_worker -->|"dispatches workflow"| node_github_api
node_github_pages -.->|"hosts"| node_page

click node_page "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/index.html"
click node_display_logic "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/app-logic.js"
click node_stories "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/data/stories.json"
click node_preferences "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/data/preferences.json"
click node_fetch_job "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/.github/workflows/fetch-stories.yml"
click node_basic_fetch "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/fetch.js"
click node_agent "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/agent.js"
click node_mcp_server "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/news-mcp-server.js"
click node_refresh_worker "https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/workers/daily-pulse-refresh.js"

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_page,node_display_logic toneBlue
class node_fetch_job,node_basic_fetch,node_mcp_server toneAmber
class node_agent,node_refresh_worker,node_github_api toneMint
class node_stories,node_preferences toneRose
class node_reader,node_hn,node_rss,node_groq,node_unsplash,node_story_sites,node_weather,node_github_pages toneIndigo
```

## Components

### Reader experience

- [News feed](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/index.html): `index.html`
- [Feed formatting](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/app-logic.js): `scripts/app-logic.js`

### Story collection

- [Scheduled fetch](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/.github/workflows/fetch-stories.yml): `.github/workflows/fetch-stories.yml`
- [HN fetcher](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/fetch.js): `scripts/fetch.js`
- [News sources](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/news-mcp-server.js): `scripts/news-mcp-server.js`

### Curation and refresh

- [News agent](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/scripts/agent.js): `scripts/agent.js`
- [Refresh endpoint](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/workers/daily-pulse-refresh.js): `workers/daily-pulse-refresh.js`

### Data and integrations

- [Story data](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/data/stories.json): `data/stories.json`
- [Reader preferences](https://github.com/ibalajisivarajan/daily-pulse-v2/blob/main/data/preferences.json): `data/preferences.json`

### Other components

- **Reader**
- **HN Algolia**
- **RSS publishers**
- **Groq**
- **Unsplash**
- **Story websites**
- **Open-Meteo**
- **GitHub API**
- **GitHub Pages**

## Connections

- Reader → News feed: views
- News feed → Story data: reads
- News feed → Reader preferences: reads
- News feed → Feed formatting: uses
- News feed → Open-Meteo: gets weather
- Scheduled fetch → HN fetcher: runs
- HN fetcher → HN Algolia: fetches stories
- HN fetcher → Story websites: scrapes images
- HN fetcher → Story data: writes
- News agent → Reader preferences: reads
- News agent → News sources: calls tools
- News sources → HN Algolia: fetches stories
- News sources → RSS publishers: fetches feeds
- News agent → Groq: enriches stories
- News agent → Story websites: gets images
- News agent → Unsplash: searches images
- News agent → Story data: writes
- Reader → Refresh endpoint: requests refresh
- Refresh endpoint → GitHub API: updates preferences
- Refresh endpoint → GitHub API: dispatches workflow
- GitHub Pages → News feed: hosts
