This app uses Dog CEO API to load data into the app.
The architecture of this project is MMVM (Model View ViewModel) Clean Architecture. The app is architectured in a way that it would be easier to understand for other developers and reviewers. I have used clean architecture because it goes a step further in segregating the code base’s responsibilities and concerns.
The architecture of the app is divided into three layers.
- Ui Layer (Presentation Layer)
- Domain Layer
- Data Layer
- Compose - Defines UI programmatically with composable functions that describe its shape and data dependencies.
- Compose Foundation - Write Jetpack Compose applications with ready-to-use building blocks and extend the foundation to build your design system pieces.
- Compose UI - Fundamental components of compose UI needed to interact with the device, including layout, drawing, and input.
- Compose Material - Build Jetpack Compose UIs with ready-to-use Material Design Components.
- Arch Core - Helper for other arch dependencies, including JUnit test rules.
- Room - Create, store, and manage persistent data backed by an SQLite database.
- Hilt - Dependency injection plays a central role in the architectural pattern used.
- Navigation - Build and structure your in-app UI, handle deep links, and navigate between screens.
- Kotlinx Coroutines - Library Support for coroutines. I used this for asynchronous programming to obtain data from the network.
- Retrofit - Type-safe HTTP client and supports coroutines out of the box.
- Moshi - JSON Parser, used to parse requests on the data layer for Entities and understands Kotlin non-nullable and default parameters.
- okhttp-logging-interceptor - Logs HTTP request and response data.
- Hilt - Dependency injection plays a central role in the architectural pattern used.
- JUnit - This was used for unit testing the database, the use cases, and the ViewModels.
- Mockk This is a mocking library for Kotlin. I used it to provide test doubles during testing.
- Truth - Assertions Library, provides readability as far as assertions are concerned.
- Espresso - Used for writing Android UI tests for our DAO.
- Coil - Image loading for Android backed by Kotlin Coroutines.
- Accompanist Pager - A library that provides paging layouts for Jetpack Compose.
- Accompanist Navigation Animation A library that provides Compose Animation support for Jetpack Navigation Compose.
- Kotest Assertions - I am using it in the test cases. Kotest calls types of state assertion functions matchers.