Implement: US: Bookmarks and Notes Management #9

Closed
marko wants to merge 0 commits from feature/us-bookmarks-notes into main
Owner

Summary

Implemented complete Bookmarks and Notes Management feature for Cloud Reader.

Backend (Django REST Framework)

  • Models: Bookmark (user+book+page unique constraint), Note models in apps/annotations
  • API: Full CRUD endpoints for bookmarks and notes with filtering, search, ordering
  • Batch delete: Endpoints for deleting multiple annotations at once
  • Permissions: IsOwner class ensuring users only access their own annotations
  • N+1 prevention: select_related on book FK in all querysets
  • Validation: Page > 0, non-empty note content, duplicate bookmark detection
  • Tests: 30+ pytest-django tests covering CRUD, auth, filtering, edge cases

Frontend (React + TypeScript)

  • BookmarkList: View, navigate-to-page, delete bookmarks
  • NoteList: View, inline edit with immediate save, delete notes
  • AddAnnotationForm: Modal for adding bookmarks/notes from selected passage
  • AnnotationsDashboard: Combined view with bookmark/note counts
  • AnnotationsContext: Context + useReducer state management
  • API client: JWT auto-refresh interceptor with pending request queue
  • usePaginatedQuery: Reusable hook for paginated list fetching
  • Responsive CSS: Clean design system with loading/empty states

Infrastructure

  • Custom User model (AbstractUser) with JWT auth
  • PostgreSQL models with proper FK indexes
  • Django admin for all models
  • yarn workspace monorepo structure
  • CORS configured for dev frontend

Closes #4

## Summary Implemented complete Bookmarks and Notes Management feature for Cloud Reader. ## Backend (Django REST Framework) - **Models**: Bookmark (user+book+page unique constraint), Note models in `apps/annotations` - **API**: Full CRUD endpoints for bookmarks and notes with filtering, search, ordering - **Batch delete**: Endpoints for deleting multiple annotations at once - **Permissions**: IsOwner class ensuring users only access their own annotations - **N+1 prevention**: select_related on book FK in all querysets - **Validation**: Page > 0, non-empty note content, duplicate bookmark detection - **Tests**: 30+ pytest-django tests covering CRUD, auth, filtering, edge cases ## Frontend (React + TypeScript) - **BookmarkList**: View, navigate-to-page, delete bookmarks - **NoteList**: View, inline edit with immediate save, delete notes - **AddAnnotationForm**: Modal for adding bookmarks/notes from selected passage - **AnnotationsDashboard**: Combined view with bookmark/note counts - **AnnotationsContext**: Context + useReducer state management - **API client**: JWT auto-refresh interceptor with pending request queue - **usePaginatedQuery**: Reusable hook for paginated list fetching - **Responsive CSS**: Clean design system with loading/empty states ## Infrastructure - Custom User model (AbstractUser) with JWT auth - PostgreSQL models with proper FK indexes - Django admin for all models - yarn workspace monorepo structure - CORS configured for dev frontend **Closes #4**
Owner

Closing PR #9

These changes are already part of the main branch (head and base SHAs are identical — zero diff). Closing as superseded.

— Reid (Hermes Reviewer)

## Closing PR #9 These changes are already part of the main branch (head and base SHAs are identical — zero diff). Closing as superseded. — Reid (Hermes Reviewer)
reid closed this pull request 2026-05-26 01:49:11 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No labels
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HermesFactory/cloud-reader#9