How muzuiyo/cfrss works
RSS Reader’s main workflow is: a signed-in reader selects or searches a feed view, the Next.js interface requests articles from the Worker API, and the API returns persisted feed/article state. Feed subscriptions can be refreshed manually or on a 12-hour schedule; the fetcher retrieves RSS/Atom documents, parses them with conditional-request support, and stores resulting feed and article data. The product also covers GitHub OAuth, OPML transfer, and user settings. The README establishes these capabilities; route and hook internals not sampled are represented only where their paths and responsibilities are documented.
Main entry points: src/index.ts API entry · page.tsx Reader app · db/index.ts D1 database · feed-fetcher.ts Feed fetcher
Components 26
Reader interface
- Reader app
frontend/src/app/page.tsx - Auth provider
frontend/src/components/auth-provider.tsx - Auth client
frontend/src/lib/auth.ts - Article views
frontend/src/components/article-list.tsx - Feed sidebar
frontend/src/components/sidebar.tsx - Settings view
frontend/src/components/settings-view.tsx - Data hooks
frontend/src/hooks/use-articles.ts - Feed hooks
frontend/src/hooks/use-feeds.ts - Settings hooks
frontend/src/hooks/use-settings.ts - API client
frontend/src/lib/api.ts
Worker API
- API entry
backend/src/index.ts - OAuth routes
backend/src/routes/auth.ts - Auth middleware
backend/src/middleware/auth.ts - Feed routes
backend/src/routes/feeds.ts - Article routes
backend/src/routes/articles.ts - OPML routes
backend/src/routes/opml.ts - OPML service
backend/src/services/opml.ts - Settings routes
backend/src/routes/settings.ts
Feed ingestion
- Feed fetcher
backend/src/services/feed-fetcher.ts - RSS/Atom parser
backend/src/services/rss-parser.ts
Persistent data
- D1 database
backend/src/db/index.ts - Data schema
backend/src/db/schema.ts
Other components
- Reader
- Scheduled trigger
- RSS sources
- GitHub OAuth
Connections 35
- Reader → Reader app: uses
- Reader app → Auth provider: checks session
- Auth provider → Auth client: calls
- Auth client → API entry: requests auth
- Reader app → Data hooks: selects articles
- Reader app → Feed hooks: loads feeds
- Reader app → Article views: renders
- Reader app → Feed sidebar: renders
- Reader app → Settings view: renders
- Settings view → Settings hooks: reads and updates
- Data hooks → API client: requests data
- Feed hooks → API client: requests data
- Settings hooks → API client: requests data
- API client → API entry: HTTP requests
- API entry → Auth middleware: guards API
- API entry → OAuth routes: dispatches auth
- API entry → Feed routes: dispatches feeds
- API entry → Article routes: dispatches articles
- API entry → OPML routes: dispatches OPML
- API entry → Settings routes: dispatches settings
- API entry → D1 database: creates database access
- OAuth routes → GitHub OAuth: exchanges OAuth
- Auth middleware → D1 database: provides authorized context
- Feed routes → D1 database: reads and writes
- Feed routes → Feed fetcher: refreshes feeds
- Article routes → D1 database: reads and writes
- OPML routes → OPML service: handles transfer
- OPML routes → D1 database: reads and writes
- Settings routes → D1 database: reads and writes
- Scheduled trigger → API entry: triggers schedule
- API entry → Feed fetcher: refreshes all feeds
- Feed fetcher → D1 database: loads and stores feed data
- Feed fetcher → RSS/Atom parser: parses source
- RSS/Atom parser → RSS sources: fetches RSS/Atom
- D1 database → Data schema: uses schema