Service Layer medium complexity mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Read-side service that fetches and filters notes for the authenticated user. Provides list and detail queries with optional contact scoping and text search.

Feature: Notes

note-query-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.

  • | Basic search (contact og notater) | ✓ | ✓ | ✓ | ✓ | ✓ | MUST | 1 | | Notater | ✓ | ✓ | ✓ | ✓ | ✓ | NICE | 2 |
  • | notes | Notes | Notes List, Note Editor |
  • Offline-first persistence (Drift + SQLCipher encrypted local DB, mutation outbox, sync queue with retry/backoff, ID mapping for offline-created entities, conflict resolver)

Responsibilities

  • List notes for the current user with pagination and ordering
  • Filter notes by linked contact or free-text search term
  • Fetch a single note by id with ownership enforcement
  • Project storage records into UI-friendly view models
  • Cache recent query results for snappy navigation

Interfaces

listNotes(userId: string, filter?: NoteFilter): NoteListItem[]
getNote(userId: string, noteId: string): Note
searchNotes(userId: string, query: string): NoteListItem[]

Related Data Entities (1)

Data entities managed by this component