Calendar Sync Service
Component Detail
Service Layer
high complexity
mobile
2
Dependencies
1
Dependents
4
Entities
0
Integrations
Description
Core business logic service mediating between the device calendar API and the Meander REST API. Manages bidirectional synchronization, conflict resolution (Meander as source of truth), and sync scheduling. Coordinates with the Background Sync feature for periodic automatic synchronization.
calendar-sync-service
Responsibilities
- Orchestrate bidirectional sync between device calendar and Meander activities
- Resolve conflicts favoring Meander records as source of truth
- Track sync state to avoid redundant API calls
- Generate activity registration prompts from approaching calendar events
- Coordinate with background sync job scheduler for periodic execution
Interfaces
syncAll(): Future<SyncResult>
syncCalendar(calendarId: String): Future<SyncResult>
pushActivityToCalendar(activity: Activity): Future<void>
pullEventsFromCalendar(dateRange: DateRange): Future<List<CalendarEvent>>
resolveConflict(local: Activity, remote: CalendarEvent): ResolvedEntry
getSyncState(): SyncState
setSyncInterval(minutes: int): void
getUnmatchedCalendarEvents(): Future<List<CalendarEvent>>
linkEventToActivity(eventId: String, activityId: String): Future<void>
disconnectCalendar(calendarId: String): Future<void>
connectGoogleCalendar(oauthToken: String): Future<void>
Relationships
Dependencies (2)
Components this component depends on
Related Data Entities (4)
Data entities managed by this component