LibreDB Studiolibredb.org ONLINE • PostgreSQL
RUN
manifesto.sql
SELECT principle, stance FROM manifesto;
6 rows |2 cols2ms
Pre-alpha · open source (MIT)

The embedded, multimodal databaseyou can read in one sitting.

Multi-model without the magic.One core, three lenses, every line tested. A small, readable, embeddable database in TypeScript — built on one idea: a database can be powerful and still be understood by opening its source.

Competes with the database textbook and the "I'll just use a Map for now" hack — not with Postgres.

The database you read, learn from, hack on, and embed fast.

What we are building

Strength comes not from what we add, but from what we deliberately refuse.

Simple

Against the database experience that forces you into a giant ORM, an admin panel, and a vendor ecosystem just to manage your own data. Not at war with ORMs — at war with being forced into one.

No magic

The query is visible. The schema is visible. Errors are not hidden. Plans are explained. No unnecessary veil between data and developer.

Readable

Small enough to read in one sitting. The kernel is under 600 lines. Readability is not marketing — it is a design constraint.

Embeddable

bun add @libredb/libredb and go. Zero runtime dependencies, in-process, nothing else to install or run.

Multi-model

One ordered key-value core; key-value, document, and relational are thin lenses over it — not three engines bolted together.

Reliable

Readable does not mean toy. Every line of the core is tested; crash recovery is proven by deterministic simulation testing.

Embed it in an afternoon

The same database speaks all three lenses — here they are in one file.

bun add @libredb/libredb

import { open, kv, doc, table } from "@libredb/libredb";

// In-memory for tests, or open({ path: "data.libredb" }) for a durable file.
const db = open();

// 1. Key-value — a durable, ordered, string-keyed map.
kv(db).set("user:1", "Ada");

// 2. Document — a collection of JSON documents.
doc(db, "logs").put("l1", { level: "info", at: 1 });

// 3. Relational — a schema-validated, typed table.
const users = table(db, "users", {
  primaryKey: "id",
  columns: { id: "string", name: "string", age: "number" },
});
users.insert({ id: "1", name: "Ada", age: 36 });
users.where({ name: "Ada" }).select("id", "age").toArray();

One core, three faces

LibreDB Database is the plain core of data. LibreDB Studio is the understandable face of data. LibreDB Platform is the manageable form of data for teams. All three speak the same spine.

Want to see it live? LibreDB Studio opens with a ready-to-use LibreDB sample — all three lenses, zero setup.

Pre-alpha — not production ready

LibreDB is early (0.0.x). The architecture is in place and every line of the core is tested, but the API may still change and it is not yet meant for production data. Star it, follow along, and help shape it.