NoteRepository
Component Detail
Data Layer
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Data access layer for note records stored in the local Drift database. Handles all CRUD operations for notes and exposes query methods for filtering by contact, activity, or keyword. Coordinates with the offline sync layer to persist changes locally and propagate them to the remote backend when connectivity is restored.
note-repository
Sources & reasoning
Line 163 places Notater as NICE priority in Phase 2 (maps to v1.0), confirmed by all five organizations. Line 162 ties notes to basic search (Phase 1 MUST), making the list a natural Phase 2 complement. The area taxonomy at line 465 canonically names this feature Notes List. Target v1.0 derived from Phase 2 matrix position.
-
docs/source/likeperson.md ยท line 163| Notater | โ | โ | โ | โ | โ | NICE | 2 |
-
docs/source/likeperson.md ยท line 162| Basic search (contact og notater) | โ | โ | โ | โ | โ | MUST | 1 |
-
docs/source/likeperson.md ยท line 465| notes | Notes | Notes List, Note Editor |
Responsibilities
- Persist new and updated notes to the local Drift database
- Query notes by contact ID, activity ID, or full-text keyword search
- Delete notes locally and queue remote deletion for sync
- Expose a reactive stream of notes for real-time UI updates
- Manage conflict resolution when syncing locally modified notes with the backend
Interfaces
getNotes(filter: NoteFilter): Stream<List<Note>>
getNoteById(noteId: string): Note
saveNote(note: Note): void
deleteNote(noteId: string): void
searchNotes(query: string): List<Note>