
A database/framework for defining, querying, and storing structured data efficiently across platforms. It supports powerful features like advanced querying with filters and aggregations, cross-platform serialization (JSON, YAML, ProtoBuf), and historical data versioning.
Maryk lets you define a strongly typed data model once, then use that same model for validation, serialization, querying, storage, tooling, and sync across Kotlin Multiplatform targets.
Use Maryk when you want:
Maryk is a good fit for local-first apps, cross-platform products, Kotlin-heavy backends, tools that need typed data files, and systems where schema evolution and incremental sync matter.
Start with the website for the best reading path. Source docs live in this repository and the website is maintained in website/.
Maryk is Kotlin Multiplatform. Platform support depends on the module:
rocksdb-multiplatform bindings.libfdb_c) is available.Add the core dependency:
repositories {
mavenCentral()
}
dependencies {
implementation("io.maryk:maryk-core:<maryk-version>")
}Define a model:
import maryk.core.models.RootDataModel
import maryk.core.properties.definitions.date
import maryk.core.properties.definitions.string
import maryk.lib.time.LocalDate
object Person : RootDataModel<Person>() {
val firstName by string(index = 1u)
val lastName by string(index = 2u)
val dateOfBirth by date(index = 3u)
}
val johnSmith = Person.create {
firstName with "John"
lastName with "Smith"
dateOfBirth with LocalDate(2017, 12, 5)
}
Person.validate(johnSmith)
val json = Person.Serializer.writeJson(johnSmith, pretty = true)
val fromJson = Person.Serializer.readJson(json)For a complete model → store → query flow, read Getting Started or First Store Tutorial.
libfdb_c.See store/README.md for the decision guide.
libfdb_c is available).Useful commands:
./gradlew jvmTest
./gradlew :store:memory:jvmTest
./gradlew :cli:jvmTest
cd website && yarn buildWhen editing website pages generated from repository docs, update the source file listed in website/README.md.
Issues, discussions, docs fixes, examples, store improvements, and PRs are welcome. Good first contributions usually live in docs, examples, tests, CLI/App workflows, or store-specific edge cases.
Maryk lets you define a strongly typed data model once, then use that same model for validation, serialization, querying, storage, tooling, and sync across Kotlin Multiplatform targets.
Use Maryk when you want:
Maryk is a good fit for local-first apps, cross-platform products, Kotlin-heavy backends, tools that need typed data files, and systems where schema evolution and incremental sync matter.
Start with the website for the best reading path. Source docs live in this repository and the website is maintained in website/.
Maryk is Kotlin Multiplatform. Platform support depends on the module:
rocksdb-multiplatform bindings.libfdb_c) is available.Add the core dependency:
repositories {
mavenCentral()
}
dependencies {
implementation("io.maryk:maryk-core:<maryk-version>")
}Define a model:
import maryk.core.models.RootDataModel
import maryk.core.properties.definitions.date
import maryk.core.properties.definitions.string
import maryk.lib.time.LocalDate
object Person : RootDataModel<Person>() {
val firstName by string(index = 1u)
val lastName by string(index = 2u)
val dateOfBirth by date(index = 3u)
}
val johnSmith = Person.create {
firstName with "John"
lastName with "Smith"
dateOfBirth with LocalDate(2017, 12, 5)
}
Person.validate(johnSmith)
val json = Person.Serializer.writeJson(johnSmith, pretty = true)
val fromJson = Person.Serializer.readJson(json)For a complete model → store → query flow, read Getting Started or First Store Tutorial.
libfdb_c.See store/README.md for the decision guide.
libfdb_c is available).Useful commands:
./gradlew jvmTest
./gradlew :store:memory:jvmTest
./gradlew :cli:jvmTest
cd website && yarn buildWhen editing website pages generated from repository docs, update the source file listed in website/README.md.
Issues, discussions, docs fixes, examples, store improvements, and PRs are welcome. Good first contributions usually live in docs, examples, tests, CLI/App workflows, or store-specific edge cases.