Model·DB
ModelDB  ·  two products

Encrypted storage for the app in your pocket and the server behind it.

ModelDB is two separate products that share an idea, not code. One lives inside a mobile or wearable app and keeps its data sealed on the device. The other is a server you run: it stores AI models, documents and tables, and you work with them in plain sentences. Pick one, or use both.

mdc-lite

An encrypted key-value store that disappears into your app

Five functions linked into your binary. Every value and every key name is sealed before it touches disk, then written as DNA-style A/C/G/T text. No server, no network.

  • Rust + C ABI
  • 348 KB
  • iOS · watchOS · Android · Wear OS
  • v1.2.0
MDC Platform

A conversational data server for models, documents and tables

Store AI models, images, documents and database tables together; import, export, archive and ask in plain sentences, in a browser app or over a token-gated REST API.

  • Python
  • Browser app + REST API
  • Docker · Railway
  • Event-sourced agent state

Which one do you need?

COMPARE

They solve different problems and don't share code. mdc-lite is a library you link into an app; MDC Platform is a server you run. Both seal what they store.

mdc-liteMDC Platform
What it isAn embeddable library, linked into your app's binaryA server you run and talk to
Where it runsInside the app itself — no network, no serverOn a machine with Python, reachable over the network
What it storesSmall generic objects — settings, credentials, cached blobs. No AI models.AI models, images, documents, database tables
CLI / desktop appNone — mobile/wearable embedding onlyYes — conversational CLI, browser Storage Explorer, REST API
How you talk to it5 functions: put / get / exists / delete / list_keysPlain sentences — no SQL, nothing to train support staff on
EncryptionMandatory — every value and every key nameMandatory on the DNA archive tier and on agent-state streams (AES-256-GCM)
DNA-inspired encodingYes — every entry is stored as an encrypted ACGT sequenceYes — the archive tier, same encrypt-then-encode model
External API accessN/A — no network surfaceBearer-token REST API with four roles (viewer to admin), for custom apps and NLU integrations
Data toolsNone — a key-value storeImport and export (CSV, SQL, Excel, ER diagram), schema from a prompt, event-sourced agent state, confirmed deletes
Written inRust (C header for Swift, Kotlin and others)Python (FastAPI, DuckDB)
Choose it whenYour app needs private on-device storage and no server is involvedSeveral people or services need to store, ask about and share data behind an API
Documentationmdc-lite docs →MDC Platform docs →
Is either one's data actually stored as a DNA molecule?No. Both encode data as A/C/G/T text — mdc-lite in its on-disk files, MDC Platform in its archive tier — but it's always encrypted first, then represented as base-letter characters in an ordinary file or database. A software simulation, not a physical molecule. No synthesis, no sequencing, no wet lab, anywhere in either codebase.
Against a traditional databaseMDC Platform is not a faster or smaller database than PostgreSQL or SQLite, but it is close enough to be practical. On the same 10,000 records it took 2.0 MB (PostgreSQL 1.2 MB, SQLite 0.68 MB), looked a record up by id in 0.33 ms (PostgreSQL 0.02 ms) and filtered in 3.5 ms (0.5 ms), and loaded all of them in 0.47 s. The ARCHIVE tier stores exactly the bytes it archives. In return there is no SQL, no drivers and no managed instance to run: for a small always-on app, about $5 a month on a usage-billed host against about $14 for the smallest Amazon RDS PostgreSQL instance, with RDS's backups and failover not included in that gap. Full numbers, assumptions and limits →
Product 1 of 2

mdc-lite

A key-value store built for the places a server can't reach: a watch face, a phone app, a background service. Every value and every key name is sealed under XChaCha20-Poly1305 before it ever touches disk. No runtime, nothing readable outside the app that wrote it.

On this page: What it does Builds Quickstart

In the docs: Installation API reference On-disk format Security model What this isn't

// what one entry looks like on disk
NONCE · 24B
CIPHERTEXT
TAG · 16B
random per write — no counter to persist, no reuse risk authenticated — tampering fails the read, never silently returns

What it does

Encryption

Sealed keys, not just sealed values

Key names are hashed with a keyed BLAKE3 hash before they ever become a filename — a directory listing of the raw store reveals nothing, not even how your data is organized.

Custody

The key is yours, on purpose

