NotesService
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Business-logic layer that mediates between NotesListScreen and NotesRepository. It applies user-scoping, handles search filtering, and coordinates offline-aware read operations. Returns typed note collections ready for direct rendering.
notes-service
Sources & reasoning
The priority matrix explicitly lists Notes as needed by all five organizations (all checkmarks), classified NICE, Phase 2. Phase 2 maps to v1.0 by the ordinal rule. The Notes List is the entry screen without which the Note Editor is unreachable, making it a prerequisite for the entire area.
-
docs/source/likeperson.md ยท line 163Notater | โ | โ | โ | โ | โ | NICE | 2
Responsibilities
- Fetch all notes for the authenticated user from NotesRepository
- Filter notes by a search query string, matching against title and body content
- Enforce user-scoping so notes from other users are never returned
- Expose observable or async streams so the UI reacts to cache updates when offline data syncs
- Handle errors from the repository layer and translate them into user-facing messages
Interfaces
getNotes(userId: string): Promise<Note[]>
searchNotes(userId: string, query: string): Promise<Note[]>
subscribeToNotes(userId: string, callback: (notes: Note[]) => void): Unsubscribe