# wptk/kipple architecture

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

- Interactive diagram: https://gitdiagram.com/wptk/kipple
- Repository: https://github.com/wptk/kipple

## Overview

Kipple is a self-hosted, single-user RSS reader. A user opens its browser/PWA interface, manages feeds and reading preferences, then reads, searches, and syncs articles; the backend persists account, feed, and article state in SQLite. Distinct product areas include feed fetching and extraction, OPML exchange, filtering/search, image delivery, backup/restore, statistics, and Google Reader-compatible sync. The graph reflects the documented capabilities and sampled wiring; several backend routes and subsystem connections are unsampled, so those links are omitted rather than inferred.

Main entry points: [`internal/api/api.go`](https://github.com/wptk/kipple/blob/main/internal/api/api.go) (API handlers), [`web/src/App.tsx`](https://github.com/wptk/kipple/blob/main/web/src/App.tsx) (Web app), [`internal/fetch/fetch.go`](https://github.com/wptk/kipple/blob/main/internal/fetch/fetch.go) (Feed retrieval), [`internal/store/db.go`](https://github.com/wptk/kipple/blob/main/internal/store/db.go) (SQLite store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Reader interface"]
  node_spa["Web app<br/>[App.tsx]"]
  node_entry["Frontend startup<br/>[main.tsx]"]
  node_offline["Offline support<br/>[offline.ts]"]
end

subgraph group_server["HTTP and account"]
  node_http["HTTP server<br/>[handler.go]"]
  node_api["API handlers<br/>[api.go]"]
  node_auth["Authentication<br/>[auth.go]"]
  node_reach["Access policy<br/>[reach.go]"]
end

subgraph group_reading["Feeds and reading"]
  node_scheduler["Feed scheduler<br/>[worker.go]"]
  node_fetch["Feed retrieval<br/>[fetch.go]"]
  node_extract["Article extraction<br/>[extract.go]"]
  node_sanitize["Content sanitizing<br/>[serve.go]"]
  node_filters["Keyword filters<br/>[eval.go]"]
  node_search["Search<br/>[search.go]"]
  node_opml["OPML exchange<br/>[import.go]"]
end

subgraph group_data["Persistence and operations"]
  node_database[("SQLite store<br/>[db.go]")]
  node_backup["Backup and restore<br/>[backup.go]"]
  node_stats["Reading statistics<br/>[stats.go]"]
end

subgraph group_integrations["Sync and media"]
  node_greader["Reader-compatible sync<br/>[api.go]"]
  node_imgproxy["Image proxy<br/>[imgproxy.go]"]
  node_imgcache[("Image cache<br/>[cache.go]")]
end

node_person(("Reader"))

node_person -->|"uses"| node_spa
node_entry -->|"renders"| node_spa
node_entry -->|"initializes"| node_offline
node_http -->|"serves"| node_spa
node_spa -.->|"calls"| node_api
node_scheduler -->|"fetches"| node_fetch
node_scheduler -->|"commits"| node_database
node_opml -->|"validates feeds"| node_fetch
node_opml -->|"imports feeds"| node_database
node_api -->|"stores searches"| node_database
node_greader -.->|"syncs articles"| node_database
node_imgproxy -->|"retrieves images"| node_fetch
node_imgproxy -->|"caches images"| node_imgcache
node_api -.->|"checks sessions"| node_auth
node_api -.->|"applies access policy"| node_reach
node_api -.->|"handles backup"| node_backup
node_api -.->|"serves statistics"| node_stats
node_api -.->|"applies filters"| node_filters
node_api -.->|"serves search"| node_search
node_fetch -.->|"extracts content"| node_extract
node_extract -.->|"prepares content"| node_sanitize

click node_spa "https://github.com/wptk/kipple/blob/main/web/src/App.tsx"
click node_entry "https://github.com/wptk/kipple/blob/main/web/src/main.tsx"
click node_offline "https://github.com/wptk/kipple/blob/main/web/src/lib/offline.ts"
click node_http "https://github.com/wptk/kipple/blob/main/internal/web/handler.go"
click node_api "https://github.com/wptk/kipple/blob/main/internal/api/api.go"
click node_auth "https://github.com/wptk/kipple/blob/main/internal/auth/auth.go"
click node_reach "https://github.com/wptk/kipple/blob/main/internal/reach/reach.go"
click node_database "https://github.com/wptk/kipple/blob/main/internal/store/db.go"
click node_scheduler "https://github.com/wptk/kipple/blob/main/internal/sched/worker.go"
click node_fetch "https://github.com/wptk/kipple/blob/main/internal/fetch/fetch.go"
click node_extract "https://github.com/wptk/kipple/blob/main/internal/extract/extract.go"
click node_sanitize "https://github.com/wptk/kipple/blob/main/internal/sanitize/serve.go"
click node_filters "https://github.com/wptk/kipple/blob/main/internal/filter/eval.go"
click node_search "https://github.com/wptk/kipple/blob/main/internal/store/search.go"
click node_opml "https://github.com/wptk/kipple/blob/main/internal/opml/import.go"
click node_backup "https://github.com/wptk/kipple/blob/main/internal/backup/backup.go"
click node_stats "https://github.com/wptk/kipple/blob/main/internal/stats/stats.go"
click node_greader "https://github.com/wptk/kipple/blob/main/internal/greader/api.go"
click node_imgproxy "https://github.com/wptk/kipple/blob/main/internal/imgproxy/imgproxy.go"
click node_imgcache "https://github.com/wptk/kipple/blob/main/internal/imgcache/cache.go"

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_spa,node_entry,node_offline toneBlue
class node_http,node_api,node_auth,node_reach toneAmber
class node_scheduler,node_fetch,node_extract,node_sanitize,node_filters,node_search,node_opml toneMint
class node_database,node_backup,node_stats toneRose
class node_greader,node_imgproxy,node_imgcache,node_person toneIndigo
```

## Components

### Reader interface

- [Web app](https://github.com/wptk/kipple/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Frontend startup](https://github.com/wptk/kipple/blob/main/web/src/main.tsx): `web/src/main.tsx`
- [Offline support](https://github.com/wptk/kipple/blob/main/web/src/lib/offline.ts): `web/src/lib/offline.ts`

### HTTP and account

- [HTTP server](https://github.com/wptk/kipple/blob/main/internal/web/handler.go): `internal/web/handler.go`
- [API handlers](https://github.com/wptk/kipple/blob/main/internal/api/api.go): `internal/api/api.go`
- [Authentication](https://github.com/wptk/kipple/blob/main/internal/auth/auth.go): `internal/auth/auth.go`
- [Access policy](https://github.com/wptk/kipple/blob/main/internal/reach/reach.go): `internal/reach/reach.go`

### Feeds and reading

- [Feed scheduler](https://github.com/wptk/kipple/blob/main/internal/sched/worker.go): `internal/sched/worker.go`
- [Feed retrieval](https://github.com/wptk/kipple/blob/main/internal/fetch/fetch.go): `internal/fetch/fetch.go`
- [Article extraction](https://github.com/wptk/kipple/blob/main/internal/extract/extract.go): `internal/extract/extract.go`
- [Content sanitizing](https://github.com/wptk/kipple/blob/main/internal/sanitize/serve.go): `internal/sanitize/serve.go`
- [Keyword filters](https://github.com/wptk/kipple/blob/main/internal/filter/eval.go): `internal/filter/eval.go`
- [Search](https://github.com/wptk/kipple/blob/main/internal/store/search.go): `internal/store/search.go`
- [OPML exchange](https://github.com/wptk/kipple/blob/main/internal/opml/import.go): `internal/opml/import.go`

### Persistence and operations

- [SQLite store](https://github.com/wptk/kipple/blob/main/internal/store/db.go): `internal/store/db.go`
- [Backup and restore](https://github.com/wptk/kipple/blob/main/internal/backup/backup.go): `internal/backup/backup.go`
- [Reading statistics](https://github.com/wptk/kipple/blob/main/internal/stats/stats.go): `internal/stats/stats.go`

### Sync and media

- [Reader-compatible sync](https://github.com/wptk/kipple/blob/main/internal/greader/api.go): `internal/greader/api.go`
- [Image proxy](https://github.com/wptk/kipple/blob/main/internal/imgproxy/imgproxy.go): `internal/imgproxy/imgproxy.go`
- [Image cache](https://github.com/wptk/kipple/blob/main/internal/imgcache/cache.go): `internal/imgcache/cache.go`

### Other components

- **Reader**

## Connections

- Reader → Web app: uses (evidence: `README.md`)
- Frontend startup → Web app: renders (evidence: `web/src/main.tsx`)
- Frontend startup → Offline support: initializes (evidence: `web/src/main.tsx`)
- HTTP server → Web app: serves (evidence: `internal/web/handler.go`)
- Web app → API handlers: calls
- Feed scheduler → Feed retrieval: fetches (evidence: `internal/sched/worker.go`)
- Feed scheduler → SQLite store: commits (evidence: `internal/sched/worker.go`)
- OPML exchange → Feed retrieval: validates feeds (evidence: `internal/opml/import.go`)
- OPML exchange → SQLite store: imports feeds (evidence: `internal/opml/import.go`)
- API handlers → SQLite store: stores searches
- Reader-compatible sync → SQLite store: syncs articles
- Image proxy → Feed retrieval: retrieves images (evidence: `internal/imgproxy/imgproxy.go`)
- Image proxy → Image cache: caches images (evidence: `internal/imgproxy/imgproxy.go`)
- API handlers → Authentication: checks sessions
- API handlers → Access policy: applies access policy
- API handlers → Backup and restore: handles backup
- API handlers → Reading statistics: serves statistics
- API handlers → Keyword filters: applies filters
- API handlers → Search: serves search
- Feed retrieval → Article extraction: extracts content
- Article extraction → Content sanitizing: prepares content
