# mega7306626007/global-digest architecture

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

- Interactive diagram: https://gitdiagram.com/mega7306626007/global-digest
- Repository: https://github.com/mega7306626007/global-digest

## Overview

Global Digest is a daily, static newspaper assembled from RSS feeds and published on GitHub Pages. Its main workflow fetches and parses articles, filters and ranks them into category editions, then renders a self-contained page for readers. The page also offers search, filtering, theme selection, bookmarks, trending stories, and a newsletter form. The sampled source is partial, so internal stages and reader features are mapped to the single supported source file; uncertain implementation-level wiring is omitted.

Main entry points: [`build_site.py`](https://github.com/mega7306626007/global-digest/blob/main/build_site.py) (Fetch feeds), [`.github/workflows/daily.yml`](https://github.com/mega7306626007/global-digest/blob/main/.github/workflows/daily.yml) (Daily build and publish)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Feed ingestion"]
  node_fetch["Fetch feeds<br/>[build_site.py]"]
  node_parse["Parse articles<br/>[build_site.py]"]
end

subgraph group_editorial["Editorial selection"]
  node_dedupe["Deduplicate<br/>[build_site.py]"]
  node_rank["Rank stories<br/>[build_site.py]"]
  node_categories["Select editions<br/>[build_site.py]"]
  node_images["Validate images<br/>[build_site.py]"]
end

subgraph group_publishing["Build and publication"]
  node_render["Render newspaper<br/>[build_site.py]"]
  node_automation["Daily build and publish<br/>[daily.yml]"]
  node_pages["GitHub Pages"]
end

subgraph group_reader["Reader experience"]
  node_edition["Newspaper page<br/>[build_site.py]"]
  node_browse["Search and filter<br/>[build_site.py]"]
  node_personalize["Theme and bookmarks<br/>[build_site.py]"]
  node_sidebar["Trending and saved<br/>[build_site.py]"]
  node_newsletter["Newsletter form<br/>[build_site.py]"]
end

node_scheduler(("Daily schedule"))
node_feeds["RSS publishers"]
node_weather["Weather service"]
node_fx["Exchange-rate service"]
node_reader(("Reader"))
node_formspree["Formspree"]
node_publishers["Original publishers"]

node_scheduler -->|"schedules"| node_automation
node_automation -->|"runs build"| node_fetch
node_feeds -->|"provide feeds"| node_fetch
node_fetch -->|"returns feeds"| node_parse
node_parse -->|"provides articles"| node_dedupe
node_dedupe -->|"passes stories"| node_rank
node_rank -->|"ranks stories"| node_categories
node_categories -->|"selects stories"| node_images
node_fetch -.->|"requests weather"| node_weather
node_fetch -.->|"requests rates"| node_fx
node_render -->|"renders editions"| node_categories
node_images -->|"provides images"| node_render
node_automation -->|"builds page"| node_render
node_automation -->|"publishes dist"| node_pages
node_pages -->|"serves page"| node_reader
node_pages -->|"serves edition"| node_edition
node_reader -->|"searches and filters"| node_browse
node_reader -->|"sets preferences"| node_personalize
node_reader -->|"opens sidebar"| node_sidebar
node_reader -->|"submits email"| node_newsletter
node_newsletter -.->|"opens signup"| node_formspree
node_edition -->|"links to stories"| node_publishers

click node_fetch "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_parse "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_dedupe "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_rank "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_categories "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_images "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_render "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_automation "https://github.com/mega7306626007/global-digest/blob/main/.github/workflows/daily.yml"
click node_edition "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_browse "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_personalize "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_sidebar "https://github.com/mega7306626007/global-digest/blob/main/build_site.py"
click node_newsletter "https://github.com/mega7306626007/global-digest/blob/main/build_site.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_fetch,node_parse toneBlue
class node_dedupe,node_rank,node_categories,node_images toneAmber
class node_render,node_automation,node_pages toneMint
class node_edition,node_browse,node_personalize,node_sidebar,node_newsletter toneRose
class node_scheduler,node_feeds,node_weather,node_fx,node_reader,node_formspree,node_publishers toneIndigo
```

## Components

### Feed ingestion

- [Fetch feeds](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Parse articles](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`

### Editorial selection

- [Deduplicate](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Rank stories](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Select editions](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Validate images](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`

### Build and publication

- [Render newspaper](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Daily build and publish](https://github.com/mega7306626007/global-digest/blob/main/.github/workflows/daily.yml): `.github/workflows/daily.yml`
- **GitHub Pages**

### Reader experience

- [Newspaper page](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Search and filter](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Theme and bookmarks](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Trending and saved](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`
- [Newsletter form](https://github.com/mega7306626007/global-digest/blob/main/build_site.py): `build_site.py`

### Other components

- **Daily schedule**
- **RSS publishers**
- **Weather service**
- **Exchange-rate service**
- **Reader**
- **Formspree**
- **Original publishers**

## Connections

- Daily schedule → Daily build and publish: schedules
- Daily build and publish → Fetch feeds: runs build
- RSS publishers → Fetch feeds: provide feeds
- Fetch feeds → Parse articles: returns feeds
- Parse articles → Deduplicate: provides articles
- Deduplicate → Rank stories: passes stories
- Rank stories → Select editions: ranks stories
- Select editions → Validate images: selects stories
- Fetch feeds → Weather service: requests weather
- Fetch feeds → Exchange-rate service: requests rates
- Render newspaper → Select editions: renders editions
- Validate images → Render newspaper: provides images
- Daily build and publish → Render newspaper: builds page
- Daily build and publish → GitHub Pages: publishes dist
- GitHub Pages → Reader: serves page
- GitHub Pages → Newspaper page: serves edition
- Reader → Search and filter: searches and filters
- Reader → Theme and bookmarks: sets preferences
- Reader → Trending and saved: opens sidebar
- Reader → Newsletter form: submits email
- Newsletter form → Formspree: opens signup
- Newspaper page → Original publishers: links to stories
