DocumentForge gives you JSON documents, SQL queries, and persistent indexes in a single dependency-free package — then scales the same engine out to replication and consistent-hash sharding, with a visual control plane to drive the whole thing.
Schema-free documents stored as compact BSON, with nested paths, arrays, joins, aggregations and composite indexes — all through a familiar SQL surface.
A mainframe-inspired direct-address location map turns an indexed point lookup into a single seek — 210K queries per second, sustained, on a laptop.
A write-ahead log with a CRC32 per record, page checksums verified on every read, and automatic replay of uncommitted writes on startup.
Logical replication with auto-failover and zero-loss planned handover; consistent-hash sharding that adds a node without re-routing everything.
One NuGet package in-process, or one self-contained binary behind an HTTP API. Nothing to install on the target machine.
Studio: browse data, run SQL, watch node health, and design an entire cluster on a drag-and-drop canvas that exports a router config.
Embed it, serve it, or query it with LINQ — the storage engine and query language are identical.
Embedded in .NET
using DocumentForge.Engine; using var db = DocumentForgeDb.OpenOrCreate("app.dfdb"); db.Insert("orders", """{ "pnr": "ABC123", "total": 420.50 }"""); db.CreateIndex("orders", "pnr", "idx_pnr", unique: true); var result = db.Execute("SELECT * FROM orders WHERE pnr = 'ABC123'");
SQL over nested JSON
SELECT passenger.lastName, fare.total FROM orders WHERE status = 'TICKETED' AND fare.total > 1000 ORDER BY fare.total DESC LIMIT 50;
Or the same engine behind HTTP
# one binary — run a node and query it over HTTP dfdb serve --port 5000 --data-dir ./data curl -X POST localhost:5000/query \ -d '{"sql": "SELECT COUNT(*) FROM orders"}'
Studio turns operating DocumentForge into something you can see. Wire replication between databases, claim them into shard rings, and the canvas writes the router cluster.json for you.
Drag → wire → export. Red links claim a database into a shard ring; blue links wire leader→follower replication. The canvas exports the exact cluster.json the router runs.
Unique, composite and nested-path indexes that survive restart — no rebuild on startup, and they self-heal if the catalog is damaged.
Index and query deep structure like passenger.lastName or flights[0].from directly.
Query across collections, with COUNT/SUM/AVG/MIN/MAX and GROUP BY.
Strongly-typed queries — Where(o => o.Pnr == "ABC") — over the same documents, with consistent camelCase JSON.
Documents larger than a page are transparently chained — no hard size cliff.
Every change is logged with a CRC32 before pages are touched; uncommitted writes replay on startup.
Silent corruption is caught on every read, not months later.
Monotonic sequence numbers, catchup on reconnect, heartbeats, and automatic follower promotion.
Add a shard without re-routing all data; replicated reference collections keep joins local.
One process hosts many attached databases, LocalDB-style, each with its own cache, WAL and indexes.
dfdb does it all: serve, repl, query, seed, router, cluster, health, rebalance.
Design a cluster on a canvas, export cluster.json, and spawn the router — without hand-editing config.
Go from "found the site" to your first query in under five minutes.