Lion Reader

Lion Reader is fully open source and designed to be self-hosted. Every line of code is available on GitHub for you to inspect, modify, and deploy on your own infrastructure. When you self-host Lion Reader, you own your data completely — no third-party services, no vendor lock-in, just you and your feeds.

Modern Tech Stack

Lion Reader is built with cutting-edge technologies chosen for performance, developer experience, and long-term maintainability:

  • FrontendNext.js 16 with React 19, Tailwind CSS 4 for styling
  • APItRPC for end-to-end type-safe APIs with Zod 4 validation
  • Database — PostgreSQL with Drizzle ORM for type-safe queries, UUIDv7 primary keys
  • Caching & Real-time — Redis for session caching, rate limiting, and SSE pub/sub
  • Auth — Custom session management with Arctic for OAuth (Google, Apple, Discord), Argon2 password hashing
  • AIAnthropic SDK for summaries, Groq for narration preprocessing, ONNX Runtime for client-side neural TTS voice synthesis, server-side TF-IDF + Ridge Regression for article scoring
  • Feed parsing — htmlparser2 for SAX-style streaming XML/HTML parsing, fast-xml-parser for OPML, Mozilla Readability for content extraction
  • DeploymentFly.io with auto-scaling, Docker Compose for local development
  • TestingVitest with real database integration tests (no mocks)
  • ObservabilitySentry for error tracking, structured JSON logging, Prometheus metrics

Architecture Highlights

  • Stateless app servers — All state lives in Postgres and Redis, enabling horizontal scaling
  • Services layer — Shared business logic between tRPC routers, MCP server, and background jobs
  • Cursor-based pagination — Efficient pagination everywhere using UUIDv7 cursors
  • Background job queue — Built on Postgres for reliable feed fetching with exponential backoff
  • Efficient data sharing — Feed and entry data deduplicated across users with strict privacy boundaries

Contributing

Contributions are welcome! Check out the open issues to find ways to help, or explore the architecture documentation in the repository to understand how everything fits together. The codebase includes comprehensive design docs, architecture diagrams, and testing guidelines to help you get started.