LibreDB Studiolibredb.org ONLINE • PostgreSQL
RUN
architecture.sql
SELECT layer, role FROM architecture;
3 rows |2 cols3ms

One core, three lenses

LibreDB follows the FoundationDB pattern: one small ordered key-value core, with thin model lenses on top.

kv

the proof

The ordered key-value core, usable directly. A durable, ordered, string-keyed map — the thinnest possible lens.

document

the differentiator

Collections of JSON documents under string ids, with by-id CRUD and an in-engine find() predicate.

relational

the reach

Schema-validated typed tables with where / select / join — a relational view, deliberately not a SQL engine.

        kv      document      relational      ← lenses (open edge)
         \         |             /
          \        |            /
           +--------+----------+
                    |  one narrow transact() port
        ============|=====================  TRUST BOUNDARY
                    |
              core.ts  ← the kernel (guarded)
              ordered KV · txns · WAL · recovery
                    |
              FileSystem seam (node:fs, or SimFS for crash tests)

The file boundary is the trust boundary

Below the line — guarded

core.ts is where data can be corrupted, so every line passes heavy review and deterministic crash tests. It stays small because it is genuinely minimal.

Above the line — open

Lenses, query surface, and catalog are open and fast to contribute to — the worst a bug can do is present a bad view; it reaches the store only through one narrow port.

The WAL is the database

Most databases keep a write-ahead log separate from data files. LibreDB does not: the file you openis the sequence of every committed transaction, replayed into an in-memory sorted array on open. No separate data file, no buffer pool — the same lineage as Redis AOF mode. Two boxes instead of three, which is how the kernel stays small enough to understand.

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.