This library takes a 32-byte key and never generates, stores, or touches it beyond that. Real custody belongs to the platform's own secure hardware — iOS Secure Enclave / Keychain, Android Keystore / StrongBox — which is exactly where it should live.

Footprint

348 KB, stripped, zero runtime

Built in Rust with opt-level = "z", LTO, and symbols stripped. No garbage collector, no interpreter, no background thread — a handful of file reads and writes, nothing more.

Integrity

Two failure modes, chosen on purpose

get() on a specific key fails loud if it's been tampered with. list_keys() quietly skips anything it can't decrypt, so one bad or foreign file never hides every other valid key in the store.

Interop

A C ABI, not a Rust-only API

Every operation is exposed through a five-function C header — bind it from Swift, Kotlin, or anything else that speaks C calling conventions. No wrapper generation, no FFI framework.

DNA-encoded storage

The file on disk is ACGT text, not binary

Every encrypted entry is DNA-encoded (2 bits per base — 00→A 01→C 10→G 11→T) before it's written, the same encoding MDC Platform's archive tier uses. It's ciphertext under the base letters, never plaintext — the mapping is public, encryption is what actually protects it.

Get a build

PlatformArtifactSizeStatus
macOSApple Silicon libmdc_lite.dylib 348 KB tests passing Download →
Windowsx86_64, mingw-w64 ABI mdc_lite.dll 992 KB compiled, unrun Download →
Androidarm64-v8a — real devices libmdc_lite.so 376 KB linked, unrun Download →
Androidarmeabi-v7a — older devices libmdc_lite.so 252 KB linked, unrun Download →
Androidx86_64 — emulator libmdc_lite.so 484 KB linked, unrun Download →
iOS / watchOSrequires full Xcode to build — — build from source Instructions →
Wear OS — (uses Android .so) — same as Android Instructions →
Sourceany platform, cargo build mdc-lite-v1.2.0-source.tar.gz 19 KB build it yourself Download →

Every build above ships from a single tagged GitHub Release (checksums included) - not loose files browsed out of the repo tree. "Compiled, unrun" means the build succeeds and produces a correctly formatted binary, but couldn't be executed in the environment that built it — there was no Wine, Android emulator, or physical device on hand to run it against. Not a hedge: the full verification story, artifact by artifact, is in BUILD_INFO.md.

Five functions. That's the whole API.

use mdc_lite::LiteStore;

let key: [u8; 32] = /* from platform secure storage */;
let store = LiteStore::open("/path/to/store", key)?;

store.put("diary/2026-08-24", b"...")?;
let value = store.get("diary/2026-08-24")?;
store.exists("diary/2026-08-24");  // bool
store.delete("diary/2026-08-24")?;
let all_keys = store.list_keys()?;  // Vec<String>
#include "mdc_lite.h"

MdcLiteStore *store = mdc_lite_open("/path/to/store", key);

mdc_lite_put(store, "diary/2026-08-24", data, data_len);

uint8_t *out; size_t out_len;
mdc_lite_get(store, "diary/2026-08-24", &out, &out_len);
// ... use out[0..out_len) ...
mdc_lite_free_buffer(out, out_len);

mdc_lite_close(store);
// via the C header, bridged into Swift
let store = mdc_lite_open("/path/to/store", keyPtr)

mdc_lite_put(store, "diary/2026-08-24", valuePtr, valueLen)

var outPtr: UnsafeMutablePointer<UInt8>?
var outLen = 0
mdc_lite_get(store, "diary/2026-08-24", &outPtr, &outLen)
// ... Data(bytes: outPtr!, count: outLen) ...
mdc_lite_free_buffer(outPtr, outLen)

mdc_lite_close(store)
Product 2 of 2

MDC Platform

The server side of the project. Store AI models, images, documents and database tables together and work with them in plain sentences. No sentence ever becomes SQL: an LLM may propose what you mean, but a deterministic validator decides what reaches storage.

On this page: What it does Run it

In the docs: Installation Core concepts Agent state streams Encryption keys REST API Deployment

What it does

Plain sentences

Ask, don't query

Create, read, update, delete and analyse by asking. Ambiguous words are clarified, deletes are confirmed, and no sentence ever becomes SQL — a deterministic validator, not the language model, decides what reaches storage. Read more →

