Commit graph

59 commits

Author SHA1 Message Date
Richard R
2c23dc9043 refactor(db): remove conditional database usage from API layer
Ensure all metadata operations consistently use the database layer,
removing filesystem-only fallback paths and conditional DB checks.

- Simplified migration scripts to always run on startup
- Updated document/audiobook APIs to always query DB
- Added ensureDbIndexed() calls across all routes
- Extracted test namespace utilities to dedicated module
- Removed migration-manager.ts (functionality consolidated)
- Updated rate limiter to assume DB is always available

BREAKING CHANGE: Database is now required in all configurations.
When auth is disabled, SQLite is used by default at /app/docstore/sqlite3.db.
2026-02-03 12:17:30 -07:00
Richard R
6089d2c445 chore(db): move drizzle scripts and update commands
Relocate migration scripts to `drizzle/scripts`, update `start` and
`migrate`
to use the new path, and add a `generate` script for contributors.
Update README migration guidance for SQLite vs Postgres workflows.

BREAKING CHANGE: remove `migrate:force` and change migration script
paths; consumers relying on `scripts/migrate*.mjs` or `pnpm
migrate:force` must update to the new commands.
2026-01-27 17:46:29 -07:00
Richard R
297752e83e fix(db): select drizzle config for migrations
Add dedicated Drizzle config files for sqlite and postgres and generate
new migration outputs for each dialect.

Update migrate scripts to load env files and auto-pick the correct
config unless explicitly provided, and tighten API auth handling by
using shared auth context helpers and enforcing userId checks when auth
is enabled.
2026-01-27 16:53:58 -07:00
Richard R
c57b913cb5 feat(db/auth): migrate auth storage to Drizzle and add claimable data flow
- replace custom DB adapter with Drizzle setup (SQLite/Postgres schemas) and add `drizzle.config.ts` plus migrations in `drizzle/` and `drizzle_pg/`
- switch better-auth to drizzleAdapter, add auth helpers (`getAuthContext`, `requireAuthContext`, `requireAudiobookOwned`), and make `useAuth`/`useAuthSession` safe no-ops when auth is disabled
- persist documents/audiobooks in DB with ownership checks, unclaimed fallback, and ref-counted deletes; add FS scan helper for no-auth mode
- gate docx-to-pdf, library, voices, whisper, and migration endpoints behind auth when enabled
- add unclaimed data scan/claim flow with `/api/user/claim`, `ClaimDataModal`, and server-side scan/claim helpers
- refactor rate limiting and account deletion to use Drizzle tables (`user_tts_chars`, `user`)
- run migrations via `scripts/migrate-if-auth.mjs` (auto on `pnpm start` + `pnpm migrate`), remove Docker entrypoint and old better-auth migration file
- update README and lockfile for the new migration workflow and dependencies
2026-01-26 17:01:36 -07:00
Richard R
50c3829f98 update(auth): enhance rate limiting with device/IP backstops and improve UI
- Add device ID and IP-based rate limiting to prevent abuse
- Refactor UI components for better header menus and settings
- Update privacy popup with detailed data usage info
- Improve PDF handling and caching to prevent react-pdf warnings
- Update README with new Docker instructions and environment variables
2026-01-25 14:38:31 -07:00
Richard R
9ba20c8a9e feat(auth): add user authentication and rate limiting
- Implement user sign-in, sign-up, and account management using better-auth
- Add rate limiting for TTS API with daily character limits for authenticated and anonymous users
- Integrate SQLite and PostgreSQL database support for user sessions and data persistence
- Update UI components to include authentication flows, user menu, and privacy popup
- Modify Dockerfile and package.json for new dependencies and entrypoint script
- Bump version to v1.3.0
2026-01-24 17:36:11 -07:00
Richard R
33d49d6966 fix: Enhance audiobook API validation and prevent critical meta file deletion 2026-01-19 16:40:04 -07:00
Richard R
f11c015f7e docs: Refactor README to remove *(New)* labels, introduce server-side sync and external library import, and reorder feature descriptions. 2026-01-19 15:02:35 -07:00
Richard R
199b937a25 refactor: overhaul document storage and audiobook architecture
- refactor(documents): implement stable SHA256-based document IDs
- feat(library): add support for external document libraries
- refactor(audiobook): consolidate server logic and migrate to V1 storage layout
- feat(audiobook): add reset functionality and improve chapter management
- fix(ui): enhance audiobook export modal with download/regenerate controls
- test: add coverage for upload hashing and export reset flow
2026-01-19 14:22:21 -07:00
Richard Roberson
372c65f23e feat(whisper): integrate binary with build and docs
The Dockerfile has been refactored to a multi-stage build, allowing the `whisper.cpp` CLI binary to be compiled and embedded within the application's runtime image. This enables word-by-word highlighting functionality when deployed via Docker. The `README.md` has been updated to include installation and configuration instructions for `whisper.cpp` when running locally. Additionally, the `WHISPER_CPP_BIN` environment variable has been added to `template.env` and the package version has been bumped to v1.1.0.
2025-11-22 00:25:13 -07:00
Richard Roberson
ac0b47debb Update README.md 2025-11-21 12:11:49 -07:00
Richard Roberson
264f3c10d7 docs(README): refine details and update TTS provider information 2025-11-17 12:31:48 -07:00
Richard Roberson
ad4faa3ddc docs(readme): update readme with reading experience enhancements 2025-11-15 18:00:56 -07:00
Richard Roberson
5316596a1b refactor(db): migrate to Dexie with reactive queries and simplify data layer
Replaces custom IndexedDB implementation with Dexie ORM, eliminating 850+ lines of
boilerplate code and introducing reactive live queries across all document types.
Transforms document management from imperative refresh patterns to automatic
reactive updates using dexie-react-hooks.

