PokeAPi + Kotlin + Clean Architecture + Jetpack Navigation.
My small demonstration for android application based on Clean Architecture and Model-View-ViewModel (MVVM) architecture for me to understand more and hope can help other android developers get head start into Android clean architecture pattern.
For now it only fetch all pokemon list from PokeAPI and display the list using Android Jetpack Paging 3, and for the detail page just showing basic info based on the PokeAPI pokemon detail API.
For the project structure, I tried to separated each layer by module.
An Android module that contains view (Activities,Fragments,Dialogs,etc..). ViewModels also will be here. This module will be responsible for UI presentation. Every data returned from Data module through entity will be handle in ViewModel and observe by View.
An Android module that contains mappers, Domain Module repository & usecases implementation and data source (Local Data Source/Network Data source) for basic operations.
A pure java module. Its should be the individual and the innermost module. We should not have any Android package related in this module. Domain module consist of entity models, use cases interface, repository interfaces.
- Koin.
- Jetpack Library (Navigation , Paging 3, Data Binding, View Binding, View Model, LiveData & Lifecycle)
- Coroutines.
- Retrofit.
- Glide.
- Timber.
Reference :
*This project is just a demo. If you have any feedback or question please reach me!
If you have any question please feel free to email me at johanadam95@gmail.com or contact me through Twitter!