Notes Service
Component Detail
Service Layer
medium complexity
mobilebackend
1
Dependencies
2
Dependents
2
Entities
0
Integrations
Description
Business logic layer for the notes feature handling persistence, access control, and search index registration. Enforces row-level security so peer mentors can only read and write their own notes while coordinators can read notes from mentors within their local association. Communicates with the REST API backend via the shared REST API Client.
notes-service
Responsibilities
- Enforce row-level access control for note reads and writes
- Create, update, and soft-delete notes via REST API
- Register note content with the local FTS5 search index for offline search
- Map API responses to domain Note models
Interfaces
getNotesForContact(contactId)
getNoteById(noteId)
createNote(contactId, content)
updateNote(noteId, content)
deleteNote(noteId)
searchNotes(query)
syncPendingNotes()
Relationships
Related Data Entities (2)
Data entities managed by this component