Eliminate the "none" compute mode and all related code paths, including the NoneComputeBackend, "unsupported" parse status, and PDF margin settings. Parsing is now always available if the app starts successfully, and configuration is limited to "local" or "worker" compute modes. Update types, API routes, client adapters, and documentation to reflect this simplification. BREAKING CHANGE: "none" is no longer a valid COMPUTE_MODE; only "local" and "worker" are supported. "unsupported" parse status and PDF margin settings are removed.
4 KiB
4 KiB
| title |
|---|
| Stack |
Framework
- Next.js 15 (App Router, Turbopack in dev)
- React 19
- TypeScript
- pnpm workspaces monorepo
Containerization and runtime
- Docker (linux/amd64 and linux/arm64)
- Shared entrypoint that runs DB migrations by default and can bootstrap embedded SeaweedFS before app startup
Next.js client
- UI: Tailwind CSS, Headless UI, @tailwindcss/typography
- Interactions:
react-dnd,react-dropzone - Server state: TanStack Query (React Query v5)
- Authentication: Better Auth client SDK
- Local storage/cache: Dexie.js (IndexedDB)
- Audio playback: Howler.js
- Notifications:
react-hot-toast - Document rendering:
- PDF: react-pdf, pdf.js
- EPUB: react-reader, epubjs
- Markdown/Text: react-markdown, remark-gfm
- Text preprocessing/matching: compromise, cmpstr
- Analytics: Vercel Analytics
Next.js server
- APIs: Route Handlers for sync, blob/content access, migrations, audiobook export, TTS/Whisper proxying
- State sync: request-based today (not realtime push updates)
- Authentication: Better Auth server handlers/adapters with anonymous session support
- Metadata DB: Drizzle ORM with SQLite (
better-sqlite3) by default and optional Postgres (pg)- App tables are manually maintained in Drizzle schema files
- Auth tables are auto-generated by the Better Auth CLI and migrated alongside app tables via Drizzle
- Blob storage: embedded SeaweedFS (
weed mini) by default, or external S3-compatible storage via AWS SDK v3 - TTS providers: OpenAI-compatible API (
openaiSDK), Replicate (replicateclient), DeepInfra, and custom OpenAI-compatible endpoints — credentials are encrypted at rest - Audio pipeline: ffmpeg (
ffmpeg-static) for audiobook assembly,archiverfor export packaging - Utilities:
lru-cachefor in-process caching,fast-xml-parserfor EPUB/XML parsing,uuidfor identifier generation,zodfor schema validation
External compute worker (optional)
Monorepo packages under compute/:
@openreader/compute-core— ONNX runtime lifecycle, model management, and inference logic shared between local and worker modes- ONNX runtime:
onnxruntime-nodewith@huggingface/tokenizers - Whisper alignment:
onnx-community/whisper-base_timestamped(int8) for word-level timestamps - PDF layout:
Bei0001/PP-DocLayoutV3-ONNXfor document block detection and layout parsing - PDF rendering:
pdfjs-dist,@napi-rs/canvasfor server-side page rasterization - Utilities:
jszip,ffmpeg-static
- ONNX runtime:
@openreader/compute-worker— standalone Node.js worker service- Compute mode is controlled by
COMPUTE_MODEenv var:local(in-process) orworker(remote queue via HTTP + Redis)
Tooling and testing
- ESLint
- TypeScript
- Playwright end-to-end tests
- Drizzle migration/generation scripts
- Docusaurus documentation site (
docs-site/)