A database that lives everywhere you do.

Hydra is an open-source, content-addressed, encrypted block store that syncs across devices over peer-to-peer connections.

Block-DAG structure

Data is organized as a directed acyclic graph of content-addressed blocks. Each block is immutable and verifiable by its hash.

Content-addressed

Every piece of data has a unique address derived from its content. Deduplication, integrity verification, and caching are automatic.

Encrypted at rest

Blocks are encrypted before storage. The backend sees only opaque ciphertext. Swap storage providers without re-encrypting.

Multi-backend

Store blocks on local disk, S3, IndexedDB, a Raspberry Pi, or any combination. Backends are pluggable and composable.

Cross-platform

Runs in browsers (WASM), on desktops (native), and on embedded devices. Same API, same data format, everywhere.

Sync protocol

Devices exchange only the blocks they need. Bloom filters and set reconciliation minimize bandwidth. Works over any transport.

Get started in Go

main.go
import (
    "github.com/s4wave/spacewave/db/volume"
    "github.com/s4wave/spacewave/db/block"
)

// Open a volume backed by local disk.
vol, err := volume.Open(ctx, "/data/hydra")
if err != nil {
    return err
}
defer vol.Close()

// Write a block.
data := []byte("hello, hydra")
blk := block.NewBlock(data)
if err := vol.PutBlock(ctx, blk); err != nil {
    return err
}

// Read it back by content address.
got, err := vol.GetBlock(ctx, blk.Cid())
// got.Data() == "hello, hydra"
go get github.com/s4wave/spacewave/db@latest

Used in Spacewave

Hydra is the storage engine behind every Spacewave Space. Files, notes, chat history, and plugin data all live in Hydra volumes.

Spacewave Drive, Notes, and Chat are all built on top of Hydra's block-DAG primitives. The same library that powers Spacewave is available for your projects.