Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bfpimentel/android-template
Hilt, Retrofit, JUnit5, Detekt template following Clean Architecture and modularization principles.
https://github.com/bfpimentel/android-template
Last synced: 27 days ago
JSON representation
Hilt, Retrofit, JUnit5, Detekt template following Clean Architecture and modularization principles.
- Host: GitHub
- URL: https://github.com/bfpimentel/android-template
- Owner: bfpimentel
- Created: 2021-04-29T23:16:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-30T00:22:44.000Z (over 3 years ago)
- Last Synced: 2024-11-05T09:20:33.344Z (2 months ago)
- Language: Kotlin
- Homepage:
- Size: 644 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Android App Template
## Architecture Explanation
I choose to modularize just the project layers instead of the features because there were just two screens and there are no plans to add more. I focused on ease to maintain and on Clean Architecture principles.
This is a representation of the architecture, the connection between UseCases is not obligatory, more details below.
The arrows on the top can be read as "talks to".
### :app
This is the presentation layer, it is responsible for what the user sees.
- **Fragment**: The Fragment is responsible to listen to the user inputs and its ViewModel outputs.
- **ViewModel**: It expects the Fragment inputs and calls the UseCases, from _domain_ module, then, it can output the data to the Fragments via LiveData observers. All the ViewModels in this project also have a Navigator.
- **Navigator**: It navigates or pops to other fragments.---
### :domain
This is the domain layer, it holds the business rules of the applications and it is a pure java/kotlin module.
- **UseCase**: It is responsible for the business rules on the application, it talks to the repositories by dependency inversion or to another use cases.
---
### :data
This is the data layer, it does not contain any business rules, it is responsible to get data from local or remote data sources.
- **Repository**: It is just a composition of local or remote data sources, the interfaces on those are from the _domain_ module.
- **DataSource**: It is responsible to talk with the remote server or local database.