The purpose of this project is to reflect knowledge in Kotlin of MVVM pattern, coroutines, Flows, dagger hilt injector, Room with SQLite and COMPOSE! using https://rickandmortyapi.com/ public api.
Single Responsibility Principle, Open/Closed Principle, Liskov Substitution Principle, Interface
Segregation Principle and Dependency Inversion Principle
Use cases with a CharacterRepository with Character and Local data sources
Dependency management with Kotlin kts and Kotlin Symbol Processing (KSP)
Dagger Hilt dependency and Error handling with Arrow library.
- ::app - The application module with access to all the application
- ::data - Android module that can only access domain module
- ::domain - Kotlin module that cannot access any other module
- ::usecases - Android module that can only access data and domain modules
Jetpack Compose and Compose Navigation
CollapsingLayout, HorizontalPager and two tabs | Enter and exit transition with slide horizontally |
Scale animation on enable favorite button | Showing cards sequentially on LazyColumn |
Filtered results with Status (All/Alive/Dead/Unknown), Gender(All/Female/Male/Genderless/Unknown) and naming with scroll-end pagination.
Room store favorite on data base SQLite. I use the Entity 'Character' to save the characters selected as favorites by the user and I manage queries in DAO FavoriteCharacterDao.
Dark and light depending system theme
@Composable
fun RickAndMortyTheme(darkTheme: Boolean = isSystemInDarkTheme(),content: @Composable () -> Unit) {
val colors = if (darkTheme) {
DarkColorScheme
} else {
LightColorScheme
}
}
Detekt code analysis tool
- Compose Toolkit for building native UI (in a declarative way - 100% Kotlin).
- Compose Navigation for tabs navigation using Jetpack Compose.
- Material3 The next evolution of Material Design. Material 3 includes updated theming and components.
- Coroutines Library support for Kotlin coroutines.
- Flows Stream processing API, built on top of Coroutines.
- Dagger Hilt Dependency injection library for Android.
- Retrofit Type-safe REST client for Android to consume RESTful web services.
- Coil Compose Image downloading and caching library supported by Jetpack Compose.
- Lottie Compose Library that provides that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile.
- Arrow Functional programming to Kotlin.
- OkHttp3 Third party library for sending and receive network requests.
- Room The Room persistence library provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
- Detekt Static code analysis tool for the Kotlin programming language.
Copyright 2023 Alvaro Quintana
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
http://www.apache.org/licenses/