# khonsulabs/bonsaidb

A developer-friendly document database that grows with you, written in Rust

Repository: https://github.com/khonsulabs/bonsaidb
Canonical: https://ross.abutalabs.com/products/bonsaidb
Homepage: https://bonsaidb.io/
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, database
Last push: 2024-07-25T15:52:08+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 1992, "days_push": 769, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1061, forks 38 (observed 2026-08-28T04:03:25.854352+00:00)

## What it is
BonsaiDb is a developer-friendly document database written in Rust, inspired by CouchDB, offering ACID-compliant transactional collections, map/reduce views, and an atomic key-value store. It can run as an embedded local-only database or as a networked server over QUIC or WebSockets, with RBAC, at-rest encryption, and backup/restore built in.

## Use cases
- embed a document database directly in a Rust application
- store JSON-like documents with ACID transactions in Rust
- run a self-hosted document database server accessible over the network
- build map/reduce indexes and keyword search over collections
- replace Redis-like key-value storage with configurable persistence
- define database schemas as Rust types checked at compile time

## When to choose
- you're building a Rust application and want an embedded, no-setup document database
- you need ACID-compliant document storage with typed schemas in Rust
- you want a database that scales from local-only to networked client/server with the same API
- you want built-in RBAC, encryption at rest, and pub/sub without extra services

## When to avoid
- you need production-grade guarantees — the project is explicitly alpha with possible data-loss bugs
- your workload is very write-heavy — known transactional write performance issues exist
- you need a battle-tested database with a large ecosystem and community support
- you need distributed clustering — it is not yet available

## Facets
- artifact type: library
- maturity: experimental
- function: database, caching, auth, authorization, search-engine, cryptography
- domain: databases, backend, developer-tools, web-development
- platform: rust, cross-platform, self-hosted
- tags: document-database, acid-transactions, key-value-store, map-reduce-views, couchdb-inspired, embedded-database, quic, rbac, schema-as-code

## Member repositories
- khonsulabs/bonsaidb (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:25.854352+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:56:51.266168+00:00, confidence not recorded.
  - readme: https://github.com/khonsulabs/bonsaidb (fetched 2026-08-28T04:03:25.854352+00:00, sha 32668412564a)
  - homepage: https://bonsaidb.io/ (fetched 2026-08-29T12:58:38.923872+00:00, sha a8716a6d538b)
  - site_page: https://bonsaidb.io/about (fetched 2026-08-29T12:58:38.932949+00:00, sha ba26433c6ba7)
  - site_page: https://dev.bonsaidb.io/release/docs/bonsaidb (fetched 2026-08-29T12:58:38.934960+00:00, sha 7f4f4b867dcb)
  - site_page: https://dev.bonsaidb.io/release/guide/about/concepts/collection.html (fetched 2026-08-29T12:58:38.936818+00:00, sha 9a15ad651277)
  - site_page: https://dev.bonsaidb.io/release/guide/about/concepts/view.html (fetched 2026-08-29T12:58:38.938571+00:00, sha b48677b99587)
  - site_page: https://dev.bonsaidb.io/release/guide/about/access-models/custom-api-server.html (fetched 2026-08-29T12:58:38.940386+00:00, sha bcf9827ea001)
  - registry_crates: https://crates.io/api/v1/crates/bonsaidb (fetched 2026-08-29T12:58:38.942057+00:00, sha 493675ba4dde)
- Data as of 2026-08-30T08:39:29.467469+00:00.
