docs: add Phase 0 prerequisites section to reader implementation plan
Add comprehensive setup and verification guide to ensure all
dependencies and database schema are in place before beginning
reader implementation.
## Phase 0: Prerequisites & Setup (NEW)
### 0.1 Database Schema Setup
- References Section 2.1 for actual SQL (no duplication)
- Clear step-by-step instructions for schema.sql modifications
- Instructions for both database recreation and manual migration
- sqlc generate commands for Go code regeneration
### 0.2 Database Queries Setup
- 12 new SQL queries for reader functionality:
* Panel data: GetPanelData, UpsertPanelData
* Reading speed: GetReadingSpeed, CreateReadingSpeed, UpdateReadingSpeed
* Dictionary: GetDictionaryEntry, CreateDictionaryEntry, UpdateDictionaryAccessed
* Settings: GetReaderSettings, UpsertReaderSettings
* Bookmarks: GetMediaBookmarks, CreateMediaBookmark, DeleteMediaBookmark, UpdateMediaBookmark
### 0.3 Frontend Dependencies
- jszip@^3.10.1 for EPUB/comic archive parsing
- pdfjs-dist@^3.11.174 for PDF rendering
- npm install instructions
### 0.4 Directory Structure
- web/src/reader/{ebook,comic,manga,pdf}/
- web/static/fonts/ for reading fonts
- bruno/reader/ for API tests
### 0.5 Pre-Implementation Checklist
- 10-item verification checklist
- Database schema and queries
- Frontend dependencies
- Directory creation
- Go compilation verification
### 0.6 Verification Commands
- Database table existence check
- Query generation verification
- Frontend dependency verification
- Go build verification
- Directory structure verification
### 0.7 Troubleshooting
- Common setup problems and solutions
- sqlc generate failures
- Database table issues
- npm install problems
- Go compilation errors
## Rationale
This prevents developers from starting implementation without
the necessary foundation, which would result in:
- Compilation errors from missing database queries
- Runtime errors from missing database tables
- Frontend build errors from missing dependencies
- Lost time from having to stop and fix prerequisites
By completing Phase 0 first, implementation proceeds smoothly
with all infrastructure in place.
## File Changes
- READER_IMPLEMENTATION_PLAN.md: +415 lines (Phase 0 section)
Total: 1 file changed, 415 insertions(+)
This commit is contained in:
+2681
-79
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user