Ballast Documentation

June 8, 2026 · View on GitHub

Ballast is an opinionated MVI state management framework for Kotlin Multiplatform. This directory contains project-level documentation. Module-specific documentation lives in each module's own README.

In This Directory

Migration Guides

Ballast has had a number of major version releases over the years. While the core APIs have remained stable, there are some notable changes from time-to-time that you'll need to keep up with. Whenever possible, breaking changes are first marked as deprecated for at least 1 full major-version cycle so you have ample time to migrate to its replacement before the legacy functionality is removed.


Modules

Core

The ballast-core module is the main dependency you'll need to get started with Ballast. It brings in all of the following sub-modules:

ModuleDescription
ballast-coreStart here. Aggregates the core modules; standard dependency for most apps
ballast-apiCore interfaces and contracts; use this when building Ballast extensions
ballast-viewmodelPlatform-specific ViewModel base classes (Android, iOS, Basic)
ballast-loggingLogging interceptor and platform-specific logger implementations
ballast-utilsInternal utilities used by other Ballast modules

Front-end Features

Ballast is designed with a flexible plugin architecture. The following modules provide plugins to augment the core MVI functionality with useful features for UI development

ModuleDescription
ballast-saved-stateSave and restore ViewModel state across process death
ballast-undoUndo/redo support via state snapshots
ballast-syncSynchronize state across multiple ViewModel instances
ballast-analyticsAnalytics event tracking interceptor
ballast-firebase-analyticsFirebase Analytics tracker for ballast-analytics
ballast-crash-reportingCrash reporting interceptor
ballast-firebase-crashlyticsFirebase Crashlytics reporter for ballast-crash-reporting
ballast-navigationType-safe navigation and backstack management
ballast-repositoryDeprecated MVI pattern extended to the repository layer with built-in caching
ballast-schedulesDeprecated Schedule definitions for use with the scheduler modules
ballast-scheduler-coreCore scheduler infrastructure
ballast-scheduler-viewmodelViewModel-based scheduler
ballast-scheduler-android-alarmmanagerAndroid AlarmManager-based scheduler

Server-side Features

Recently, Ballast has evolved beyond just front-end state management, and is becoming a solution for server-side event-driven workloads.

ModuleDescription
ballast-ktor-serverKtor server-side integration
ballast-autoscaleAutomatically scale ViewModel resources based on load
ballast-queue-corePersistent job queue core
ballast-queue-viewmodelViewModel-based job queue
ballast-queue-exposed-driverExposed (SQL) storage driver for the job queue
ballast-scheduler-coreCore scheduler infrastructure
ballast-scheduler-viewmodelViewModel-based scheduler. Integrated well with the ViewModel-based queue
ballast-scheduler-cronCron expression support for the scheduler

Utilities

These utilities help you in the development and maintenance of your Ballast ViewModels.

ModuleDescription
ballast-testTesting utilities for Ballast ViewModels
ballast-kotlinx-serializationkotlinx.serialization support for debugger and other modules
ballast-debugger-clientInterceptor that connects ViewModels to the IntelliJ debugger UI
ballast-debugger-modelsShared data models for debugger client/server communication
ballast-idea-pluginIntelliJ plugin — real-time ViewModel inspection and code scaffolding

Examples

There are many examples showing how to use the various plugins and features of Ballast. Clone this repo and run these examples to better understand Ballast's many features.

ExampleDescription
counterMinimal counter — the simplest possible Ballast app
navigationWithEnumRoutesNavigation and backstack management with enum-defined routes
webJS/browser app with multiple scenarios: Kitchen Sink, ScoreKeeper, Sync, Undo, BGG API
androidAndroid implementations of the same scenarios as the web example
desktopCompose Desktop implementations of the same scenarios as the web example
compose_sharedui_kmmShared Compose UI across Android, iOS, Desktop, and Web
queueJob queue example