Workshop Notes Repository
Component Detail
Description
Drift DAO for the workshop_notes table providing typed queries scoped by workshop_id. Handles local offline persistence via the SQLCipher-encrypted Drift database and enqueues mutations to the outbox for background server synchronisation. Tracks created_at and updated_at for conflict resolution.
workshop-notes-repository
Sources & reasoning
Workshop notes are stored in a dedicated workshop_notes table (workshop_id, author_id, content, created_at, updated_at). A Drift DAO encapsulates all database access and mutation outbox enqueuing, keeping the service layer free of persistence details and enabling offline-first operation.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Persist workshop notes to the local Drift database using the workshop_notes schema
- Query notes filtered by workshop_id with author and timestamp metadata
- Enqueue insert and update mutations to the outbox for server sync
- Support updated_at tracking to enable conflict resolution during sync
Interfaces
insertNote(workshopId: String, authorId: String, content: String) → Future<String>
watchNotesByWorkshop(workshopId: String) → Stream<List<WorkshopNote>>
updateNote(noteId: String, content: String, updatedAt: DateTime) → Future<void>
deleteNote(noteId: String) → Future<void>
Relationships
Dependents (2)
Components that depend on this component