MVVMTemplate
An Android Template with MVVM and Clean Architecture - including a Compose version(default branch)
Install / Use
/learn @Drjacky/MVVMTemplateREADME
MVVMTemplate 🧞
<!-- [](https://snyk.io/test/github/Drjacky/MVVMTemplate) Snyk doesn't support kotlin dsl --> <p align="center"> <img width="300px" src="https://raw.githubusercontent.com/Drjacky/MVVMTemplate/master/gif/logo.svg" /> </p>A simple Android template that lets you create an Android project quickly.
How to use 👣
Just click
on
button to create a new repo starting from this template.
Or, for a basic/starter version of the same architecture, use BasicComposeActivityPlugin plugin.
Architecture 🏗
This project follows Clean Architecture with MVVM and is organized into a multi-module structure:
MVVMTemplate/
├── app/ # Application module (MainActivity, Navigation, DI wiring)
├── build-logic/ # Convention plugins (shared build configuration)
├── core/
│ ├── common/ # Shared base classes, utilities, DataStore
│ ├── data/ # Repository implementations, data sources, API models
│ ├── domain/ # Use cases, domain models, repository interfaces
│ ├── network/ # Retrofit setup, OkHttp configuration, network response handling
│ ├── testing/ # Shared test utilities (TestDispatcherRule, fakes, test data)
│ └── ui/ # Shared Compose UI components, theming, screen states
└── feature/
└── products/ # Products feature (list, detail, choose screens)
The app demonstrates both RxJava and Coroutines side by side - users choose which reactive approach to explore at runtime via a choose screen.
Features 🕹
Core
- 100% Kotlin
- 100% Jetpack Compose with Material 3 and Material You dynamic color
- Multi-module architecture with convention plugins
- Version Catalog (
libs.versions.toml) for centralized dependency management - KSP for annotation processing
Reactive & Concurrency
- Coroutines & Flow
with
StateFlowfor UI state - RxJava 3
Dependency Injection
- Hilt with KSP
Networking & Serialization
- Retrofit 3 - HTTP client
- OkHttp - Network interceptor
- kotlinx-serialization - JSON serialization
- Custom
NetworkResponsesealed class for structured API response handling
Navigation
- Navigation 3 - Type-safe Compose
navigation with
NavKeyandNavDisplay
UI & Theming
- Material 3 with dynamic color, light/dark theme, edge-to-edge support
- Lottie - Vector animations
- Coil - Image loading
- Palette - Dynamic card coloring from image palettes
- Paging 3 - Pagination (both Coroutine and RxJava data sources)
- Compose stability configuration (
compose_compiler_config.conf) and compiler metrics/reports
Data
- DataStore - Preferences storage
Quality & Tooling
- Detekt with Compose rules - Static code analysis
- StrictMode - Runtime guardrails (
detectAll()thread policy, leaked object detection) - LeakCanary - Memory leak detection
- Chucker - HTTP inspector
- Timber - Logging
- Gradle Doctor - Build health
- Dependency Analysis - Dependency insights
- Sonatype Scan - Dependency security scanning
Testing
- Unit tests with Fakes over Mocks pattern
- Truth - Fluent assertions
- Turbine - Flow testing
- Coroutines Test -
TestDispatcherRulefor deterministic coroutine testing - Shared
core:testingmodule with reusable fakes and test data
Accessibility & Internationalization
- Semantic properties for TalkBack (
mergeDescendants,heading,contentDescription) - Touch target sizing (48dp minimum)
- String resources with translator context comments
- Non-transitive R classes for proper resource scoping
CI 🏭
This template uses GitHub Actions as CI.
Available workflows:
- Validate Gradle Wrapper - Checks the Gradle wrapper has a valid checksum
- Pre Merge Checks - Runs
buildandtestDebugUnitTesttasks - Android - Runs
assembleDebugtask
Tasks 🔧
dependencyUpdates- Displays the dependency updates for the projectdetekt- Runs static Kotlin code analysis for the whole projectbuildHealth- Provides advice for managing dependencies and applied pluginsossIndexAudit- Scans dependencies using Sonatype OSS Index for known vulnerabilities
References 🧷
- Rick and Morty API
- Right or Left animation by Marco Martina on LottieFiles
- Loading Beer animation by Hashim Irfan on LottieFiles
Contributing 🤝
Feel free to open an issue or submit a pull request for any bugs/improvements.
Result 📺
<img src="https://raw.githubusercontent.com/Drjacky/MVVMTemplate/feature/compose/gif/compose.gif" />License ⚖️
Related Skills
node-connect
335.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
335.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.5kCommit, push, and open a PR
