Skip to main content
Version: v5.3.0

Stack

OpenReader is a pnpm workspace written in TypeScript. The architecture is described in the repository's v5/ documents.

PackageRole
Root appNext.js app: sign-in, library, reader, settings, API routes
packages/compute-workerSpeech generation, alignment, PDF layout, previews, conversion, exports
packages/ttsProvider clients shared by the app and worker
packages/databaseDrizzle schemas and migrations for SQLite and Postgres
packages/bootstrapStartup: configuration checks, migrations, and the embedded services
packages/runtime-configConfiguration shared by the app and worker
desktop/Electron shell for the desktop app (a separate project)

App​

TTS providers​

packages/tts uses the OpenAI SDK for OpenAI, DeepInfra and OpenAI-compatible servers, the Replicate client, and Speech SDK for its hosted services.

Compute worker​

  • Server: Fastify 5 with an OpenAPI contract; the app's client is generated from it
  • Jobs: NATS JetStream work queues and key-value state
  • Inference: onnxruntime-node with @huggingface/tokenizers
  • Documents: pdfjs-dist and @napi-rs/canvas to render pages, fast-xml-parser and jszip for EPUB, headless LibreOffice for DOCX
  • Audio: FFmpeg, a pinned LGPL build in published images and the desktop app (packaging/ffmpeg)
  • Exports and email: archiver, Resend

The worker runs embedded in Docker, native and desktop installs, or as its own service. The app talks to it only over HTTP.

Desktop​

Electron with electron-builder and electron-updater. It runs the same server and worker as the Docker image.

Tooling​

  • ESLint and TypeScript
  • Vitest 4 for unit and integration tests
  • Playwright for end-to-end tests in Chromium and WebKit
  • Docusaurus for this site (docs-site/)