GoatDB: An Embedded, Distributed, Document Database

📦 Installation • 🚀 Tutorial • ❓ FAQ⚡ Benchmarks • 💬 Discord

GoatDB is an embedded, distributed, document database that prioritizes speed and developer experience. It excels at real-time collaboration and embedded caching applications.

Instead of following traditional database design patterns, GoatDB leverages concepts refined over decades by distributed version control systems. These are enhanced with novel algorithms (bloom filter-based synchronization and ephemeral CRDTs) for efficient synchronization and automatic real-time conflict resolution.

Currently optimized for JavaScript environments, GoatDB functions as a first-class citizen in both browsers and servers. It utilizes a document model with schemas, providing causal eventual consistency to simplify development while offering built-in optional cryptographic signing for the underlying commit graph.

GoatDB implements incremental local queries, leveraging its version control internals to efficiently process only changed documents.

GoatDB employs a memory-first design and a different scaling approach than traditional databases. Rather than growing a single large database, it uses application-level sharding with multiple medium-sized repositories that sync independently. Each user or data group has its own repository, enabling horizontal scaling and efficient client-server synchronization. This architecture provides natural scalability for multi-user applications without complex manual sharding.

Items in GoatDB are defined alongside their schema. Schemas dictate both the field types and their conflict resolution strategy. Schemas are themselves versioned, making rolling schema updates via branches a natural mechanism.

If you like what we’re building, please star ⭐️ our GitHub project. We really appreciate it! 🙏

Getting Started

Example Projects

Explore projects built with GoatDB:

  • Todo: A minimalist, modern, todo list app specifically designed for self hosting.

  • EdgeChat: A demo of a ChatGPT-like interface that runs completely in the browser, no network connection needed.

  • Ovvio: A productivity suite that has been powered by GoatDB in production since January 2024.

License

GoatDB is licensed under the Apache 2.0 License.