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

Description

Business logic layer responsible for persisting, retrieving, and updating notes in the local offline-first store. Coordinates with the offline data support layer to queue sync operations and resolves linking relationships between notes and contacts or activities. Exposes a clean async API consumed by NoteEditorScreen and the notes list feature.

Feature: Note Editor

note-service

Sources & reasoning

Line 163 establishes Notes as Phase 2 (v1.0) NICE for all orgs. Line 88 explicitly scopes speech-to-text to post-session writing, which the note editor satisfies alongside the activity wizard. The area taxonomy at line 465 names Note Editor as the second feature in the Notes area. Target v1.0 derived from Phase 2 matrix position; no evidence of an earlier or later phase.

  • docs/source/likeperson.md · line 163
    | Notater | ✓ | ✓ | ✓ | ✓ | ✓ | NICE | 2 |
  • docs/source/likeperson.md · line 88
    tale-til-tekst er for etterpå, ved rapportskriving
  • docs/source/likeperson.md · line 465
    | notes | Notes | Notes List, Note Editor |

Responsibilities

  • Create, read, update, and delete note records in the local SQLite/offline store
  • Attach or detach contact and activity references on a note record
  • Queue outbound sync operations when network is unavailable and resolve conflicts on reconnect
  • Validate note content and enforce length or format constraints before persistence
  • Emit change events so the notes list view can reactively refresh without full reload

Interfaces

createNote(content: string, links?: NoteLinks): Promise<Note>
updateNote(noteId: string, content: string, links?: NoteLinks): Promise<Note>
deleteNote(noteId: string): Promise<void>
getNoteById(noteId: string): Promise<Note>
syncPendingNotes(): Promise<SyncResult>

Related Data Entities (1)

Data entities managed by this component