Art Catalog App is an app that allows users to navigate the catalog of artworks exposed by the Art Institute of Chicago API.
The app runs from API 24 and above, just clone the project and run it as you normally run an Android project.
The architecture used for the application consists of the following:
- Clean Architecture.
- Repository pattern.
- MVVM pattern.
- Android Architecture components (ViewModel, Navigation, Room, Lifecycle)
This project uses basic UiStates(ArtworkDetailUIState
, ArtworkFavoritesUIState
, ArtworksUiState
) to handle the application
interface state at a given moment.
- Retrofit2: Type-safe client for Android and Java/Kotlin, used to make API REST calls.
- Koin: A smart Kotlin injection library.
- Kotlin Coroutines: Simple library used to run Asynchronous or non-blocking calls.
- Kotlin Serialization: Simple library used to serialize data.
- Material components: Interactive building blocks for creating a user interface and animations between views.
- Jetpack Compose: Recommended modern toolkit for building native UI.
- Accompanist permissions: A library which provides Android runtime permissions support for Jetpack Compose.
- ViewModel: A business logic or screen level state holder.
- Room: Room is an abstraction layer on top of a SQLite database.
- Navigation: Navigation is a framework for navigating between 'destinations' within an Android application.
- Lifecycle: Build lifecycle-aware components that can adjust behavior based on the current lifecycle state.
- Coil: Image loading for Android and Compose Multiplatform.
- Mockk: Open source library focused on making mocking test more easily.
- Kluent: Fluent Assertion-Library for Kotlin.
- Turbine: A small testing library for kotlinx.coroutines Flow.
.
├── data
│ ├── db
│ ├── mappers
│ ├── models
│ ├── network
│ ├── repository
│ └── utils
├── di
├── domain
│ ├── models
│ └── repository
├── helpers
└── ui
├── components
├── navigation
├── screens
├── theme
└── utils
db
all the classes related to local storage with Room.mappers
as the name suggests, this folder contains the required files to pass the info from the API response to the domain models in the project.models
data class files for the API call response.network
representation for the API Network client calls.repository
class implementation for each interface call declared inDomain package
.utils
contains a Result Wrapper(CallResult), Exception file and extension used to process the Retrofit response.
models
data class files for the API call response as we need it in the app.repository
interface that define the use case to be performed byData package
.
components
reusable UI components that can be used throughout the application.navigation
holds the navigation logic used on the app.screens
contains files that represents each screen, includes composable function, view model and ui state.theme
contains defined values ofcolors
,shapes
,typografy
used by the app's theme.utils
contains a Modifier file that has some custom modifiers.- it also contains the
MainActivity
.
di
all the classes related to dependency injection(appModule
,dataModule
,domainModule
,databaseModule
).helpers
contains theNotificationHelper
which is a class to handle notifications.
This project includes unit tests for:
- Extensions
- Mappers
- Repository
- ViewModels
It also includes integration test for Room Database:
And an integration test for Navigation:
And an ui test for Screens:
And End to End tests with Maestro
- Most of the colors where taken from the original website, but I'm not an expert 😅.
- Normally, I use Koin for DI, but I also have experience with hilt.
- warning image taken from here
- placeholder image taken from here
- empty_box image taken from here
- logo image taken from here
- no_image icon taken from here