Workshop Service
Component Detail
Service Layer
medium complexity
mobile
1
Dependencies
3
Dependents
1
Entities
0
Integrations
Description
Handles all business logic for workshop CRUD operations, module-toggle awareness, and synchronisation with the Drift/SQLCipher offline store via the mutation outbox. Exposes a Riverpod StreamProvider for the dashboard and processes coordinator-scoped queries filtered by organization.
workshop-service
Sources & reasoning
WorkshopService centralises all data-access logic for the feature, provides the StreamProvider consumed by the dashboard, and ensures mutations flow through the offline outbox as specified in the implementation notes.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Create, read, update, and delete workshop records via REST API
- Expose Riverpod StreamProvider returning workshops scoped to current user's organization
- Write mutations to the offline outbox for sync when connectivity is restored
- Enforce module-toggle gate: return empty state when mentor-program module is disabled
Interfaces
getWorkshops(orgId: String) → Stream<List<Workshop>>
createWorkshop(draft: WorkshopDraft) → Future<Workshop>
updateWorkshop(id: String, patch: WorkshopPatch) → Future<Workshop>
deleteWorkshop(id: String) → Future<void>
getWorkshopById(id: String) → Future<Workshop>
Relationships
Dependents (3)
Components that depend on this component