divan/api/package.json
Anas Rashid 09336ead0e E-books: a poet's books as PDF, EPUB, text (DOCX made text) or archive.org items, uploaded with their own permission and approved like any change
- ebooks permission (create, per poet); the upload button only for L2/L1 moderators with it (and admins).
- Files kept by SHA-256 in DIVAN_FILES_DIR (ab/cd/<sha>.<ext>; one copy per file), up to 100 MB, kind read from
  the bytes; details in PostgreSQL indexed by poet and trigram (title, text of text books); search shows e-books.
- An upload is a revision (entity 'ebook') through L2 -> L1 -> admin; unpublished files only for moderators;
  approved details committed to divan-data (divan/<poet>/ebooks/<id>.txt).
- ای بکس on the poet page; /ebook/<id>: PDF in the browser viewer, EPUB with epub.js, text, archive.org embed.
- README: e-books and the file store (attach growable block storage or an S3 bucket via rclone).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:52:23 +02:00

25 lines
541 B
JSON

{
"name": "divan-api",
"private": true,
"type": "module",
"description": "Divan API: Node.js + PostgreSQL",
"engines": {
"node": ">=24"
},
"scripts": {
"start": "node src/server.ts",
"import": "node src/import.ts",
"test": "node --test --test-concurrency=1 src/*.test.ts",
"dict-sync": "node src/dict-sync.ts",
"make-admin": "node src/admin-cli.ts"
},
"dependencies": {
"fastify": "^5.12.5",
"mammoth": "^1.13.0",
"pg": "^8.23.1"
},
"devDependencies": {
"jszip": "^3.10.2"
}
}