Simplifies TTS backend by removing concurrency semaphore while maintaining
request de-duplication through in-flight tracking. Streamlines document hooks
by removing manual state management and refresh methods.

Updates package dependencies and type definitions to support new database
architecture while maintaining full backward compatibility for existing
documents and settings.

BREAKING CHANGE: Document hooks no longer expose refresh() methods as updates
are now reactive through live queries.
2025-11-14 16:14:00 -07:00
Richard Roberson
e3799e40aa feat(tts): add smart sentence continuation
introduce configurable smart sentence splitting with persisted state,
UI toggle, and EPUB/PDF contexts that send continuation metadata.
enhance TTS pipeline to merge cross-page sentences, manage carryover,
and trigger visual page changes during playback for smoother narration.

update README with kokoro quick-start guidance, remove the legacy
issues mapping doc, and add deterministic TTS mocks plus sample audio
for Playwright tests.
2025-11-14 12:00:03 -07:00
Richard Roberson
e7ce1a34ce Update docs 2025-11-10 15:30:23 -07:00
Richard Roberson
1d57004e59 fix(docs): readme 2025-11-09 15:54:36 -07:00
Richard Roberson
b21bdb3a21 feat(tts): add multi-provider TTS support with Deepinfra and custom OpenAI-compatible endpoints
Add comprehensive multi-provider TTS support enabling users to choose between OpenAI, Deepinfra, and custom OpenAI-compatible endpoints. Implement provider-specific voice management with automatic voice restoration per provider-model combination, and migrate package manager to pnpm for improved dependency handling.

Key changes:
- Add TTS provider selection (OpenAI, Deepinfra, custom-openai) in settings UI
- Implement provider-specific model and voice lists with dynamic fetching
- Add voice persistence per provider-model combination in savedVoices
- Support Deepinfra models: Kokoro-82M, Orpheus-3B, Sesame-1B with their voice libraries
- Migrate to pnpm with frozen lockfile for reproducible builds
- Update Docker configuration to use pnpm and Deepinfra API defaults
- Add migration logic for existing users to infer provider from stored baseUrl
- Update test helpers and Playwright configuration for Deepinfra API
- Add example docker-compose.yml with Kokoro-FastAPI integration

