badoo / MVIKotlin

Extendable MVI framework for Kotlin Multiplatform with powerful debugging tools (logging and time travel), inspired by Badoo MVICore library
https://arkivanov.github.io/MVIKotlin
Apache License 2.0
825 stars 66 forks source link
android framework hacktoberfest ios jvm kotlin kotlin-multiplatform multiplatform mvi native

Maven Central License kotlinlang|MVIKotlin

Maintenance notice

This repository is not maintained. Arkadii Ivanov continued to work on the fork arkivanov/MVIKotlin.

Inspiration

This project is inspired by Badoo MVICore library.

Overview

Should you have any questions or ideas please welcome to the Slack channel: #mvikotlin

What is MVI

MVI stands for Model-View-Intent. It is an architectural pattern that utilizes unidirectional data flow. The data circulates between Model and View only in one direction - from Model to View and from View to Model.

MVI

What is MVIKotlin

MVIKotlin is a Kotlin Multiplatform framework that provides a way of (not only) writing shared code using MVI pattern. It also includes powerful debug tools like logging and time travel. The main functionality of the framework does not depend on any reactive nor coroutines library. Extensions for Reaktive and for Coroutines libraries are provided as separate modules.

MVIKotlin

Responsibility

MVIKotlin does not bring or enforce any particular architecture. Its responsibility can be described as follows:

Everything else is out of scope of the library, there are no definitions for "screens", "features", "modules", etc. Also, no particular reactive framework is enforced/exposed. This gives a lot of flexibility:

You can find one of the architecture options in the samples. Again, this is just an example of one possible solution.

Setup

Recommended minimum Gradle version is 5.3. Please read first the documentation about metadata publishing mode.

There are a number of modules published to Maven Central:

Add required modules to your module`s build.gradle file:

implementation "com.arkivanov.mvikotlin:<module-name>:<version>"

IDEA Live Templates

To speed up the creation of new Stores, you can use the following IDEA Live Templates.

Features

Documentation

https://arkivanov.github.io/MVIKotlin

Sample project

The sample project is a todo list with details view.

Author

Twitter: @arkann1985

If you like this project you can always Buy Me A Coffee ;-)

Watch video (time travel, logs, debug, etc.)

Debugging Android application with MVIKotlin

Debugging Android application with MVIKotlin

Debugging iOS application with MVIKotlin

Debugging iOS application with MVIKotlin

Debugging Android application with IntelliJ IDEA time travel plugin

Debugging Android application with IntelliJ IDEA time travel plugin

Debugging iOS application using MVIKotlin time travel client app

Debugging iOS application using MVIKotlin time travel client app