Solution
Leverage the cloud provider's offline-first database service to store data locally and synchronize with the cloud and across devices. Calculate user-specific materialized views, as discussed in the CQRS pattern, and synchronize the views to the device. This allows users to always access the latest known information. Store user actions and inputs locally and synchronize to the cloud when connected. This allows users to proceed with their intentions even when disconnected. The application should synchronize on explicit actions when possible, but otherwise synchronize in the background when connectivity is intermittent. The user experience should be designed such that the user understands when data may be stale or when actions may be pending because of limited connectivity, and informed when connectivity issues are resolved. On the backend, the system leverages Database-First Event Sourcing when synchronization occurs, to produce events based on state changes and user actions.