Service Layer high complexity mobile
2
Dependencies
0
Dependents
7
Entities
0
Integrations

Description

Core service that orchestrates offline data operations, managing the transition between online and offline modes. It coordinates data source selection by routing reads to the local store first and falling through to the API when connectivity is available, abstracting the offline/online distinction from the rest of the application.

Feature: Offline Data Support

offline-manager

Responsibilities

  • Monitor network connectivity state and broadcast changes
  • Route data reads to local store or remote API based on connectivity
  • Coordinate initial data seeding at login for contacts, activity types, and organization settings
  • Manage offline mode activation and deactivation transitions
  • Provide offline-aware repository abstractions to consuming features

Interfaces

isOnline()
getConnectivityStream()
seedLocalData(userId)
getRepository<T>(entityType)
switchToOfflineMode()
switchToOnlineMode()
getOfflineStatus()
clearLocalData()
getLastSyncTimestamp()
registerOfflineCapableEntity(entityType, config)

Relationships

Dependencies (2)

Components this component depends on