Analysis updated 2026-07-03
Use this project as a starting point for a new Android app already structured with Clean Architecture layers.
Study how the four modules (UI, Presentation, Domain, Data) communicate without directly depending on each other.
See how to write fully isolated unit tests for the Presentation and Domain layers without needing an Android device.
Learn how RxJava and Dagger work together in a real Android project by reading the sample implementation.
| bufferapp/android-clean-architecture-boilerplate | element-hq/element-android | gradle/kotlin-dsl-samples | |
|---|---|---|---|
| Stars | 3,686 | 3,685 | 3,687 |
| Language | Kotlin | Kotlin | Kotlin |
| Setup difficulty | moderate | hard | easy |
| Complexity | 3/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Android SDK with API level 26 and JDK 1.8, open in Android Studio and sync Gradle to get started.
This is a starter project for Android apps created by the team at Buffer, the social media scheduling company. It is written entirely in Kotlin and demonstrates a way of structuring an Android app called Clean Architecture, where the code is split into distinct layers that each have a specific job and do not depend directly on each other. The project is divided into four modules. The User Interface module handles what the user sees on screen and receives data passed down from the layer above it. The Presentation module sits above the UI and controls what the UI should display, but has no knowledge of Android itself, making it testable in isolation. The Domain module holds the application's business rules, meaning the actual actions the app performs, expressed as use cases. The Data module handles fetching information, whether from a remote API or a local cache, and feeds it upward through the stack. Each layer has its own version of the data models, and mappers translate between them as data moves up or down. The sample app built on this structure displays a list of Buffer team members fetched from a remote source. It is intentionally simple so the architecture patterns are easy to follow without the distraction of complex application logic. The libraries used include RxJava for handling asynchronous data streams, Dagger for dependency injection (a way of automatically supplying objects where they are needed), Retrofit and OkHttp for network requests, Glide for loading images, and Gson for parsing JSON. Testing uses Mockito for unit tests, Espresso for UI tests, and Robolectric for running Android tests on a regular machine without a device. The README notes that Clean Architecture adds more structure than a small sample strictly needs, and acknowledges it will not be the right fit for every project. It was created to show the approach in a clear, minimal form and to serve as a starting point for future projects. The project requires Android SDK with API level 26 and JDK 1.8.
A Kotlin Android starter project from Buffer that shows Clean Architecture in action, four separate layers (UI, Presentation, Domain, Data) that never depend directly on each other.
Mainly Kotlin. The stack also includes Kotlin, RxJava, Dagger.
Apache 2.0, use freely for any purpose including commercial, just keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.