A modern Android application built using Kotlin and Clean Architecture principles. This project demonstrates a scalable and maintainable structure using MVVM, Hilt (Dependency Injection), and REST API integration.
- Language: Kotlin
- UI: XML (Activities / Fragments)
- Architecture: Clean Architecture + MVVM
- Dependency Injection: Hilt (Dagger)
- Networking: Retrofit + OkHttp
- Asynchronous: Kotlin Coroutines + Flow
- State Management: StateFlow / LiveData
app/src/main/java/com/project/
├── core/
├── data/
├── domain/
├── presentation/
├── di/
└── MainActivity.kt
Contains reusable components used across the app:
- Network configuration (Retrofit, interceptors)
- DataStore / Preferences
- Utility classes and extensions
- Constants
Responsible for handling all data operations:
- API calls (remote)
- DTO models
- Repository implementations
- Data mapping (DTO to Domain)
Pure business logic with no Android dependencies:
- Domain models (entities)
- Repository interfaces
- UseCases (application logic)
Handles UI and state:
- Activities / Fragments (XML-based UI)
- ViewModels (MVVM)
- UI state management using StateFlow / LiveData
- Reusable UI components
Provides dependencies using Hilt:
- NetworkModule
- RepositoryModule
- UseCaseModule
UI (Activity / Fragment)
↓
ViewModel
↓
UseCase
↓
Repository (Domain Interface)
↓
Repository Implementation (Data Layer)
↓
Remote API
- Clean Architecture implementation
- MVVM pattern with StateFlow / LiveData
- REST API integration
- Repository pattern
- Dependency Injection using Hilt
- Scalable and maintainable structure
- Structured error handling
-
Clone the repository:
git clone https://github.com/your-username/your-repo.git
-
Open the project in Android Studio
-
Sync Gradle
-
Run the application on an emulator or physical device
- Follows SOLID principles
- Clear separation of concerns
- Unidirectional data flow
- Immutable UI state
- Clean and readable code structure
This project follows a single-module clean architecture approach. It can be extended into a multi-module architecture for larger applications:
:app
:core
:data
:domain
:feature-*
Contributions are welcome. You can fork the repository and submit a pull request.
This project is licensed under the MIT License.