Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Build a multi-screen app that fetches data from a REST API and caches it locally. Use MVVM: a ViewModel exposes UI state via StateFlow; a REPOSITORY is the single source of truth mediating a Retrofit API (suspend functions on Dispatchers.IO) and a Room database (offline cache), observed as a Flow. Handle loading/success/error states in the UI, never block the main thread, and navigate between a list and a detail screen (Navigation component). Add a couple of unit tests for the ViewModel with a fake repository.
Clean MVVM: ViewModel holds UI state (StateFlow), repository is the single source of truth; unidirectional data flow; logic out of the UI.
Retrofit + Room wired correctly; coroutines on the right dispatchers (no main-thread blocking/ANR); Room observed as Flow for offline cache.
Loading/success/error handled in the UI; list->detail navigation with the Navigation component.
ViewModel unit-tested with a fake repository and a test dispatcher; tests pass.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# An MVVM app with Room, networking, and coroutines ## Goal Build a multi-screen app that fetches data from a REST API and caches it locally. Use MVVM: a ViewModel exposes UI state via StateFlow; a REPOSITORY is the single source of truth mediating a Retrofit API (suspend functions on Dispatchers.IO) and a Room database (offline cache), observed as a Flow. Handle loading/success/error states in the UI, never block the main thread, and navigate between a list and a detail screen (Navigation component). Add a couple of unit tests for the ViewModel with a fake repository. ## Acceptance criteria - [ ] Architecture: Clean MVVM: ViewModel holds UI state (StateFlow), repository is the single source of truth; unidirectional data flow; logic out of the UI. - [ ] Data & async: Retrofit + Room wired correctly; coroutines on the right dispatchers (no main-thread blocking/ANR); Room observed as Flow for offline cache. - [ ] UX states & nav: Loading/success/error handled in the UI; list->detail navigation with the Navigation component. - [ ] Testing: ViewModel unit-tested with a fake repository and a test dispatcher; tests pass. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.