# brunns/rss-agg architecture

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

- Interactive diagram: https://gitdiagram.com/brunns/rss-agg
- Repository: https://github.com/brunns/rss-agg

## Overview

RSS aggregator serves a combined Guardian feed: a request enters the web app, RSSService obtains included and excluded feed URLs, the parser fetches and de-duplicates items while applying exclusions, and the generator sorts, limits, and emits RSS. Feed lists can come from a local file or S3; the README also documents a CLI entry point and AWS Lambda deployment. The graph follows shown calls and explicit README behavior; the fetcher implementation, CLI internals, and deployment wiring were not excerpted.

Main entry points: [`src/rss_agg/core/web/flask_app_factory.py`](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/web/flask_app_factory.py) (App factory), [`src/rss_agg/services/rss_service.py`](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/rss_service.py) (RSS service), [`src/rss_agg/core/web/routes.py`](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/web/routes.py) (RSS routes), [`src/rss_agg/services/feeds_services/file_feeds_service.py`](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/feeds_services/file_feeds_service.py) (File feeds)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry points"]
  node_web["Web entry<br/>[web.py]"]
  node_app_factory["App factory"]
  node_routes["RSS routes<br/>[routes.py]"]
  node_cli["CLI<br/>[cli.py]"]
end

subgraph group_feeds["Feed configuration"]
  node_feeds_interface["Feeds service"]
  node_file_feeds["File feeds"]
  node_s3_feeds["S3 feeds"]
  node_feed_file["Feed list<br/>[feeds.txt]"]
end

subgraph group_processing["RSS processing"]
  node_rss_service["RSS service<br/>[rss_service.py]"]
  node_fetcher["Feed fetcher<br/>[fetcher.py]"]
  node_parser["RSS parser<br/>[rss_parser.py]"]
  node_generator["RSS generator<br/>[rss_generator.py]"]
end

subgraph group_support["Domain and support"]
  node_domain["Domain types<br/>[domain.py]"]
  node_logging["Logging utilities<br/>[logging_utils.py]"]
end

node_user(("Feed reader"))
node_s3[("AWS S3")]

node_user -.->|"requests feed"| node_web
node_web -->|"creates app"| node_app_factory
node_app_factory -->|"registers routes"| node_routes
node_app_factory -->|"wires file source"| node_file_feeds
node_app_factory -->|"wires S3 source"| node_s3_feeds
node_app_factory -->|"initializes logging"| node_logging
node_routes -->|"calls"| node_rss_service
node_rss_service -->|"reads feed list"| node_feeds_interface
node_file_feeds -->|"reads"| node_feed_file
node_s3_feeds -->|"reads object"| node_s3
node_file_feeds -->|"implements"| node_feeds_interface
node_s3_feeds -->|"implements"| node_feeds_interface
node_rss_service -->|"parses feeds"| node_parser
node_parser -->|"fetches URLs"| node_fetcher
node_fetcher -.->|"retrieves Guardian feeds"| node_user
node_rss_service -->|"generates feed"| node_generator
node_routes -->|"returns RSS"| node_user
node_cli -.->|"uses service"| node_rss_service

