- In this repository, i want to talk about how to build a base project using MVVM + Clean Architecture in Android. Although there are many ways to build the base project, i hope my approach can help you. Besides, i also hope you contribute your opinion to make this repository better.
- For those who don't know what is the Clean Architecture, let read this article: Clean Architecture
The project is divided 4 main modules:
- Core module: Include BaseActivity, BaseFragment, BaseViewModel, BaseRecyclerView, extension functions and some utils such as: ErrorUtils, LocaleHelper,...
- Data module: Corresponds to Data layer. It include local data source and remote data source
- Domain module: Corresponds to Domain layer. It include some folders such as: mapper, domain model, repository and use case
- App module: Corresponds to Presentation layer. It include features of application. Each Activity/Fragment will inherit BaseActivity/BaseFragment class, Viewmodel inherit BaseViewModel
- Language: Kotlin
- Dependency Injection: Dagger Hilt
- Executes Asynchronously: Kotlin Coroutines
- Make network call: Retrofit
- Local database: Room
- Gradle: Kotlin DSL
- The project use Oxforddictionaries API to search words
I built a simple app to implement this base project. My application has 2 main features: search language in dictionary and change language between Vietnamese and English
One more time, thank you for viewing my repository. If you have any ideas, leave it in the comments section.