This is an Android project showcasing the implementation of Clean Architecture in a modular structure with Kotlin. The project is divided into three modules: domain, data, and app. It utilizes HILT for dependency injection and Jetpack Compose for the user interface.
Contains the business logic and entities of the application. It defines the use cases and interfaces that will be implemented in the other modules.
Implements the data sources and repositories defined in the domain module. This module is responsible for interacting with external data, such as fetching images from the Cataas API.
- HILT for dependency injection.
- Jetpack Compose for UI development.
- Retrofit for web API communication.
- Kotlin Flow for handling asynchronous operations.
- Kotlin Coroutines for asynchronous programming.
- Coil for loading and displaying images.
The sample project fetches images from the https://cataas.com/doc.html. The images are displayed in a grid using Jetpack Compose.
Both the domain and data modules include tests using the following frameworks:
- Kotlin Test for writing tests in Kotlin.
- MockK for mocking objects in tests.
- JDK 19 is required to build and run the project.
- Clone the repository:
git clone https://github.com/reul/CleanArchitectureExample.git - Open the project in Android Studio or your preferred IDE.
- Build and run the app on an emulator or physical device.
Feel free to explore and modify the code to understand how Clean Architecture is implemented in this project.
This project is licensed under the Unlicense.
Special thanks to the https://cataas.com/doc.html API for providing adorable images of Cats.
Enjoy exploring and experimenting with Clean Architecture in Android with this example project! If you have any questions or feedback, please feel free to open an issue or contribute to the project.