click node_web "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/web/web.py"
click node_app_factory "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/web/flask_app_factory.py"
click node_routes "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/web/routes.py"
click node_cli "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/cli/cli.py"
click node_rss_service "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/rss_service.py"
click node_feeds_interface "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/feeds_services/base_feeds_service.py"
click node_file_feeds "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/feeds_services/file_feeds_service.py"
click node_s3_feeds "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/feeds_services/s3_feeds_service.py"
click node_feed_file "https://github.com/brunns/rss-agg/blob/main/feeds.txt"
click node_fetcher "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/fetcher.py"
click node_parser "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/rss_parser.py"
click node_generator "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/rss_generator.py"
click node_domain "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/domain/domain.py"
click node_logging "https://github.com/brunns/rss-agg/blob/main/src/rss_agg/utils/logging_utils.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_web,node_app_factory,node_routes,node_cli toneBlue
class node_feeds_interface,node_file_feeds,node_s3_feeds,node_feed_file,node_s3 toneAmber
class node_rss_service,node_fetcher,node_parser,node_generator toneMint
class node_domain,node_logging toneRose
class node_user toneIndigo
```

## Components

### Application entry points

- [Web entry](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/web/web.py): `src/rss_agg/core/web/web.py`
- [App factory](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/web/flask_app_factory.py): `src/rss_agg/core/web/flask_app_factory.py`
- [RSS routes](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/web/routes.py): `src/rss_agg/core/web/routes.py`
- [CLI](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/core/cli/cli.py): `src/rss_agg/core/cli/cli.py`

### Feed configuration

- [Feeds service](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/feeds_services/base_feeds_service.py): `src/rss_agg/services/feeds_services/base_feeds_service.py`
- [File feeds](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/feeds_services/file_feeds_service.py): `src/rss_agg/services/feeds_services/file_feeds_service.py`
- [S3 feeds](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/feeds_services/s3_feeds_service.py): `src/rss_agg/services/feeds_services/s3_feeds_service.py`
- [Feed list](https://github.com/brunns/rss-agg/blob/main/feeds.txt): `feeds.txt`

### RSS processing

- [RSS service](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/rss_service.py): `src/rss_agg/services/rss_service.py`
- [Feed fetcher](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/fetcher.py): `src/rss_agg/services/fetcher.py`
- [RSS parser](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/rss_parser.py): `src/rss_agg/services/rss_parser.py`
- [RSS generator](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/services/rss_generator.py): `src/rss_agg/services/rss_generator.py`

### Domain and support

- [Domain types](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/domain/domain.py): `src/rss_agg/domain/domain.py`
- [Logging utilities](https://github.com/brunns/rss-agg/blob/main/src/rss_agg/utils/logging_utils.py): `src/rss_agg/utils/logging_utils.py`

### Other components

- **Feed reader**
- **AWS S3**

## Connections

- Feed reader → Web entry: requests feed (evidence: `README.md`)
- Web entry → App factory: creates app (evidence: `src/rss_agg/core/web/web.py`)
- App factory → RSS routes: registers routes (evidence: `src/rss_agg/core/web/flask_app_factory.py`)
- App factory → File feeds: wires file source (evidence: `src/rss_agg/core/web/flask_app_factory.py`)
- App factory → S3 feeds: wires S3 source (evidence: `src/rss_agg/core/web/flask_app_factory.py`)
- App factory → Logging utilities: initializes logging (evidence: `src/rss_agg/core/web/flask_app_factory.py`)
- RSS routes → RSS service: calls (evidence: `src/rss_agg/core/web/routes.py`)
- RSS service → Feeds service: reads feed list (evidence: `src/rss_agg/services/rss_service.py`)
- File feeds → Feed list: reads (evidence: `src/rss_agg/services/feeds_services/file_feeds_service.py`)
- S3 feeds → AWS S3: reads object (evidence: `src/rss_agg/services/feeds_services/s3_feeds_service.py`)
- File feeds → Feeds service: implements (evidence: `src/rss_agg/services/feeds_services/file_feeds_service.py`)
- S3 feeds → Feeds service: implements (evidence: `src/rss_agg/services/feeds_services/s3_feeds_service.py`)
- RSS service → RSS parser: parses feeds (evidence: `src/rss_agg/services/rss_service.py`)
- RSS parser → Feed fetcher: fetches URLs (evidence: `src/rss_agg/services/rss_parser.py`)
- Feed fetcher → Feed reader: retrieves Guardian feeds (evidence: `README.md`)
- RSS service → RSS generator: generates feed (evidence: `src/rss_agg/services/rss_service.py`)
- RSS routes → Feed reader: returns RSS (evidence: `src/rss_agg/core/web/routes.py`)
- CLI → RSS service: uses service