BREAKING CHANGE: Voice selection is now provider-model specific. Previously saved voices will be migrated to the new savedVoices structure, but users may need to reselect voices if switching providers.
2025-11-09 15:47:17 -07:00
Richard Roberson
e56736fda8 Update README.md 2025-11-09 11:22:30 -07:00
Richard Roberson
df649656da
Update README.md 2025-05-25 22:05:12 -06:00
Richard Roberson
17ab2d5d48 Update README 2025-04-15 11:51:18 -06:00
Richard Roberson
8cd6158bc4 Update README 2025-04-15 02:47:33 -06:00
Richard Roberson
b0a3e2f632 Update readme 2025-04-15 00:32:23 -06:00
Richard Roberson
fc780746aa Bug fixes and readme update 2025-03-30 21:17:16 -06:00
Richard Roberson
4ed6b17e98 Support gpt-4o-mini-tts with instructions
Some checks failed
Build and Publish Docker Image / build (push) Has been cancelled
2025-03-21 11:32:42 -06:00
Richard Roberson
f464b059e4 Update API settings 2025-03-13 21:00:34 -06:00
Richard Roberson
4a8c194c88 Update README.md 2025-03-04 23:08:27 -07:00
Richard Roberson
520236b95c add DOCX support (requires libreoffice) + upload test 2025-03-04 22:47:37 -07:00
Richard Roberson
b411a87f08 Update README.md 2025-03-04 13:45:42 -07:00
Richard Roberson
95c763fb48 Update README.md 2025-03-01 23:56:04 -07:00
Richard Roberson
3568f3c8f9 Update README.md 2025-03-01 19:52:06 -07:00
Richard Roberson
a937e0ee07 Update README.md badges 2025-02-26 06:26:41 -07:00
Richard Roberson
991304d134 Use github packages
Some checks failed
Build and Publish Docker Image / build (push) Has been cancelled
2025-02-26 05:42:57 -07:00
Richard Roberson
e3370f7526 Further audiobook extraction optimizations 2025-02-26 04:03:05 -07:00
Richard Roberson
568c9f2095 Make Docker image smaller
Some checks failed
Build and Publish Docker Image / build (push) Has been cancelled
2025-02-26 00:32:30 -07:00
Richard Roberson
9ae7c39f00 Update README.md 2025-02-26 00:12:55 -07:00
Richard Roberson
b87b83310b Rely on TTS API for splitting 2025-02-25 00:58:32 -07:00
Richard Roberson
96376e2324 Environment changes, set in Docker run 2025-02-23 13:20:42 -07:00
Richard Roberson
cd00ad2b9b
Update README.md 2025-02-22 14:42:16 -07:00
Richard Roberson
5649312255 Update README.md 2025-02-22 14:04:22 -07:00
Richard Roberson
edff480e0b
Update README.md 2025-02-18 13:38:35 -07:00
Richard Roberson
1d418e1444 Update README.md 2025-02-12 22:59:00 -07:00
Richard Roberson
1326ac0e7e Setup GitHub features 2025-02-11 15:21:09 -07:00
Richard Roberson
d8a5e1e068 Update README.md
Some checks failed
Build and Publish Docker Image / build (push) Has been cancelled
2025-02-11 14:43:43 -07:00
Richard Roberson
8b44001a47 Update README.md
Some checks failed
Build and Publish Docker Image / build (push) Has been cancelled
2025-02-11 02:22:15 -07:00
Richard Roberson
4320730834
Update README.md 2025-02-10 23:15:22 -07:00
Richard Roberson
02595147fa
Update README.md 2025-02-09 20:11:07 -07:00
Richard Roberson
340d289996 Update README.md 2025-02-09 11:59:43 -07:00
Richard Roberson
6a6ad6510e add Docker support 2025-02-04 22:31:35 -07:00
Richard Roberson
02bf20e137 Update readme 2025-02-04 04:03:43 -07:00