Skip to content

goatplatform/goatdb

Repository files navigation

GoatDB Logo


GoatDB: Embedded, Distributed, Document Database

📚 Documentation • ⚡ Benchmarks • 💬 Discussions • 👋 Discord • 🔴 Reddit

Tests CLA assistant

GoatDB is an embedded, distributed document database that prioritizes speed and developer experience. Build real-time collaborative apps that work offline.

Inspired by distributed version control systems, GoatDB brings Git-like features to databases: cryptographically signed commits, three-way merges, and automatic conflict resolution. TypeScript-first with React hooks included.

What makes GoatDB different?

  • Works offline: Changes sync automatically when reconnected
  • Instant UI updates: Local changes are instant, no loading states
  • Smart conflict resolution: Git-style three-way merge for live data
  • Self-healing: Clients can restore crashed servers from the commit graph

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.

Quick Start

Install in Deno (recommended):

deno add jsr:@goatdb/goatdb

Basic Usage

import { GoatDB } from '@goatdb/goatdb';
const db = new GoatDB({ path: './data', peers: ['http://10.0.0.1'] });
const item = db.create('/todos', { text: 'Hello, GoatDB!', done: false });
item.set('done', true);

React Integration

GoatDB includes React hooks for real-time, offline-capable UIs. See the React documentation.

See the tutorial for more examples.

Contributing

We welcome contributions! Fork, make changes, and submit a PR. For local development:

deno run -A jsr:@goatdb/goatdb/link link ./path/to/goatdb

License

GoatDB is licensed under the Apache 2.0 License.

Sponsor this project

 

Packages

No packages published

Contributors 5