An app that shows informations about the series that you love the most!
There is no special setup necessary to run. The app is using an open source API from TVMaze to list all tv shows from their database.
The multi module project structure its being used to de-couple the main app of its features. Also make it easier to separate feature parts of the application from the design-system and to reuse any necessary request without duplicate the code or relying on uncessary content inside on class.
The project is organized using MVVM and Clean Architecture.
This architecture is recommended by Google, belongs to the Jetpack Components and provides a clean separation of concerns between user interface and domain logic. It's divided in three components:
- Model: they are the contracts that contains business logic and they can be manipulated
- View: they are indeed the views, like Activities or Fragments, they will show to the user some data received from the ViewModel. They need to have less business logic as possible.
- ViewModel: responsible for store and manage the data related to the view respecting their lifecycle.
The Clean Architecture is a way to manage our code, that contains some advantages, like: Scalability, Modularization, Testability, Independency of Frameworks, UI and Databases.
We can divide in three main layers:
- Presentation: contains all UI classes, like Fragments, Activities, Presentation Models and ViewModels (that will interact with the domain layer through UseCases) and the views will communicate with ViewModel through LiveData.
- Domain: responsible for orchestrate our business rules, that will be requested by the Data Layer and the Presentation Layer and doesn't have dependecy with other layers, also contains: UseCases (interactors), Repository Interfaces and Domain models.
- Data: contains API Interface, Repository Implementation, Database classes and SharedPreferences(or DataStore). The repository implementation will decide which way are we gonna obtain the data, like, from API Call, Database or SharedPreferences.
A lightweight and pragmatic dependency injection framework written purely in Kotlin. Easy to setup and easy to use.
Coroutines are light, they prevent some memory leaks and they have integration with Jetpack. Flow also had some advantages, like multiplatform support, nullability support, suspending execution and they also prevent some memory leaks, on account of being collected in the ViewModel scope.
To guarantee code quality, tests were implemented using JUnit with MockK for unit tests. There is an example in GetShowsByIdTest.kt and ShowRepositoryImplTest.kt.
- 🧘 Retrofit for REST API calls
- 💻 CI Integration with GitHub Actions
- 📸 Coil for load image URLs
- 💭 Shimmer from Facebook to handle loading UI
- 🎉 The Splash Screen library to handle the splash on Android 12
- ⬇️ Dependency Updates to keep all dependencies up to date!
- 🧐 Detekt to keep our code clean and well structured
- 📃 Paging 3.0 to load all shows inside a paginated list
- 📁 Room for local database
- ⛵ Navigation of Jetpack Components to navigate between Fragments
This project is licensed under the MIT License - see the LICENSE file for details