Calendar Sync Service
Component Detail
Description
Integrates with the device calendar plugin (device_calendar) to write, update, and optionally delete calendar entries when activities or events are saved or edited in the app. Implements one-directional sync (app to device calendar) at v1.0, avoiding bi-directional conflict resolution complexity. Respects the module toggle gate - sync operations are no-ops when the feature is disabled for the tenant.
calendar-sync-service
Sources & reasoning
HLF's survey showing 40% peer mentor dissatisfaction with follow-up directly motivates surfacing activities in the device calendar. This service is the core integration layer - it owns all calendar write operations and enforces one-directional sync scope, preventing the complexity of bi-directional conflict resolution at v1.0.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Write a calendar entry to the device calendar when an activity or event is saved
- Update the corresponding calendar entry when an activity or event is edited
- Optionally delete the calendar entry when an activity or event is deleted
- Check module toggle state before performing any calendar operation
- Handle platform differences between iOS and Android calendar APIs via device_calendar plugin
Interfaces
syncActivityToCalendar(activityId: String): Future<CalendarSyncResult>
syncEventToCalendar(eventId: String): Future<CalendarSyncResult>
updateCalendarEntry(externalCalendarId: String, payload: CalendarEntryPayload): Future<void>
deleteCalendarEntry(externalCalendarId: String): Future<void>
isCalendarSyncEnabled(): bool
Relationships
Dependencies (3)
Components this component depends on