MVI-Clean-Architecture
This is a sample app & basic code that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach.
The trick of the project is to demonstrate best practices, provide a set of guidelines, and present modern Android Application Architecture that is modular, scalable, maintainable and testable, suitable for bigger teams and long application lifecycle management.
Because it is an architectural project, UI has been kept simple. Sample data has been provided from Weather API
Flow
This app uses MVI (Model View Intent) architecture.
Modules
Modules are the collection of source files and build settings that allow you to divide your project into discrete units of functionality.
-
App Module
:app
module is an com.android.application, which is needed to create the app bundle. It contains dependency graph and UI related classes. It presents data to screen and handle user interactions. -
Base Module
:base
module contains only framework related base classes that is used in other modules -
Common Module
:common
module contains code and resources which are shared between other modules -
Data Module
:data
module contains implementation of repository and local - remote repository interface adapt -
Domain Module
:domain
module contains use cases and repository interface adapt -
Local Module
:local
module contains local data source related classes -
Remote Module
:remote
module contains remote data source related classes -
Presentation Module
:presentation
module contains business logic
Each module has its own test.
Tech Stack
- Kotlin
- Jetpack
- Coroutines - Flow
- Dagger Hilt
- Retrofit
- OkHttp
- KotlinX
- KotlinX Serialization Converter
- LeakCanary
- Testing