Files
eng-pad/PROJECT_PLAN.md
Kyle Isom 47778222b7 Add project documentation: design spec, implementation plan, and progress tracking
Initial project setup with README, CLAUDE.md (AI dev context), DESIGN.md
(full technical design covering architecture, data model, coordinate system,
rendering strategy), PROJECT_PLAN.md (phased implementation steps), and
PROGRESS.md (completion tracking).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:42:44 -07:00

121 lines
4.8 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.
# PROJECT_PLAN.md — eng-pad Implementation Steps
This file tracks all implementation steps. Check off steps as they are
completed and log them in PROGRESS.md.
## Phase 0: Project Documents
- [x] 0.1: Create DESIGN.md
- [x] 0.2: Create PROJECT_PLAN.md (this file)
- [x] 0.3: Create PROGRESS.md
- [x] 0.4: Update CLAUDE.md with build commands and source tree
## Phase 1: Project Skeleton + Data Layer
- [ ] 1.1: Generate Android project with Gradle
- `build.gradle.kts` (root), `app/build.gradle.kts`, `settings.gradle.kts`
- Kotlin, Compose, Room KSP, minSdk 30, targetSdk 34
- [ ] 1.2: Configure `gradle/libs.versions.toml` version catalog
- Compose BOM, Room, Navigation, Lifecycle, Coroutines
- [ ] 1.3: Configure linting (`app/build.gradle.kts` Android Lint config)
- [ ] 1.4: Define Room entities
- `data/model/Notebook.kt`, `Page.kt`, `Stroke.kt`, `PageSize.kt`
- [ ] 1.5: Implement type converters
- `data/db/Converters.kt``FloatArray``ByteArray`, `PageSize``String`
- [ ] 1.6: Define DAOs
- `data/db/NotebookDao.kt`, `PageDao.kt`, `StrokeDao.kt`
- [ ] 1.7: Define Room database
- `data/db/EngPadDatabase.kt`
- [ ] 1.8: Implement repositories
- `data/repository/NotebookRepository.kt`, `PageRepository.kt`
- [ ] 1.9: Unit tests
- `test/.../data/StrokeBlobTest.kt` — blob roundtrip
- `test/.../data/RepositoryTest.kt` — CRUD, cascade delete
- **Verify:** `./gradlew build && ./gradlew test && ./gradlew lint`
## Phase 2: Notebook List Screen
- [ ] 2.1: Set up `MainActivity` with Compose and `NavHost`
- `MainActivity.kt`, `ui/navigation/NavGraph.kt`, `ui/theme/Theme.kt`
- [ ] 2.2: Implement `NotebookListViewModel`
- `ui/notebooks/NotebookListViewModel.kt`
- [ ] 2.3: Implement `NotebookListScreen`
- `ui/notebooks/NotebookListScreen.kt` — list, create dialog, delete
- [ ] 2.4: Auto-create page 1 on notebook creation
- In `NotebookRepository` or ViewModel
- [ ] 2.5: Navigation: tap notebook → page list (stub screen)
- **Verify:** `./gradlew build && ./gradlew test`
## Phase 3: Canvas — Basic Drawing
- [ ] 3.1: Implement `PadCanvasView` — stylus event handling
- `ui/editor/PadCanvasView.kt``onTouchEvent`, `getHistoricalX/Y`
- [ ] 3.2: Stroke rendering — `Path`/`Paint`, backing bitmap
- [ ] 3.3: Grid drawing — 14.4pt spacing, toggleable
- [ ] 3.4: Coordinate transform — canonical ↔ screen via `Matrix`
- [ ] 3.5: Implement `CanvasState`
- `ui/editor/CanvasState.kt` — zoom, pan, active tool
- [ ] 3.6: Implement `EditorViewModel`
- `ui/editor/EditorViewModel.kt` — load/save strokes from Room
- [ ] 3.7: Implement `EditorScreen` + toolbar
- `ui/editor/EditorScreen.kt`, `ui/editor/Toolbar.kt`
- [ ] 3.8: Wire navigation from notebook/page list to editor
- **Verify:** `./gradlew build && ./gradlew test` + manual on-device test
## Phase 4: Zoom and Pan
- [ ] 4.1: `ScaleGestureDetector` for pinch-to-zoom (0.5×4×)
- [ ] 4.2: Finger drag for pan with bounds clamping
- [ ] 4.3: Input routing — stylus → draw, finger → zoom/pan
- **Verify:** manual on-device test
## Phase 5: Eraser
- [ ] 5.1: Eraser mode in `CanvasState`
- [ ] 5.2: Hit testing — bounding box pre-filter + point distance
- [ ] 5.3: Stroke deletion + backing bitmap rebuild
- **Verify:** `./gradlew test` + manual test
## Phase 6: Undo/Redo
- [ ] 6.1: `UndoableAction` interface + concrete actions
- `undo/UndoableAction.kt`
- [ ] 6.2: `UndoManager` — undo/redo stacks, depth 50
- `undo/UndoManager.kt`
- [ ] 6.3: Integrate with `EditorViewModel` + toolbar
- [ ] 6.4: Unit tests — `test/.../undo/UndoManagerTest.kt`
- **Verify:** `./gradlew test` + manual test
## Phase 7: Selection — Move, Copy, Delete
- [ ] 7.1: Selection mode — rectangle selection
- [ ] 7.2: Visual feedback — highlight, bounding box
- [ ] 7.3: Operations — delete, drag-to-move, copy/paste
- [ ] 7.4: Undo integration for all selection operations
- **Verify:** `./gradlew test` + manual test
## Phase 8: Multi-Page Navigation
- [ ] 8.1: `PageListScreen` with thumbnails
- `ui/pages/PageListScreen.kt`, `PageListViewModel.kt`
- [ ] 8.2: Add new page button
- [ ] 8.3: Prev/next page navigation in editor + auto-save
- **Verify:** manual test
## Phase 9: PDF Export
- [ ] 9.1: `PdfExporter` — Android `PdfDocument` API
- `ui/export/PdfExporter.kt`
- [ ] 9.2: Share via `Intent.ACTION_SEND` + `FileProvider`
- `res/xml/file_provider_paths.xml`, `AndroidManifest.xml` updates
- [ ] 9.3: Export button in toolbar (per-page + whole notebook)
- [ ] 9.4: Unit test — verify PDF generation
- **Verify:** `./gradlew test` + open exported PDF, confirm no grid
## Phase 10: Polish
- [ ] 10.1: E-ink optimizations — minimize animations, high contrast
- [ ] 10.2: Auto-save zoom/pan state per page
- [ ] 10.3: Empty states, error handling, delete confirmations
- [ ] 10.4: Performance profiling on target devices