- TypeScript 96.2%
- Nix 2.6%
- CSS 0.8%
- Dockerfile 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
ci / check (push) Successful in 59s
Reviewed-on: reaf/reaf#41 |
||
| .agents/skills/run-reef | ||
| .forgejo/workflows | ||
| apps | ||
| docs | ||
| e2e | ||
| nix | ||
| packages/shared | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.example | ||
| .envrc | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| biome.json | ||
| bun.lock | ||
| bunfig.toml | ||
| CLAUDE.md | ||
| compose.prod.yaml | ||
| compose.yaml | ||
| flake.lock | ||
| flake.nix | ||
| lefthook.yml | ||
| package.json | ||
| README.md | ||
| tsconfig.base.json | ||
reef
A self-hosted, multi-user RSS reader with AI summaries, in the spirit of Miniflux: follow sites, read in a calm three-pane reader, and ask an AI model for a short brief of any article through an AI endpoint each user chooses.
Status: 0.1, feature complete for daily reading; not yet run in production.
Features
- RSS, Atom, RDF and JSON Feed. Paste any page of a site and its feed is found: declared feed links, feed-looking links in the page, the usual paths of blog engines, then the site's home page.
- YouTube: paste a channel (
@handle,/channel/,/c/) or a video and you follow the channel's videos, without Shorts. Videos play inline. - Several users on one server. Feeds are fetched once however many people follow them; read and starred state is each person's own.
- AI summaries through any OpenAI-compatible endpoint (OpenAI, OpenRouter, LiteLLM, Ollama, vLLM, llama.cpp). Each user sets their own endpoint, key and model in the web app; keys are stored encrypted.
- A daily brief: at a time each user picks, the AI reads the brief's own feeds (kept apart from the ones they follow), keeps the stories that match their interests (optionally after a first pass by a decision model such as TypeSafe's Jev), groups the outlets covering the same one, and sums each up in a line or two.
- Listening: any entry read aloud, and the daily brief as a short radio show
(a presenter, the headlines, a section per interest, jingles and a music
bed), through any speech model on OpenAI's
/audio/speech(OpenAI, or a local Kokoro or Speaches server). The music is synthesized in the browser. - Full-article extraction (Mozilla Readability) for feeds that only send a teaser, used automatically before summarizing one.
- Categories, full-text search, unread counts, OPML import and export,
keyboard shortcuts (
jksmbv/), light and dark themes. - First-run setup makes the first account the admin; registration stays closed unless an admin opens it.
Stack
- TypeScript everywhere, on Bun: runtime, workspaces, bundler and test runner
- API: Fastify 5, Zod, Drizzle ORM, Postgres 18, TanStack AI
(
@tanstack/ai-openai), feedsmith, sanitize-html, Readability - Web: React 19, Vite, TanStack Router, Query and Form, Tailwind 4, daisyUI 5, Radix primitives, Tabler Icons
- Tests:
bun testwith real Postgres, Testing Library with happy-dom and MSW, Playwright - Tooling: Biome, lefthook, Nix flake, Docker, Forgejo Actions
Quick start
Docker
cp .env.example .env
sed -i "s/^APP_SECRET=.*/APP_SECRET=$(openssl rand -hex 32)/" .env
docker compose --profile app up --build
Open http://localhost:8080 and create the admin account. That is the
production image; docker compose --profile all up --build runs the dev
servers with hot reload instead (web on http://localhost:5173).
Local tooling (Bun 1.4+, Docker for Postgres)
bun install
cp .env.example .env
sed -i "s/^APP_SECRET=.*/APP_SECRET=$(openssl rand -hex 32)/" .env
docker compose --profile db up -d --wait
bun run db:migrate
bun run dev
Open http://localhost:5173. bun run seed adds admin and reader (password
password123) if you would rather skip setup. Without Docker, any Postgres 18
works: point DATABASE_URL at it (see docs/installation.md).
Nix
nix develop # Bun, Postgres 18, Biome, Playwright's Chromium
bun install
# then the same steps as the local tooling path
nix build produces the reef, reef-migrate and reef-admin
programs, and nixosModules.default runs them on NixOS
(docs/deployment.md).
Configuration
Every variable is in .env.example with its default. The ones you will set:
| Variable | What it is for | Example |
|---|---|---|
DATABASE_URL |
Postgres connection | postgres://reef:reef@localhost:5434/reef |
APP_SECRET |
Encrypts the stored AI key; 64 hex chars | openssl rand -hex 32 |
COOKIE_SECURE |
Secure session cookie; on by default in production | true |
TRUST_PROXY |
Behind a reverse proxy | true |
FETCH_INTERVAL_MINUTES |
How often each feed is fetched | 30 |
FETCH_ALLOW_PRIVATE_NETWORKS |
Allow feeds on the LAN or localhost | false |
ENTRY_RETENTION_DAYS |
Days before read, unstarred entries are pruned | 90 |
The AI endpoint, key, model, summary language and instructions are not environment variables: each user sets their own in Settings -> AI.
Commands
| Command | Does |
|---|---|
bun run dev |
API and web dev servers, with reload |
bun run build |
Web bundle, API bundle |
bun run test |
API tests (needs Postgres) and web tests |
bun run test:e2e |
Build, then the Playwright path |
bun run lint / bun run format |
Biome check / write |
bun run typecheck |
tsc in every workspace |
bun run db:generate |
SQL migration from a schema change |
bun run db:migrate |
Apply migrations |
bun run seed |
Development users |
bun run admin reset-password <name> |
Account recovery |
bun run test, not bun test: each app's tests need its own setup, which
its bunfig.toml preloads.
Layout
apps/api/ Fastify API, feed fetcher, migrations (drizzle/)
apps/web/ React single-page app
packages/shared/ Zod schemas used by both
e2e/ Playwright test and the stack it runs against
nix/ Nix package
docs/ Installation, development, deployment, architecture
Documentation
- Installation: prerequisites for the manual path
- Development: the dev loop, tests, mixing Docker and host
- Deployment: the image, a reverse proxy, backups, AI setup
- Architecture: how a feed becomes an entry and a brief
- Database: the schema
- Decisions: why it is built this way