669addf799
Build and Push Reader Image / docker (push) Failing after 22s
- Introduced a new batch import client for handling multiple EPUB files simultaneously. - Updated API routes for previewing and importing EPUB files, improving error handling and response management. - Enhanced genre management during import, allowing for dynamic creation and association of genres. - Implemented long-fetch handling to accommodate lengthy processing times for large EPUB files. - Refined UI components for better user experience in the import workflow.
1.6 KiB
1.6 KiB
Flows - Reader Web
Luon xem reader-api la canonical behavior.
Flow 1: Web Login and Session
- Trigger: user bam dang nhap Google.
- Preconditions: env OAuth hop le.
- Steps:
- User xac thuc Google qua NextAuth.
- Web co session cookie.
- Web goi endpoint user de hydrate profile/state.
- Success: user vao trang co tinh nang ca nhan hoa.
Flow 2: Browse -> Novel Detail -> Read Chapter
- Trigger: user click tu home/search/genre.
- Steps:
- Goi
/api/novels/browsehoac/api/novels/{idOrSlug}. - Goi
/api/truyen/{id}/chapterslay muc luc. - Doc chapter qua luong chapter hien co cua web.
- Goi
- Failure handling:
- 404: thong bao khong tim thay truyen/chuong.
- 5xx: retry UI + fallback message.
Flow 3: Bookmark and Progress Sync
- Trigger: user bookmark hoac chuyen chuong.
- Steps:
- Bookmark:
GET/POST/DELETE /api/user/bookmarks. - Progress:
POST /api/user/reading-progress. - UI cap nhat trang thai optimistic + reconcile API.
- Bookmark:
- Expected parity: cung nghia status voi mobile.
Flow 4: Comment / Rating / Recommendation
- Comment:
GET/POST /api/truyen/{id}/comments. - Rating:
POST /api/truyen/{id}/rate. - Recommendation:
/api/user/recommendations. - Error rules: follow
CONTRACT.md.
Flow 5: MOD EPUB Import Wizard
- Route:
/mod/import - Steps (khớp
app/mod/import/import-client.tsx):- Chọn thể loại / tạo thể loại qua
/api/mod/the-loai. - Upload EPUB để preview:
POST /api/import/uploads/preview(multipart). - Gợi ý metadata (tuỳ bước):
POST /api/mod/epub/ai-suggest. - Import/xử lý EPUB:
POST /api/mod/epub(multipart; có luồng preview và apply).
- Chọn thể loại / tạo thể loại qua