StateMachine Architecture Based on MVI: Combining KMM, Jetpack Compose and SwiftUI
summary
An MVI-style StateMachine architecture uses Kotlin Multiplatform (KMM) to share processor/reducer logic across Jetpack Compose (Android) and SwiftUI (iOS). It shows a concrete paged “monster” list sample covering loading, page loading, retry, and item navigation, and presents a DSL-backed Macaron library that collapses separate processor/reducer files into a single state-centered definition to reduce files and clarify flow.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 1:03Agenda and MVI overview
- 2:09KMP, Jetpack Compose, SwiftUI features
- 3:36MVI implementation with KMP
- 5:00MVI code tips
- 8:20Sample screen specs
- 9:48Domain layer steps
- 10:51State and Intent contract
- 13:44Actions contract
- 15:10Processor implementation
- 18:04Reducer implementation
- 20:40UI updates with Store
- 22:28State machine concepts
- 25:57State machine diagrams
- 26:18MVI in Jetpack Compose
- 29:32State and event handling
- 30:58SwiftUI MVI on iOS
- 31:39State machine DSL intro
- 33:45Using state machine DSL
- 35:57DSL simplifies code
- 36:18Android team benefits
- 37:40KMP platform benefits
- 38:49Real project benefits
- 39:33Drawbacks and notes
- 40:15Makron MVI library
related talks
41mFinita la State Machine — MVI in an iOS App
36mMVWTF: Demystifying Architecture Patterns
41mMVI: a Robust and Modern Architecture
18mMVI made for Android
28mComposing Magic with MVI and Kotlin StateFlow
34mArchitectures in the Compose World
48mBuilding Multi Platform Projects with MVI
38mArchitecture Agnostic UI Development
