A modern Android application built with Kotlin and Jetpack Compose that allows users to explore and manage user data.
This project demonstrates:
- Clean Architecture implementation with MVI pattern
- Modern Android development practices
- SOLID principles adherence
- Test-driven development approach
- Scalable and maintainable codebase
- Kotlin
- Kotlin Flow
- Jetpack Compose
- Material 3
- Dagger Hilt
- Kotlinx Serialization
- Android Architecture Components
- Navigation Compose
- Lifecycle
- ViewModel
- Coroutines
- Clean Architecture
- MVI (Model-View-Intent)
- Retrofit
- Coil
- MockK
- Gradle with Kotlin DSL
- Version catalog for dependency management
- Centralized version control
- Type-safe dependency declarations
- Modular project structure
- Build configuration as code
| Users List | User Details | Error State |
|---|---|---|
![]() |
![]() |
![]() |
| List of users | Detailed user information | Error handling with retry option |
The project follows Clean Architecture principles combined with MVI pattern and is organized into the following modules:
Use cases omitted intentionally for scope — the ViewModel calls the repository directly.
app/
├── core/
│ ├── data/ # Data layer implementation
│ │ ├── remote/ # Remote data sources
│ │ ├── repository/ # Repository implementations
│ │ └── model/ # Data models (DTOs)
│ └── domain/ # Domain layer
│ ├── model/ # Domain models
│ ├── repository/ # Repository interfaces
│ └── usecase/ # Use cases
├── feature/
│ └── users/ # Users feature module
│ ├── di/ # Feature-specific dependency injection
│ └── presentation/ # UI layer
│ ├── list/ # User list screen
│ └── detail/ # User detail screen
└── app/ # Application module
├── di/ # Dependency injection
├── navigation/ # Navigation setup
└── theme/ # UI theme
┌─────────────────────────────────────────────────────────────────────────┐
│ Presentation Layer (MVI) │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌───────────────────────────┐ │
│ │ UI │ │ ViewModel │ │ Navigation │ │
│ │ (Compose) │◄───┤ (StateFlow) │◄───┤ (Navigation Compose) │ │
│ └─────────────┘ └─────────────┘ └───────────────────────────┘ │
└───────────────────────────┬─────────────────────────────────────────────┘
│
┌───────────────────────────▼─────────────────────────────────────────────┐
│ Domain Layer │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌───────────────────────────┐ │
│ │ UseCase │ │ Domain │ │ Repository Interface │ │
│ │ (Flow) │◄───┤ Model │◄───┤ (Contract) │ │
│ └─────────────┘ └─────────────┘ └───────────────────────────┘ │
└───────────────────────────┬─────────────────────────────────────────────┘
│
┌───────────────────────────▼─────────────────────────────────────────────┐
│ Data Layer │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌───────────────────────────┐ │
│ │Repository │ │ Remote │ │ DTO │ │
│ │ Impl │◄───┤ DataSource │◄───┤ (Data Object) │ │
│ └─────────────┘ └─────────────┘ └───────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
Data Flow:
1. UI triggers Intent in ViewModel
2. ViewModel processes Intent and updates State
3. ViewModel executes UseCase
4. UseCase uses Repository
5. Repository fetches data from DataSource
6. Data flows back up through the layers
7. UI updates via StateFlow
-
Unit Tests
- ViewModels
- Repositories
- Data Sources
- Mappers
-
UI Tests (Compose)
- Users list screen
- User detail screen
Run all unit tests:
./gradlew testRun Compose UI tests on a connected device or emulator:
./gradlew :feature:users:connectedDebugAndroidTestTests follow the Arrange / Act / Assert pattern for clarity and consistency.
-
Clean Architecture
- Clear separation of concerns
- Independent of frameworks
- Testable business logic
- Independent of UI
- Independent of data
-
MVI Pattern
- Unidirectional data flow
- Predictable state management
- Easy to test
- Clear state representation
-
Error Handling
- Graceful error states
- Retry mechanisms
- User-friendly error messages
-
Feature Enhancements
- Add user search functionality
- Add offline support
-
Architecture
- Implement error handling strategy
- Add analytics tracking
- Implement proper logging system
- Clean Code Practices
- SOLID Principles
- Meaningful naming
- Small functions
- DRY (Don't Repeat Yourself)
- KISS (Keep It Simple, Stupid)


