Skip to content

Maryk

Define data once in Kotlin. Validate it, serialize it, store it, query it, inspect it, and sync changes across platforms.

Maryk is a Kotlin Multiplatform data toolkit for teams that want one durable data contract across clients, servers, tools, and tests.

Define the model in Kotlin. Reuse it for validation, serialization, storage, history, tooling, and sync.

One Model

Define your schema once in Kotlin and reuse it across storage, transport, tools, and tests.

Versioned Storage

Ask for “only changes” or “as of time T”. Stream live updates without extra infrastructure.

Portable Serialization

Streaming YAML/JSON and compact ProtoBuf with consistent encoders/decoders across platforms.

Typed Store API

Run the same typed requests against local, embedded, distributed, or remote stores.

Pluggable Stores

Start in‑memory for tests, use IndexedDB in browsers, embed RocksDB for apps, or run FoundationDB for ACID and scale — same API.

Kotlin Multiplatform

Run on JVM, Android, iOS, macOS, Linux, Windows, and JS — share your model and logic.

Desktop App

Inspect models and edit records in the Maryk App.

  1. Add the dependency
implementation("io.maryk:maryk-core:<maryk-version>")
  1. Define a model
import maryk.core.models.RootDataModel
import maryk.core.properties.definitions.string
object Person : RootDataModel<Person>() {
val firstName by string(index = 1u)
val lastName by string(index = 2u)
}
  1. Create, validate, serialize
val jane = Person.create { firstName with "Jane"; lastName with "Doe" }
Person.validate(jane)
val json = Person.Serializer.writeJson(jane, pretty = true)

Start with Getting Started, then run the complete First Store Tutorial.

Browse the reference sections: Data Modeling, Querying, Serialization, Stores, CLI, and App.

Picking storage? See Stores for the overview, or jump straight to In‑Memory, IndexedDB, RocksDB, FoundationDB, or Remote.