# xlr-aex/albatros architecture

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

- Interactive diagram: https://gitdiagram.com/xlr-aex/albatros
- Repository: https://github.com/xlr-aex/albatros

## Overview

Albatros is a local-first Electron feed reader. Users manage subscriptions, sync RSS/Atom/JSON Feed and Reddit content, then browse, search, save, and read downloaded articles; separate branches cover OPML exchange, GitHub views, and local Laya classification. The graph follows documented and excerpted wiring. Some UI capabilities are documented but their implementation was not sampled, so those branches are shown without speculative internal call edges.

Main entry points: [`src/main/index.ts`](https://github.com/xlr-aex/albatros/blob/main/src/main/index.ts) (Main process), [`src/main/sync/SyncEngine.ts`](https://github.com/xlr-aex/albatros/blob/main/src/main/sync/SyncEngine.ts) (Feed sync), [`src/renderer/src/App.tsx`](https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/App.tsx) (Reader), [`src/main/ipc/feeds.ts`](https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/feeds.ts) (Feed IPC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_reader["Reader<br/>[App.tsx]"]
  node_navigation["Feed navigation<br/>[Sidebar.tsx]"]
  node_feed_state["Feed state<br/>[feedStore.ts]"]
  node_article_state["Article state<br/>[articleStore.ts]"]
  node_article_reader["Article view<br/>[ArticleReader.tsx]"]
end

subgraph group_bridge["IPC and application"]
  node_preload["Preload bridge<br/>[index.ts]"]
  node_main["Main process<br/>[index.ts]"]
  node_feed_ipc["Feed IPC<br/>[feeds.ts]"]
  node_article_ipc["Article IPC<br/>[articles.ts]"]
  node_settings_ipc["Settings IPC<br/>[settings.ts]"]
  node_laya_ipc["Laya IPC<br/>[laya.ts]"]
end

subgraph group_content["Feeds and reading"]
  node_database[("Local database<br/>[connection.ts]")]
  node_feeds["Feed management<br/>[FeedService.ts]"]
  node_articles["Article operations<br/>[ArticleService.ts]"]
  node_search["Full-text search<br/>[SearchService.ts]"]
  node_opml["OPML exchange<br/>[OpmlService.ts]"]
end

subgraph group_sync["Synchronization"]
  node_scheduler["Sync scheduler<br/>[Scheduler.ts]"]
  node_sync_engine["Feed sync<br/>[SyncEngine.ts]"]
  node_http["HTTP client<br/>[HttpClient.ts]"]
  node_parser["Feed parser<br/>[FeedParser.ts]"]
end

subgraph group_extras["Local features"]
  node_settings["Settings<br/>[SettingsService.ts]"]
  node_laya["Laya classifier<br/>[LayaService.ts]"]
  node_laya_runtime["Laya runtime"]
end

node_local_worker(("Local Laya worker"))
node_user(("Reader"))

node_user -->|"uses"| node_reader
node_reader -->|"renders"| node_navigation
node_reader -->|"loads feeds"| node_feed_state
node_reader -->|"loads articles"| node_article_state
node_reader -->|"renders"| node_article_reader
node_navigation -->|"updates"| node_feed_state
node_feed_state -->|"calls API"| node_preload
node_article_state -->|"calls API"| node_preload
node_article_reader -->|"reads state"| node_article_state
node_preload -->|"routes calls"| node_feed_ipc
node_preload -->|"routes calls"| node_article_ipc
node_main -->|"registers"| node_feed_ipc
node_main -->|"registers"| node_article_ipc
node_main -->|"registers"| node_settings_ipc
node_main -->|"registers"| node_laya_ipc
node_feed_ipc -->|"calls"| node_feeds
node_feed_ipc -->|"calls"| node_opml
node_feed_ipc -->|"triggers"| node_scheduler
node_article_ipc -->|"calls"| node_articles
node_article_ipc -->|"calls"| node_search
node_settings_ipc -->|"calls"| node_settings
node_laya_ipc -->|"calls"| node_laya
node_main -->|"opens"| node_database
node_main -->|"creates"| node_feeds
node_main -->|"creates"| node_articles
node_main -->|"creates"| node_search
node_main -->|"creates"| node_settings
node_main -->|"creates"| node_opml
node_main -->|"creates"| node_sync_engine
node_main -->|"creates"| node_scheduler
node_main -->|"starts"| node_laya
node_scheduler -->|"schedules"| node_sync_engine
node_sync_engine -->|"fetches via"| node_http
node_sync_engine -->|"parses via"| node_parser
node_sync_engine -->|"reads feeds"| node_feeds
node_sync_engine -->|"upserts articles"| node_articles
node_sync_engine -->|"persists batch"| node_database
node_laya -->|"uses"| node_laya_runtime
node_laya -->|"classifies via HTTP"| node_local_worker
node_laya_ipc -.-> node_settings_ipc

click node_reader "https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/App.tsx"
click node_navigation "https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/components/layout/Sidebar.tsx"
click node_feed_state "https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/store/feedStore.ts"
click node_article_state "https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/store/articleStore.ts"
click node_article_reader "https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/components/layout/ArticleReader.tsx"
click node_preload "https://github.com/xlr-aex/albatros/blob/main/src/preload/index.ts"
click node_main "https://github.com/xlr-aex/albatros/blob/main/src/main/index.ts"
click node_feed_ipc "https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/feeds.ts"
click node_article_ipc "https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/articles.ts"
click node_settings_ipc "https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/settings.ts"
click node_laya_ipc "https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/laya.ts"
click node_database "https://github.com/xlr-aex/albatros/blob/main/src/main/db/connection.ts"
click node_feeds "https://github.com/xlr-aex/albatros/blob/main/src/main/services/FeedService.ts"
click node_articles "https://github.com/xlr-aex/albatros/blob/main/src/main/services/ArticleService.ts"
click node_search "https://github.com/xlr-aex/albatros/blob/main/src/main/services/SearchService.ts"
click node_opml "https://github.com/xlr-aex/albatros/blob/main/src/main/services/OpmlService.ts"
click node_scheduler "https://github.com/xlr-aex/albatros/blob/main/src/main/sync/Scheduler.ts"
click node_sync_engine "https://github.com/xlr-aex/albatros/blob/main/src/main/sync/SyncEngine.ts"
click node_http "https://github.com/xlr-aex/albatros/blob/main/src/main/sync/HttpClient.ts"
click node_parser "https://github.com/xlr-aex/albatros/blob/main/src/main/sync/FeedParser.ts"
click node_settings "https://github.com/xlr-aex/albatros/blob/main/src/main/services/SettingsService.ts"
click node_laya "https://github.com/xlr-aex/albatros/blob/main/src/main/services/LayaService.ts"
click node_laya_runtime "https://github.com/xlr-aex/albatros/blob/main/src/main/services/LayaRuntimeService.ts"

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_reader,node_navigation,node_feed_state,node_article_state,node_article_reader toneBlue
class node_preload,node_main,node_feed_ipc,node_article_ipc,node_settings_ipc,node_laya_ipc toneAmber
class node_database,node_feeds,node_articles,node_search,node_opml toneMint
class node_scheduler,node_sync_engine,node_http,node_parser,node_local_worker toneRose
class node_settings,node_laya,node_laya_runtime,node_user toneIndigo
```

## Components

### Desktop interface

- [Reader](https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/App.tsx): `src/renderer/src/App.tsx`
- [Feed navigation](https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/components/layout/Sidebar.tsx): `src/renderer/src/components/layout/Sidebar.tsx`
- [Feed state](https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/store/feedStore.ts): `src/renderer/src/store/feedStore.ts`
- [Article state](https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/store/articleStore.ts): `src/renderer/src/store/articleStore.ts`
- [Article view](https://github.com/xlr-aex/albatros/blob/main/src/renderer/src/components/layout/ArticleReader.tsx): `src/renderer/src/components/layout/ArticleReader.tsx`

### IPC and application

- [Preload bridge](https://github.com/xlr-aex/albatros/blob/main/src/preload/index.ts): `src/preload/index.ts`
- [Main process](https://github.com/xlr-aex/albatros/blob/main/src/main/index.ts): `src/main/index.ts`
- [Feed IPC](https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/feeds.ts): `src/main/ipc/feeds.ts`
- [Article IPC](https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/articles.ts): `src/main/ipc/articles.ts`
- [Settings IPC](https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/settings.ts): `src/main/ipc/settings.ts`
- [Laya IPC](https://github.com/xlr-aex/albatros/blob/main/src/main/ipc/laya.ts): `src/main/ipc/laya.ts`

### Feeds and reading

- [Local database](https://github.com/xlr-aex/albatros/blob/main/src/main/db/connection.ts): `src/main/db/connection.ts`
- [Feed management](https://github.com/xlr-aex/albatros/blob/main/src/main/services/FeedService.ts): `src/main/services/FeedService.ts`
- [Article operations](https://github.com/xlr-aex/albatros/blob/main/src/main/services/ArticleService.ts): `src/main/services/ArticleService.ts`
- [Full-text search](https://github.com/xlr-aex/albatros/blob/main/src/main/services/SearchService.ts): `src/main/services/SearchService.ts`
- [OPML exchange](https://github.com/xlr-aex/albatros/blob/main/src/main/services/OpmlService.ts): `src/main/services/OpmlService.ts`

### Synchronization

- [Sync scheduler](https://github.com/xlr-aex/albatros/blob/main/src/main/sync/Scheduler.ts): `src/main/sync/Scheduler.ts`
- [Feed sync](https://github.com/xlr-aex/albatros/blob/main/src/main/sync/SyncEngine.ts): `src/main/sync/SyncEngine.ts`
- [HTTP client](https://github.com/xlr-aex/albatros/blob/main/src/main/sync/HttpClient.ts): `src/main/sync/HttpClient.ts`
- [Feed parser](https://github.com/xlr-aex/albatros/blob/main/src/main/sync/FeedParser.ts): `src/main/sync/FeedParser.ts`

### Local features

- [Settings](https://github.com/xlr-aex/albatros/blob/main/src/main/services/SettingsService.ts): `src/main/services/SettingsService.ts`
- [Laya classifier](https://github.com/xlr-aex/albatros/blob/main/src/main/services/LayaService.ts): `src/main/services/LayaService.ts`
- [Laya runtime](https://github.com/xlr-aex/albatros/blob/main/src/main/services/LayaRuntimeService.ts): `src/main/services/LayaRuntimeService.ts`

### Other components

- **Local Laya worker**
- **Reader**

## Connections

- Reader → Reader: uses (evidence: `README.md`)
- Reader → Feed navigation: renders (evidence: `src/renderer/src/App.tsx`)
- Reader → Feed state: loads feeds (evidence: `src/renderer/src/App.tsx`)
- Reader → Article state: loads articles (evidence: `src/renderer/src/App.tsx`)
- Reader → Article view: renders (evidence: `src/renderer/src/App.tsx`)
- Feed navigation → Feed state: updates (evidence: `src/renderer/src/components/layout/Sidebar.tsx`)
- Feed state → Preload bridge: calls API (evidence: `src/renderer/src/store/feedStore.ts`)
- Article state → Preload bridge: calls API (evidence: `src/renderer/src/store/articleStore.ts`)
- Article view → Article state: reads state (evidence: `src/renderer/src/components/layout/ArticleReader.tsx`)
- Preload bridge → Feed IPC: routes calls (evidence: `src/preload/index.ts`)
- Preload bridge → Article IPC: routes calls (evidence: `src/preload/index.ts`)
- Main process → Feed IPC: registers (evidence: `src/main/index.ts`)
- Main process → Article IPC: registers (evidence: `src/main/index.ts`)
- Main process → Settings IPC: registers (evidence: `src/main/index.ts`)
- Main process → Laya IPC: registers (evidence: `src/main/index.ts`)
- Feed IPC → Feed management: calls (evidence: `src/main/ipc/feeds.ts`)
- Feed IPC → OPML exchange: calls (evidence: `src/main/ipc/feeds.ts`)
- Feed IPC → Sync scheduler: triggers (evidence: `src/main/ipc/feeds.ts`)
- Article IPC → Article operations: calls (evidence: `src/main/ipc/articles.ts`)
- Article IPC → Full-text search: calls (evidence: `src/main/ipc/articles.ts`)
- Settings IPC → Settings: calls (evidence: `src/main/ipc/settings.ts`)
- Laya IPC → Laya classifier: calls (evidence: `src/main/ipc/laya.ts`)
- Main process → Local database: opens (evidence: `src/main/index.ts`)
- Main process → Feed management: creates (evidence: `src/main/index.ts`)
- Main process → Article operations: creates (evidence: `src/main/index.ts`)
- Main process → Full-text search: creates (evidence: `src/main/index.ts`)
- Main process → Settings: creates (evidence: `src/main/index.ts`)
- Main process → OPML exchange: creates (evidence: `src/main/index.ts`)
- Main process → Feed sync: creates (evidence: `src/main/index.ts`)
- Main process → Sync scheduler: creates (evidence: `src/main/index.ts`)
- Main process → Laya classifier: starts (evidence: `src/main/index.ts`)
- Sync scheduler → Feed sync: schedules (evidence: `src/main/sync/Scheduler.ts`)
- Feed sync → HTTP client: fetches via (evidence: `src/main/sync/SyncEngine.ts`)
- Feed sync → Feed parser: parses via (evidence: `src/main/sync/SyncEngine.ts`)
- Feed sync → Feed management: reads feeds (evidence: `src/main/sync/SyncEngine.ts`)
- Feed sync → Article operations: upserts articles (evidence: `src/main/sync/SyncEngine.ts`)
- Feed sync → Local database: persists batch (evidence: `src/main/sync/SyncEngine.ts`)
- Laya classifier → Laya runtime: uses (evidence: `src/main/services/LayaService.ts`)
- Laya classifier → Local Laya worker: classifies via HTTP (evidence: `src/main/services/LayaService.ts`)
- Laya IPC → Settings IPC
