Skip to content

Showcase of multi-modular Android MVVM architectures (Layered Architecture and Clean Architecture) 🏛 to developing clean, testable and scalable Android Apps 📱. MVVM, LiveData, Retrofit, Coroutines, Hilt Dependency Injection, MockK Unit Tests.

License

Notifications You must be signed in to change notification settings

davidepanidev/android-multimodule-architecture-concepts

 
 

Repository files navigation

Layered Architecture Concept

Kotlin License

This concept consists of structuring the App in 4 separate modules:

  • app: Android module that contains the Android Application component and all the framework specific configurations. It has visibility over all the other modules and defines the global dependency injection configurations.
  • presentation: Android module that represents the presentation layer. It contains the Android UI framework components (Activities, Fragments, ViewModels...) and the related resources (e.g. images, strings...).
  • domain: Android module that represents the domain layer. It contains Use Cases (platform-independent business logic) and Entities (platform-independent business models). Ideally this module would be a pure Kotlin library because it has to be platform-independent. However in this concept it has to be an Android module because it depends on the data module which is an Android module itself.
  • data: Android module that represents the data layer. It contains Repositories and their corresponding interfaces, the data source Api implementations and the corresponding api-specific models.

The dependencies between the modules and the visibility among them is shown by the picture below (the app module is not shown as it has global visibility over the all project):

Data Flow

The data flow is shown by the picture below:

About

Showcase of multi-modular Android MVVM architectures (Layered Architecture and Clean Architecture) 🏛 to developing clean, testable and scalable Android Apps 📱. MVVM, LiveData, Retrofit, Coroutines, Hilt Dependency Injection, MockK Unit Tests.

Topics

Resources

License

Stars

Watchers

Forks

Languages