openreader/docs-site/docs/start-here/local-development.md
Richard R 9b9206f50d refactor(audiobooks): migrate audiobook pipeline to object storage
This commit restructures the audiobook generation and serving layer to rely exclusively on S3-compatible blob storage, removing the dependency on local filesystem paths.

- Bundle `ffmpeg` and `ffprobe` binaries via npm to ensure portability across environments.
- Update API routes to stream audio directly from blob storage instead of local disk.
- Remove legacy migration endpoints and filesystem-based indexing logic.
- Add startup scripts to facilitate the transition from local to remote storage.

BREAKING CHANGE: Audiobook functionality is now strictly dependent on S3 configuration. The previous filesystem-based storage method has been removed.
2026-02-11 02:44:34 -07:00

2.7 KiB
Raw Blame History

title
Local Development

Prerequisites

  • Node.js (recommended with nvm)
  • pnpm (recommended) or npm
npm install -g pnpm
  • A reachable TTS API server
  • SeaweedFS weed binary (required)
brew install seaweedfs

Optional, depending on features:

brew install libreoffice
  • whisper.cpp (optional, for word-by-word highlighting)
# clone and build whisper.cpp (no model download needed  OpenReader handles that)
git clone https://github.com/ggml-org/whisper.cpp.git
cd whisper.cpp
cmake -B build
cmake --build build -j --config Release

# point OpenReader to the compiled whisper-cli binary
echo WHISPER_CPP_BIN="$(pwd)/build/bin/whisper-cli"

:::note Set WHISPER_CPP_BIN in your .env to enable word-by-word highlighting. :::

Steps

  1. Clone the repository.
git clone https://github.com/richardr1126/OpenReader-WebUI.git
cd OpenReader-WebUI
  1. Install dependencies.
pnpm i
  1. Configure the environment.
cp .env.example .env

Then edit .env.

Auth is enabled when both are set:

  • BASE_URL (for local dev, typically http://localhost:3003)
  • AUTH_SECRET (generate with openssl rand -base64 32)

Optional:

  • AUTH_TRUSTED_ORIGINS=http://localhost:3003,http://192.168.0.116:3003
  • Stable S3 credentials via S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY
  • External S3 storage by setting USE_EMBEDDED_WEED_MINI=false and related S3 vars

For all environment variables, see Environment Variables. For app/auth behavior, see Auth. For storage configuration, see Object / Blob Storage. For database mode and migrations, see Database and Migrations.

  1. Run DB migrations.
  • Migrations run automatically on startup through the shared entrypoint for both pnpm dev and pnpm start.
  • You only need manual migration commands for one-off troubleshooting or explicit migration workflows:
pnpm migrate

:::note If POSTGRES_URL is set, migrations target Postgres; otherwise local SQLite is used. To disable automatic startup migrations, set RUN_DRIZZLE_MIGRATIONS=false and/or RUN_FS_MIGRATIONS=false. You can run storage migration manually with pnpm migrate-fs. :::

  1. Start the app.
pnpm dev

Or build + start production mode:

pnpm build
pnpm start

Visit http://localhost:3003.