← ClaudeAtlas

android-architecturelisted

Android app architecture per Google's guide: layers and dependency direction, Hilt, modularization, models per layer, naming. Use for project structure, where code belongs, module setup, or dependency injection, and when UI calls DAOs or APIs directly, features depend on each other's internals, or classes cannot be tested in isolation.
pablitoarango/android-skills · ★ 3 · AI & Automation · score 74
Install: claude install-skill pablitoarango/android-skills
# Android App Architecture Sources of truth: [Guide to App Architecture](https://developer.android.com/topic/architecture), [Architecture recommendations](https://developer.android.com/topic/architecture/recommendations), [Modularization patterns](https://developer.android.com/topic/modularization/patterns), [Hilt](https://developer.android.com/training/dependency-injection/hilt-android). Rules marked **(stricter than Google)** are deliberate choices that go beyond the guide; follow them too. Layer-specific detail lives in sibling skills: | Topic | Skill | |---|---| | ViewModels, UI state, UI events | `android-viewmodel` | | Composables, UI state holders, lifecycle effects | `compose-ui` | | Use cases | `android-domain-layer` | | Repositories, data sources, offline-first | `android-data-layer` | | Coroutines and Flow | `android-coroutines` | | Navigation | `compose-navigation` | | Tests | `android-testing` | ## 1. Principles - **Separation of concerns**: every class, module and layer has one clearly defined responsibility. Activities and composables display state and forward user actions; they hold no business logic. - **Drive UI from data models**, preferably persistent ones, so the app survives process death and poor connectivity. - **Single source of truth (SSOT)**: every data type has one owner. The owner exposes it as an immutable type and exposes functions to change it. - **Unidirectional data flow (UDF)**: state flows down (data sources → repositories → ViewModel