github.com/Kotlin-Android-Open-Source/MVI-Coroutines-Flow

Play MVI with Kotlin Coroutines Flow | MVI pattern on Android using Kotlin Coroutines Flow | Dagger Hilt DI | Koin DI | SharedFlow | StateFlow | Arrow.kt Android Sample

Open this visualization on its own page →

Contributors

7

Lines of Code

1,454

From

2019-11-10

To

2022-09-19

About Kotlin-Android-Open-Source/MVI-Coroutines-Flow

This is an Android project demonstrating the Model-View-Intent architectural pattern implemented with Kotlin Coroutines Flow. The project provides a complete sample application using clean architecture principles with multiple modules, showcasing unidirectional data flow where user intents are translated into model changes that flow back to the view for rendering. The codebase emphasizes immutability and reactive programming patterns.

The project includes comprehensive implementations across different dependency injection frameworks, with the master branch using Koin DI and a separate branch available for Dagger Hilt integration. It features functional programming concepts through the Arrow.kt library and includes unit tests covering the MVI ViewModel, domain, and data layers. The sample application demonstrates core features like user listing, search functionality, adding new users, and error handling, with UI built using traditional Android XML layouts supporting both light and dark themes.

Notable aspects include the use of StateFlow and SharedFlow for managing reactive state, clean separation of concerns across multiple modules, and available CI/CD integration with build and test workflows. The project targets Android API 21 and above, and debug APKs are automatically generated through GitHub Actions. Additionally, a Jetpack Compose version of the project is available as a separate repository for developers interested in modern Android UI toolkit implementations.

Share this video