# antoniman31/gta6-backend architecture

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

- Interactive diagram: https://gitdiagram.com/antoniman31/gta6-backend
- Repository: https://github.com/antoniman31/gta6-backend

## Overview

GTA6_WATCH is an automated GTA 6 news-monitoring product: scheduled runs collect and filter RSS items, update a static feed and archives, then send notifications after publication. Users browse the feed and archives in an installable PWA. The sampled excerpts establish collection, shared feed handling, merge and notification behavior; the README documents the broader publishing and app workflow, while the PWA implementation itself was not sampled.

Main entry points: [`docs/index.html`](https://github.com/antoniman31/gta6-backend/blob/main/docs/index.html) (Installable PWA), [`feed_store.py`](https://github.com/antoniman31/gta6-backend/blob/main/feed_store.py) (Feed operations), [`fetch_feeds.py`](https://github.com/antoniman31/gta6-backend/blob/main/fetch_feeds.py) (Feed collector), [`merge_feed.py`](https://github.com/antoniman31/gta6-backend/blob/main/merge_feed.py) (Concurrent-run merge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Collection runtime"]
  node_collector["Feed collector<br/>[fetch_feeds.py]"]
  node_filtering["Selection and classification<br/>[fetch_feeds.py]"]
end

subgraph group_content["Feed and archive"]
  node_storelib["Feed operations<br/>[feed_store.py]"]
  node_feed["Published feed JSON<br/>[feed.json]"]
  node_recent["Recent feed JSON<br/>[feed-recent.json]"]
  node_archives[("Monthly archives")]
  node_merger["Concurrent-run merge<br/>[merge_feed.py]"]
end

subgraph group_delivery["Publishing and alerts"]
  node_pages["GitHub Pages"]
  node_discord["Discord notifier<br/>[discord_notify.py]"]
  node_push["Push notifier<br/>[push_notify.py]"]
end

subgraph group_client["Reader app"]
  node_pwa["Installable PWA<br/>[index.html]"]
  node_serviceworker["Push service worker<br/>[sw.js]"]
end

node_scheduler(("External scheduler"))
node_actions["GitHub Actions"]
node_sources(("RSS sources"))
node_discordsvc(("Discord webhook"))
node_pushsvc(("Push services"))
node_health(("Healthchecks.io"))
node_reader(("Reader"))

node_scheduler -->|"triggers"| node_actions
node_actions -->|"runs"| node_collector
node_sources -->|"serve feeds"| node_collector
node_collector -->|"process entries"| node_filtering
node_filtering -->|"uses feed operations"| node_storelib
node_collector -->|"loads and saves"| node_storelib
node_storelib -->|"reads and writes"| node_feed
node_storelib -->|"writes recent view"| node_recent
node_storelib -->|"archives items"| node_archives
node_actions -.->|"runs on conflict"| node_merger
node_merger -->|"merges and archives"| node_storelib
node_actions -->|"publishes site"| node_pages
node_pages -->|"serves app"| node_pwa
node_pwa -->|"reads feed"| node_feed
node_pwa -->|"reads recent feed"| node_recent
node_pwa -->|"browses history"| node_archives
node_reader -->|"opens"| node_pwa
node_actions -->|"runs after publish"| node_discord
node_actions -->|"runs after publish"| node_push
node_discord -->|"posts alerts"| node_discordsvc
node_push -->|"sends notifications"| node_pushsvc
node_pwa -->|"registers for push"| node_serviceworker
node_serviceworker -->|"receives push"| node_pushsvc
node_actions -.->|"signals run"| node_health

click node_collector "https://github.com/antoniman31/gta6-backend/blob/main/fetch_feeds.py"
click node_filtering "https://github.com/antoniman31/gta6-backend/blob/main/fetch_feeds.py"
click node_storelib "https://github.com/antoniman31/gta6-backend/blob/main/feed_store.py"
click node_feed "https://github.com/antoniman31/gta6-backend/blob/main/docs/feed.json"
click node_recent "https://github.com/antoniman31/gta6-backend/blob/main/docs/feed-recent.json"
click node_archives "https://github.com/antoniman31/gta6-backend/tree/main/docs/archives"
click node_merger "https://github.com/antoniman31/gta6-backend/blob/main/merge_feed.py"
click node_discord "https://github.com/antoniman31/gta6-backend/blob/main/discord_notify.py"
click node_push "https://github.com/antoniman31/gta6-backend/blob/main/push_notify.py"
click node_pwa "https://github.com/antoniman31/gta6-backend/blob/main/docs/index.html"
click node_serviceworker "https://github.com/antoniman31/gta6-backend/blob/main/docs/sw.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_collector,node_filtering toneBlue
class node_storelib,node_feed,node_recent,node_archives,node_merger toneAmber
class node_pages,node_discord,node_push,node_discordsvc toneMint
class node_pwa,node_serviceworker,node_scheduler toneRose
class node_actions,node_sources,node_pushsvc,node_health,node_reader toneIndigo
```

## Components

### Collection runtime

- [Feed collector](https://github.com/antoniman31/gta6-backend/blob/main/fetch_feeds.py): `fetch_feeds.py`
- [Selection and classification](https://github.com/antoniman31/gta6-backend/blob/main/fetch_feeds.py): `fetch_feeds.py`

### Feed and archive

- [Feed operations](https://github.com/antoniman31/gta6-backend/blob/main/feed_store.py): `feed_store.py`
- [Published feed JSON](https://github.com/antoniman31/gta6-backend/blob/main/docs/feed.json): `docs/feed.json`
- [Recent feed JSON](https://github.com/antoniman31/gta6-backend/blob/main/docs/feed-recent.json): `docs/feed-recent.json`
- [Monthly archives](https://github.com/antoniman31/gta6-backend/tree/main/docs/archives): `docs/archives`
- [Concurrent-run merge](https://github.com/antoniman31/gta6-backend/blob/main/merge_feed.py): `merge_feed.py`

### Publishing and alerts

- **GitHub Pages**
- [Discord notifier](https://github.com/antoniman31/gta6-backend/blob/main/discord_notify.py): `discord_notify.py`
- [Push notifier](https://github.com/antoniman31/gta6-backend/blob/main/push_notify.py): `push_notify.py`

### Reader app

- [Installable PWA](https://github.com/antoniman31/gta6-backend/blob/main/docs/index.html): `docs/index.html`
- [Push service worker](https://github.com/antoniman31/gta6-backend/blob/main/docs/sw.js): `docs/sw.js`

### Other components

- **External scheduler**
- **GitHub Actions**
- **RSS sources**
- **Discord webhook**
- **Push services**
- **Healthchecks.io**
- **Reader**

## Connections

- External scheduler → GitHub Actions: triggers
- GitHub Actions → Feed collector: runs
- RSS sources → Feed collector: serve feeds
- Feed collector → Selection and classification: process entries
- Selection and classification → Feed operations: uses feed operations
- Feed collector → Feed operations: loads and saves
- Feed operations → Published feed JSON: reads and writes
- Feed operations → Recent feed JSON: writes recent view
- Feed operations → Monthly archives: archives items
- GitHub Actions → Concurrent-run merge: runs on conflict
- Concurrent-run merge → Feed operations: merges and archives
- GitHub Actions → GitHub Pages: publishes site
- GitHub Pages → Installable PWA: serves app
- Installable PWA → Published feed JSON: reads feed
- Installable PWA → Recent feed JSON: reads recent feed
- Installable PWA → Monthly archives: browses history
- Reader → Installable PWA: opens
- GitHub Actions → Discord notifier: runs after publish
- GitHub Actions → Push notifier: runs after publish
- Discord notifier → Discord webhook: posts alerts
- Push notifier → Push services: sends notifications
- Installable PWA → Push service worker: registers for push
- Push service worker → Push services: receives push
- GitHub Actions → Healthchecks.io: signals run
