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

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.

Feature: Calendar Sync

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

Related Data Entities (1)

Data entities managed by this component