Migrate PDF parsing to use ONNX Docling layout model for structured block extraction, enabling improved TTS segmentation and chaptering. Add compute backend abstraction for heavy tasks (alignment, layout parsing) with configuration via `OPENREADER_COMPUTE_MODE`. Integrate block-level locators and document settings for per-document PDF parsing options. Update S3 storage for parsed PDF JSON, add migration and schema changes, and extend client and server APIs for parsed data and settings. Remove legacy word highlight flag in favor of compute capability detection. - Add ONNX model download, local/none compute modes, and `onnxruntime-node` dependency - Update PDF viewer and TTS pipeline to use parsed blocks and block-level locators - Add document settings storage and APIs for per-document PDF options - Update S3 storage layout for parsed PDF JSON - Add admin/config/docs updates for new compute and parsing features - Remove obsolete word highlight runtime flag and UI BREAKING CHANGE: PDF parsing and word highlighting now require `OPENREADER_COMPUTE_MODE=local` and ONNX model; document settings and S3 layout updated; legacy word highlight flag removed.
3.1 KiB
3.1 KiB
| title |
|---|
| Auth |
This page covers application-level configuration for provider access and authentication.
Auth behavior
- Auth is enabled only when both
BASE_URLandAUTH_SECRETare set. - Remove either value to disable auth.
- Keep
AUTH_TRUSTED_ORIGINSempty to trust onlyBASE_URL. - Anonymous auth sessions are disabled by default.
- Set
USE_ANONYMOUS_AUTH_SESSIONS=trueto enable anonymous session flows.
Runtime modes
OpenReader effectively has three common runtime modes:
- Auth disabled (
BASE_URLorAUTH_SECRETunset): no admin panel. Shared providers can still exist via first-boot seeding (API_KEY/API_BASE), but you cannot manage them in-app. - Auth enabled, non-admin user: user account/session features are available, but no admin controls.
- Auth enabled, admin user: full Settings → Admin access (shared providers + site features).
Admin role
When auth is enabled, you can designate one or more users as admins via the ADMIN_EMAILS env var:
ADMIN_EMAILS=alice@example.com,bob@example.com
Admins see a new Admin tab in Settings with two sub-tabs:
- Shared TTS providers — server-managed TTS provider instances with encrypted keys, visible to all users.
- Site features — runtime overrides for what were previously
NEXT_PUBLIC_*build-time flags (including account signup availability, default TTS provider/model, audiobook export, etc.).
Admin assignment is reconciled on every session resolution, so removing an email from ADMIN_EMAILS demotes the user on next login without a restart. See Admin Panel for the full reference.
Route behavior
/is a public landing/onboarding page and remains indexable./appis the protected app home (document list and uploader UI).- If auth is enabled and a valid session exists (including anonymous), visiting
/redirects to/app. - Protected app routes continue to require auth; when anonymous sessions are disabled and no session exists, users are redirected to
/signin.
Related docs
- For auth environment variables: Environment Variables
- For admin role and shared TTS provider config: Admin Panel
- For TTS character limits and quota behavior: TTS Rate Limiting
- For provider-specific guidance: TTS Providers
- For storage/S3/SeaweedFS behavior: Object / Blob Storage
- For database mode: Database
- For migration behavior and commands: Migrations
Sync notes
Auth enabled
- Settings and reading progress are saved to the server.
- Updates are not instant push-based sync; they use normal client polling/refresh behavior.
- If two devices change the same item around the same time, the newest update wins.
Auth disabled
- Settings and reading progress stay local in the browser (Dexie/IndexedDB).
- This avoids no-auth cross-browser conflicts, but there is no cross-device sync.
Claim modal note
- You may still see old anonymous settings/progress available to claim from older deployments.