
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 is a Kotlin Multiplatform framework for defining, validating, serializing, and storing data models consistently across multiple platforms, including iOS, macOS, watchOS, tvOS, Linux, Windows, Android, JVM, JavaScript and Wasm. With a fully version-aware data store and flexible querying, Maryk makes it easy to maintain complex data structures while ensuring backward compatibility and efficient data handling.
The RocksDB persistence layer is available for the JVM, iOS, macOS, tvOS, watchOS, Android, Android Native, Windows and Linux.
The FoundationDB persistence layer is available on supported platforms that have the FoundationDB client library (libfdb_c) present (JVM, macOS, linux).
Unified Data Modeling: Define your data models once and use them everywhere, ensuring a single source of truth across platforms.
Flexible Property Types and Inheritance: Create models with a variety of property types, and reuse model structures to build complex data hierarchies.
Built-in Validation: Enforce data quality with validations such as required fields, uniqueness, min/max constraints, and regex checks.
Cross-Platform Serialization: Seamlessly serialize and deserialize data as JSON, YAML, or Protocol Buffers, facilitating easy communication between clients and services.
Model Serialization & Compatibility: Serialize your schemas themselves and run compatibility checks across different clients, ensuring smooth upgrades and migrations.
Version-Aware Storage and Queries: Store data in NoSQL data stores (in-memory/RocksDB/FoundationDB) and leverage versioning to request historical states, compare past values, and minimize bandwidth by fetching only changed fields.
Sensitive Field Protection: Mark simple value properties with sensitive = true to encrypt stored payloads (sensitive+unique supported with token provider; sensitive+indexed not supported).
Data Aggregations & Insights: Perform aggregations (count, sum, average, min/max, grouped by time intervals or enums) for richer analytics and decision-making.
CLI tooling: Browse and edit records in a terminal via the Maryk CLI.
Desktop App: Browse models and edit records in a desktop UI with the Maryk App.
build.gradle.kts:implementation("io.maryk:maryk-core:<version>")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)
}
// Validate the object
Person.validate(johnSmith)// Serialize to JSON
val json = Person.writeJson(johnSmith)
// Deserialize from JSON
val personFromJson = Person.readJson(json)libfdb_c).RemoteDataStore.See the overview and guidance in store/README.md for when to pick each engine.
For detailed information, check out:
libfdb_c is available).We welcome contributions through feature requests, issue reports, and pull requests.
Your involvement helps Maryk grow and improve!
Maryk is a Kotlin Multiplatform framework for defining, validating, serializing, and storing data models consistently across multiple platforms, including iOS, macOS, watchOS, tvOS, Linux, Windows, Android, JVM, JavaScript and Wasm. With a fully version-aware data store and flexible querying, Maryk makes it easy to maintain complex data structures while ensuring backward compatibility and efficient data handling.
The RocksDB persistence layer is available for the JVM, iOS, macOS, tvOS, watchOS, Android, Android Native, Windows and Linux.
The FoundationDB persistence layer is available on supported platforms that have the FoundationDB client library (libfdb_c) present (JVM, macOS, linux).
Unified Data Modeling: Define your data models once and use them everywhere, ensuring a single source of truth across platforms.
Flexible Property Types and Inheritance: Create models with a variety of property types, and reuse model structures to build complex data hierarchies.
Built-in Validation: Enforce data quality with validations such as required fields, uniqueness, min/max constraints, and regex checks.
Cross-Platform Serialization: Seamlessly serialize and deserialize data as JSON, YAML, or Protocol Buffers, facilitating easy communication between clients and services.
Model Serialization & Compatibility: Serialize your schemas themselves and run compatibility checks across different clients, ensuring smooth upgrades and migrations.
Version-Aware Storage and Queries: Store data in NoSQL data stores (in-memory/RocksDB/FoundationDB) and leverage versioning to request historical states, compare past values, and minimize bandwidth by fetching only changed fields.
Sensitive Field Protection: Mark simple value properties with sensitive = true to encrypt stored payloads (sensitive+unique supported with token provider; sensitive+indexed not supported).
Data Aggregations & Insights: Perform aggregations (count, sum, average, min/max, grouped by time intervals or enums) for richer analytics and decision-making.
CLI tooling: Browse and edit records in a terminal via the Maryk CLI.
Desktop App: Browse models and edit records in a desktop UI with the Maryk App.
build.gradle.kts:implementation("io.maryk:maryk-core:<version>")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)
}
// Validate the object
Person.validate(johnSmith)// Serialize to JSON
val json = Person.writeJson(johnSmith)
// Deserialize from JSON
val personFromJson = Person.readJson(json)libfdb_c).RemoteDataStore.See the overview and guidance in store/README.md for when to pick each engine.
For detailed information, check out:
libfdb_c is available).We welcome contributions through feature requests, issue reports, and pull requests.
Your involvement helps Maryk grow and improve!