openreader/package.json
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

73 lines
No EOL
2 KiB
JSON

{
"name": "openreader-webui",
"version": "v1.3.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack -p 3003",
"build": "next build",
"start": "node scripts/migrate-if-auth.mjs && next start -p 3003",
"lint": "next lint",
"test": "playwright test",
"migrate": "node scripts/migrate-if-auth.mjs",
"migrate:force": "drizzle-kit migrate"
},
"dependencies": {
"@headlessui/react": "^2.2.9",
"@types/howler": "^2.2.12",
"@types/uuid": "^10.0.0",
"@vercel/analytics": "^1.6.1",
"better-auth": "^1.4.17",
"better-sqlite3": "^12.6.2",
"cmpstr": "^3.2.0",
"compromise": "^14.14.5",
"core-js": "^3.48.0",
"dexie": "^4.2.1",
"dexie-react-hooks": "^4.2.0",
"dotenv": "^17.2.3",
"drizzle-kit": "^0.31.8",
"drizzle-orm": "^0.45.1",
"epubjs": "^0.3.93",
"howler": "^2.2.4",
"lru-cache": "^11.2.4",
"next": "^15.5.9",
"openai": "^6.16.0",
"pdfjs-dist": "4.8.69",
"pg": "^8.17.2",
"react": "^19.2.3",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^19.2.3",
"react-dropzone": "^14.3.8",
"react-hot-toast": "^2.6.0",
"react-markdown": "^10.1.0",
"react-pdf": "^9.2.1",
"react-reader": "^2.0.15",
"remark-gfm": "^4.0.1",
"uuid": "^11.1.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.3",
"@playwright/test": "^1.58.0",
"@tailwindcss/typography": "^0.5.19",
"@types/better-sqlite3": "^7.6.13",
"@types/node": "^20.19.30",
"@types/pg": "^8.16.0",
"@types/react": "^19.2.9",
"@types/react-dom": "^19.2.3",
"eslint": "^9.39.2",
"eslint-config-next": "^15.5.9",
"postcss": "^8.5.6",
"tailwindcss": "^3.4.19",
"typescript": "^5.9.3"
},
"pnpm": {
"onlyBuiltDependencies": [
"better-sqlite3"
],
"overrides": {
"lodash": "^4.17.23",
"@xmldom/xmldom": "^0.9.8",
"@types/localforage": "npm:empty-module@0.0.2"
}
}
}