Local Development
Prerequisites
- Node.js (recommended with nvm)
pnpm(recommended) ornpm
npm install -g pnpm
- A reachable TTS API server
- SeaweedFS
weedbinary (required unless using external S3 storage)
- macOS
- Linux
brew install seaweedfs
Install the weed binary from the SeaweedFS releases and ensure it is available on PATH.
Optional, depending on features:
- libreoffice (required for DOCX conversion)
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"
Set WHISPER_CPP_BIN in your .env to enable word-by-word highlighting.
Steps
- Clone the repository.
git clone https://github.com/richardr1126/openreader.git
cd openreader
- Install dependencies.
pnpm i
- Configure the environment.
cp .env.example .env
Then edit .env.
- No auth mode: leave
BASE_URLorAUTH_SECRETunset. - Auth enabled mode: set both
BASE_URL(typicallyhttp://localhost:3003) andAUTH_SECRET(generate withopenssl rand -hex 32).
Optional:
AUTH_TRUSTED_ORIGINS=http://localhost:3003,http://192.168.0.116:3003- Stable S3 credentials via
S3_ACCESS_KEY_IDandS3_SECRET_ACCESS_KEY - External S3 storage by setting
USE_EMBEDDED_WEED_MINI=falseand related S3 vars
For all environment variables, see Environment Variables.
See Auth for app/auth behavior. Storage configuration details are in Object / Blob Storage. Refer to Database for database modes. Learn about migration behavior and commands in Migrations.
- Run DB migrations.
- Migrations run automatically on startup through the shared entrypoint for both
pnpm devandpnpm start. - You only need manual migration commands for one-off troubleshooting or explicit migration workflows:
pnpm migrate
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.
- Start the app.
- Dev
- Build + Start
pnpm dev
pnpm build
pnpm start
API_BASE must be reachable from the Next.js server process, not just your browser.
Visit http://localhost:3003.