Note Service
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Write-side service that handles creation, update, and deletion of notes. Enforces ownership, validation, and links to contacts before persisting through the Note Store.
note-service
Sources & reasoning
Blueprint explicitly merges notes-list + note-editor into a single 'Notes' feature under the Notes area. Matrix rows in §4 mark notes and basic search across notes as universal needs. Target_release set to 'Core Product' since §4 places Notes in Phase 2 (NICE) and the area is not in the MVP always-on set in §5.
-
docs/source/likeperson.md · line 112-113| Basic search (contact og notater) | ✓ | ✓ | ✓ | ✓ | ✓ | MUST | 1 | | Notater | ✓ | ✓ | ✓ | ✓ | ✓ | NICE | 2 |
-
docs/source/likeperson.md · line 354| notes | Notes | Notes List, Note Editor |
-
docs/source/likeperson.md · line 227-228Offline-first persistence (Drift + SQLCipher encrypted local DB, mutation outbox, sync queue with retry/backoff, ID mapping for offline-created entities, conflict resolver)
Responsibilities
- Create a new note tied to the authenticated user and optional contact
- Update the content or contact link of an existing note
- Delete a note after verifying ownership
- Validate note payloads (non-empty content, valid contact reference)
- Emit change events so list views can refresh
Interfaces
createNote(userId: string, draft: NoteDraft): Note
updateNote(userId: string, noteId: string, draft: NoteDraft): Note
deleteNote(userId: string, noteId: string): void