KMP Sync
KMP Sync
Oversqlite is the SQLiteNow sync runtime for Kotlin Multiplatform apps. The KMP docs cover generated bridge setup, local lifecycle, account attachment, sync operations, reactive updates, and recovery.
On JS and Wasm, generated newOversqliteClient(...) construction uses the
database’s ordinary bundled provider, which is the packaged worker by default.
Browser state lives in the same deterministic direct OPFS database as Core;
there is no separate provider injection or snapshot configuration. JS Node
remains transient. The worker preserves all Oversqlite control tables and
local-first, pending/dirty/prepared-outbox, interrupted-apply, invalidation, and
numeric-wire behavior.
Start Here
Follow the KMP setup guide when enabling sync in a Gradle-managed SQLiteNow database:
Lifecycle
Use the lifecycle guide to separate local startup, authenticated attachment, and explicit rebuild recovery:
Operations
Use the operations reference for pushPending(), pullToStable(), sync(),
syncThenDetach(), automatic downloads, watch wake-ups, and rebuild result
types:
Reactive Updates
Generated KMP flows are invalidated when oversqlite applies managed table changes:
Shared Concepts And Server Setup
The protocol concepts and server responsibilities are shared across KMP, Flutter/Dart, and Swift clients: