A simple task management Android app built using modern Android architecture with Jetpack Compose, MVVM, and StateFlow.
This project was created to using modern Android development patterns while building a functional task management application.
- Add tasks using bottom input field
- Toggle task completion
- Delete tasks
- Filter tasks:
- All
- Active
- Completed
- Bottom input UX for easier one-hand usage
- Clean architecture with repository layer
- Kotlin
- Jetpack Compose
- Material 3
- MVVM Architecture
- StateFlow
- Repository Pattern
The project follows a layered architecture:
UI (Compose)
↓
ViewModel
↓
Repository Interface
↓
Repository Implementation (In-Memory)
ui/
home/
HomeScreen.kt
HomeViewModel.kt
HomeUiState.kt
domain/
model/
Task.kt
data/
repository/
TaskRepository.kt
TaskRepositoryImpl.kt
- The ViewModel manages UI state using
StateFlow. - The Repository layer handles task operations like add, toggle, and delete.
- The UI collects state using
collectAsState()and automatically recomposes when data changes.
Example:
val state by viewModel.uiState.collectAsState()This ensures the UI always reflects the latest application state.
Some small UX improvements implemented:
- Bottom task input for easier reach
- Keyboard Done action adds tasks
- Keyboard automatically dismisses after submission
- Filter chips highlight the selected filter
- Empty state messages when there are no tasks
Planned improvements for the project:
- Room database for persistence
- Coroutines for async data operations
- Loading and error state handling
- Edit task functionality
- Undo delete with Snackbar
- Unit tests for ViewModel
- Dependency injection (Hilt)