Skip to content

Migration Status - Quick Summary

✅ Completed (Working)

Backend

  • ✅ FastAPI with all endpoints
  • ✅ SQLite storage
  • ✅ EPUB file serving
  • ✅ Logging middleware

Frontend Services

  • apiClient.ts - HTTP client
  • bookApiService.ts - Book operations
  • annotationApiService.ts - Annotation operations
  • settingsApiService.ts - Settings operations
  • epubService.ts - EPUB loading (uses API)
  • annotationService.ts - Wrapper (uses API)
  • logger.ts & diagnostics.ts - Debugging tools

Components

  • BookGrid.tsx - Library view
  • BookCard.tsx - Book display
  • ImportButton.tsx - Book import
  • BookViewer.tsx - Book reading (partially - needs field name fixes)

Types

  • ✅ Shared types in /types/index.ts

🚧 In Progress

BookViewer Field Names

Need to update all references from camelCase to snake_case: - cfiRangecfi_range - noteContentnote_content - bookIdbook_id (in some places)

This affects: - Highlight rendering - Note operations - Chat context operations - Context menu interactions

⏳ Remaining

Components Still Using Old Types

  1. ReaderSettings.tsx - Uses old db
  2. ChatOverlay.tsx - Uses old db
  3. chatService.ts - Uses old db for settings
  4. Various annotation components - Need type updates

Cleanup

  1. Remove lib/db.ts
  2. Remove dexie and dexie-react-hooks from package.json
  3. Remove old crypto utilities

🎯 Next Steps

  1. Fix BookViewer field names (10 min)
  2. Replace .cfiRange with .cfi_range
  3. Replace .noteContent with .note_content

  4. Migrate ReaderSettings (5 min)

  5. Use settingsApiService

  6. Update remaining components (15 min)

  7. Fix type imports
  8. Update field names

  9. Test everything (20 min)

  10. Import book
  11. Read book
  12. Create annotations
  13. Test settings

  14. Cleanup (10 min)

  15. Remove old files
  16. Update package.json

Total remaining: ~1 hour

Current Blockers

None! Just need to do the field name replacements in BookViewer.