book-reader/AGENTS.md
Atte149 5f64f3d722 phase 0: fork Episteme, rename package to org.dueattendant149.bookreader
- Cloned from Aryan-Raj3112/episteme (AGPL-3.0)
- Package: com.aryan.reader → org.dueattendant149.bookreader
- Application ID: org.dueattendant149.bookreader
- Added AGENTS.md with migration plan
- Upstream: github.com/Aryan-Raj3112/episteme
- Origin: git.dueattendant149.org/Atte149/book-reader
2026-06-24 00:33:58 +03:00

76 lines
No EOL
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Book Reader — Episteme fork + bookshelf-api/ABS
> Форк `Aryan-Raj3112/episteme` под bookshelf-api + Audiobookshelf + Material You 3 (Myne-style UI).
## Stack
- **Язык:** Kotlin 100%
- **UI:** Jetpack Compose + Material3 (Myne-style: round cards, dynamic color, minimal)
- **DI:** Dagger Hilt
- **БД:** Room
- **Настройки:** DataStore
- **Сеть:** Retrofit + OkHttp + Kotlinx Serialization
- **Аудио:** ExoPlayer (Media3) + MediaSession
- **Фоновые задачи:** WorkManager
- **Читалка:** Episteme paginatedreader (CSS-движок, ContentBlock/Page модель)
- **Форматы:** EPUB, FB2, PDF, MOBI/AZW3, DOCX, ODT, TXT, Markdown, HTML, comics
- **minSdk:** 26 (Episteme default)
- **compileSdk/targetSdk:** 36
## Origin
- **upstream:** `https://github.com/Aryan-Raj3112/episteme.git` (AGPL-3.0)
- **origin:** `https://git.dueattendant149.org/Atte149/book-reader.git` (Forgejo)
- **Лицензия:** AGPL-3.0 (наследуется от Episteme)
## Goal
- Взять зрелый reader engine из Episteme (пагинация, все форматы, TTS, annotations)
- Redesign UI под Myne-стиль (Material You 3, round cards, dynamic color)
- Заменить backend (OPDS/Gutenberg/LocalFolder) на bookshelf-api + ABS
- Добавить фичи из Book's Story: audio player, RSVP, Librarr search, TTS jobs, cache, progress sync, upload
## Layout
- `app/src/main/` — Android app (после KMP→Android упрощения)
- `app/src/oss/` — OSS flavor (без проприетарных ML Kit/cloud)
- `app/src/releaseOffline/` — offline-only flavor
- ~~`desktopApp/`~~ — удалён (Android-only)
- ~~`shared/`~~ — слит в `app/src/main/` (после Этапа 1)
## Backend
- **bookshelf-api:** `https://books.dueattendant149.org/api/v1/*`
- `GET /api/v1/books/libraries`
- `GET /api/v1/books/{item_id}`
- `GET /api/v1/books/library/{id}/items`
- `POST /api/v1/search`
- `POST /api/v1/tts`, `GET /api/v1/tts/{job_id}`
- `POST /api/v1/download`, `GET /api/v1/download/list`
- **Audiobookshelf (напрямую):**
- `GET /api/items/{id}/file/{ino}`
- `GET /api/items/{id}/cover`
- `GET /api/items/{id}/download`
## WARNs
- **Не пушить в `upstream` (Aryan-Raj3112/episteme).** Только в `origin` (Forgejo).
- **AGPL-3.0** — если публикуем, исходный код должен быть открыт (включая server-side modifications если есть network use).
- **`pro` flavor** содержит проприетарные компоненты (ML Kit OCR, cloud sync) — не использовать, только `oss`.
- **Секреты** (ABS token, API keys) — только в `.env` / DataStore, никогда в коде.
## Build
```bash
./gradlew :app:assembleOssDebug
```
## Status
- Phase 0: clone + package rename — completed
- Phase 1: KMP → Android-only — pending
- Phase 2: backend swap (bookshelf-api + ABS) — pending
- Phase 3: UI redesign (Myne-style) — pending
- Phase 4: features from Book's Story (audio/RSVP/search/TTS/cache) — pending
- Phase 5: reader engine integration — pending
- Phase 6: build, test, deploy — pending