This is a sample Android project showcasing the implementation of a Jetpack Compose application using Clean Architecture, MVVM design pattern, Hilt for dependency injection, Retrofit for API communication, and the Navigation Component for seamless navigation between screens. The application fetches data from the JSONPlaceholder API.
- Utilizes Jetpack Compose for UI development.
- Implements Clean Architecture for separation of concerns.
- Follows MVVM design pattern for better testability and maintainability.
- Uses Hilt for dependency injection, making it easy to manage dependencies.
- Utilizes Retrofit for network communication.
- Utilizes the Navigation Component for navigation between screens.
- Jetpack Compose: Modern toolkit for building native Android UIs.
- ViewModel: Store and manage UI-related data.
- Coroutines: Kotlin's way of doing asynchronous programming.
- Hilt: Dependency injection framework.
- Retrofit: Type-safe HTTP client for Android and Java.
- GSON: Library for JSON serialization and deserialization.
- OkHttp: HTTP client that efficiently handles HTTP requests.
- Navigation Component: Provides a framework for navigation within your app.
This project follows the Clean Architecture principles, which separates the application into different layers:
-
Presentation Layer (UI): This layer contains the Jetpack Compose components, ViewModels, and UI-related logic.
-
Domain Layer: This layer contains the business logic of the application. It defines entities, use cases, and repositories.
-
Data Layer: This layer is responsible for fetching data from external sources. It includes API interfaces, data sources, and data models.
- Clone the repository:
git clone https://github.com/raanaYavari/ComposeSample.git
-
Open the project in Android Studio or your preferred IDE.
-
Build and run the application on an Android emulator or a physical device.
-
Upon launching the app, it will fetch data from the JSONPlaceholder API and display it in a list.
-
You can click on individual items to view more details.
-
Use the Navigation Component to navigate between different screens.
If you'd like to contribute to this project, please follow these steps:
-
Fork the repository.
-
Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature
- Make your changes and commit them:
git commit -m 'Add a new feature'
- Push the branch to your fork:
git push origin feature/your-feature
- Create a pull request from your fork to the original repository.