What problem does it solve?
This Skill defines and installs a robust data-layer strategy for the Loto Generator app, focusing on offline-first persistence, data synchronization, and clean separation between data sources and domain logic.
Core Features & Use Cases
- Offline-first persistence: Local Room database seeded with initial data and kept in sync with remote sources.
- Repository pattern: Repositories combine local caches and remote services, transforming DTOs to domain models without enforcing business rules.
- Background synchronization: WorkManager tasks schedule periodic and on-demand data sync with robust retry and migrations.
- Data integrity and migrations: Safe migrations and legacy data handling to preserve user data.
Quick Start
Initialize an offline-first data layer with Room for local data, Retrofit for network, and a WorkManager-based sync. Seed the database on first launch and start a one-shot sync to pull remote data and map it to domain models.