Design Decisions
A curated index of the project's Architecture Decision Records — not all twenty reproduced here, just a grouped map of why each matters, linking out to the real ADR files.
API shape
- ADR-0004 — settled on "document" as the user-facing noun.
- ADR-0007 — Superseded by ADR-0016 an earlier shape for the root factory.
- ADR-0008 — the update builder returns a new value via
copy(), not a mutated receiver. - ADR-0016 —
Documentsas the entry point,Collectionas the named-file handle. - ADR-0017 — dropped the
MergeStrategyenum; the call shape carries the intent instead. - ADR-0018 —
update(builder)as the verb, plusupdate(prop, value)for single-field writes.
Storage & serialization
- ADR-0001 — one MMKV key per top-level field.
- ADR-0003 — walk fields via
SerialDescriptor, never reflection. - ADR-0006 — Superseded by ADR-0015 the earlier per-type
Codecdesign. - ADR-0015 — a single internal CBOR format, replacing the pluggable
Codecabstraction.
Reactivity & concurrency
- ADR-0002 — an in-memory
SharedFlowchange bus for reactivity. - ADR-0011 — a synchronous document API with a non-suspending write lock; only
Flowcollection is dispatcher-governed.
Platform & publishing
- ADR-0005 — publish to Maven Central via macOS CI, not JitPack.
- ADR-0012 — the library owns MMKV initialization, zero-touch.
- ADR-0013 — bind MMKV on iOS via the Kotlin CocoaPods plugin.
- ADR-0019 — dropped
multiProcessmode; storage is always single-process. - ADR-0020 — aligned the Kotlin package with the Maven groupId.
Errors & testing
- ADR-0009 — decoding failures surface as
DocumentDecodingException. - ADR-0010 —
field(prop, default)resolves its serializer via a reified inline extension. - ADR-0014 — on-device, platform-native benchmark harnesses.
For the full history behind any of these, see the complete ADR index on GitHub, or read Contributing for how to propose a new one.