Object store

Any bytes, classified by content

AI models, images, documents, logs, tensors and tables are recognised from their content (not the filename) and tiered HOT / WARM / COLD / ARCHIVE. Read more →

AI models

One layer, not the whole checkpoint

A .safetensors file is parsed and every tensor stored and tiered on its own, so you can fetch a single layer without reading the rest. Read more →

DNA-inspired archive

Encrypted first, then A/C/G/T

The ARCHIVE tier seals data with AES-256-GCM, then writes it as base letters, with error correction and a corruption simulator. A software simulation — no physical DNA. Read more →

Databases and search

Unlimited, isolated, searchable

Create as many databases as you like, add typed tables, insert and browse — and find across every database and document at once. Read more →

Import

Bring a design, a CSV, a script

Attach a Markdown design document, CSV, SQL script, ER diagram or an MDC export. A SQL script is parsed, never run; nothing is written unless the whole file is valid, and nothing is overwritten. Read more →

Export

Take it out in the format you need

CSV, SQL, Excel, a design document with an ER diagram, or an MDC export file another instance can import. Exports are plain files — the sealing protects data inside MDC, not what you download. Read more →

Schema design

Describe the tables, confirm, done

Say create database shop with customers(name, email), orders(total decimal) or paste an ER diagram. MDC shows the design and creates it only when you reply yes. Read more →

Agent state streams

Event sourcing, rebuilt as of any time

An AI agent's state kept as a base plus timestamped events instead of an overwritten value, then rebuilt exactly as it was at any moment (model weights stay in the object store). Every record, including its times, is sealed per stream; a tampered or missing event is detected. Read more →

Deleting

Permanent, so it asks first

Drop a database or table, delete a row or stream. MDC says what would be lost and waits — a database needs its name typed — and anything but a yes cancels. The default database is protected. Read more →

Storage Explorer

A browser app with a chat panel

Browse by type, tier or database; preview, archive or delete objects; and chat — import with a paperclip, export with a download button. Read more →

API and access

Bearer tokens and four roles

A REST API for your own UI or NLU (RASA included): every route needs a token, and its role — viewer, editor, db_admin, admin — decides what it may do. Read more →

Monitoring

A port that keeps publishing

An optional second port serves CPU, memory and per-database statistics as Prometheus metrics, JSON and a live event stream, and can publish the same snapshots to Kafka for a dashboard or monitoring system. Read-only, off until you turn it on. Read more →

Deployment

Docker and Railway

A Dockerfile and Railway config with a health check and a persistent volume; the deployed Explorer asks for the API token. Read more →

Run it

You need Python. This starts the browser app (Storage Explorer) and the REST API on your own machine; Installation has the rest, and Deployment covers Docker and Railway.

# get it
git clone https://github.com/saji1970/ModelDB.git
cd ModelDB/mdc
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# the browser app and REST API at http://127.0.0.1:8000
python -m mdc serve

# or the conversational shell
python -m mdc

# an API token for your own app or NLU
python -m mdc token issue my-integration --role editor

Then ask it things: create database shop with customers(name, email), list models, find widget under 20000, create stream agent-1 with mood=calm. Every chat command →

Documentation and links

DOCS

mdc-lite

Embed it in an app.

MDC Platform

Run it as a server.

Both products: the DNA-storage whitepaper (what the DNA-inspired encoding is and isn't), and the repository.

On "quantum encryption"

BOTH PRODUCTS
WHAT IT ISN'T

Real QKD needs a fiber link

Quantum key distribution transmits photons between two fixed physical endpoints over dedicated hardware. It's a network-link technology — there's no version of it that runs inside an app on a phone or a watch.

WHAT IT IS

256-bit symmetric, already enough

Grover's algorithm only halves a symmetric key's effective strength — 256 bits stays enormous. Quantum computers threaten asymmetric crypto (RSA/ECC) instead, which neither product uses to protect data.

A DIFFERENT QUESTION

Can data itself be "stored as a quantum state"?

No — verified, not assumed. A qubit's superposition decoheres to a fixed, data-independent state in a handful of T2 lifetimes even with nobody reading it, confirmed by solving the Lindblad master equation in QuTiP against its exact analytic solution. There's no hardware today that holds a quantum state at rest the way a disk holds bits. Full derivation →