📚 Documentation • ⚡ Benchmarks • 💬 Discussions • 👋 Discord
GoatDB is the realtime state layer for human-agent collaboration: humans, AI agents, tools, and devices share the same live, durable state. Under the hood it is an embedded, distributed document database providing verifiable state continuity — TypeScript-first, with React hooks included.
Inspired by distributed version control systems, GoatDB brings Git-like features to databases: cryptographically signed commits and deterministic structural merges. In secure mode (default), every write produces a signed commit in a durable commit graph—the authoritative source of repository state.
What makes GoatDB different?
- Works offline: Full local replicas of each opened repository; changes sync automatically when reconnected
- Reactive local reads: Queries run in memory, update incrementally as data changes
- Structural merge: Git-style three-way merge at the field level for concurrent edits
- Signed provenance: In secure mode (default), every commit is signed with Ed25519; verify which session wrote what — GoatDB proves the session key, not actor identity
- Bounded recovery: An available authorized replica retaining relevant history can restore a crashed server
See the Architecture page for the full architecture and current network topology.
GoatDB is under active development. Star ⭐️ our project if you like the approach!
Warning
Please keep in mind that GoatDB is still under active development and therefore full backward compatibility is not guaranteed before reaching v1.0.0. For more details, see the FAQ.
Deno (recommended):
deno add jsr:@goatdb/goatdb
deno run -A jsr:@goatdb/goatdb init # scaffold a new projectNode.js (24+):
npx jsr add @goatdb/goatdb
npx -y @goatdb/goatdb init # scaffold a new projectimport { DataRegistry, GoatDB } from '@goatdb/goatdb';
const kSchemaTask = {
ns: 'task',
version: 1,
fields: {
text: { type: 'string', required: true },
done: { type: 'boolean', default: () => false },
},
} as const;
DataRegistry.default.registerSchema(kSchemaTask);
const db = new GoatDB({ path: './data' });
await db.readyPromise();
const item = db.create('/data/todos', kSchemaTask, {
text: 'Hello, GoatDB!',
});
item.set('done', true);GoatDB includes React hooks for reactive, offline-capable UIs. See the React documentation.
See the tutorial for more examples.
We welcome contributions! See the contributing guide for setup instructions and guidelines.
GoatDB is licensed under the MIT License.