No description
Find a file
Patrick Jackson 05e053c1b1
Some checks failed
Nix / Lint (push) Failing after 1m42s
Nix / Doc (push) Successful in 29m24s
Nix / Test (push) Successful in 1m15s
Nix / Test Backends (inmemory) (push) Successful in 6m56s
Nix / Test Backends (postgres) (push) Successful in 12m17s
Nix / Coverage (inmemory) (push) Successful in 6m57s
Nix / Coverage (postgres) (push) Successful in 3m20s
Nix / Coverage (sqlite) (push) Successful in 3m52s
Nix / Sanitize (asan) (push) Successful in 1m4s
Nix / Sanitize (lsan) (push) Successful in 59s
Nix / Artifacts (push) Has been skipped
docs(book): add CLI reference page
2026-02-24 07:42:03 -08:00
.config feat(lint): add actionlint, hadolint, markdownlint, gitleaks to lint infrastructure 2026-02-09 20:40:24 -08:00
.forgejo ci: reorganize GitHub Actions into job-type workflows 2026-02-13 11:32:21 -08:00
.github ci(deps): use PAT for dependency update PRs to trigger CI workflows 2026-02-23 15:49:35 -08:00
crates feat(bin): replace health command host/port with single URL argument 2026-02-24 07:42:03 -08:00
docs docs(book): add CLI reference page 2026-02-24 07:42:03 -08:00
examples refactor(auth): simplify Database::create to own auth bootstrapping 2026-02-18 14:42:36 -08:00
nix fix(nix): use explicit nightly toolchain in dev-shell and coverage runner 2026-02-13 00:01:56 -08:00
.dockerignore chore: remove Taskfile in favor of just 2026-02-05 00:53:41 -08:00
.gitignore chore: install Renovate for dependency management 2025-11-05 11:34:06 -08:00
.prettierignore docs: initialize mdbook 2025-05-01 23:42:24 -07:00
.rustfmt.toml style: standardize Rust formatting with edition 2024 2025-09-07 10:06:47 -07:00
Cargo.lock feat(auth): introduce crypto-agile PublicKey and PrivateKey enum types 2026-02-18 14:42:36 -08:00
Cargo.toml feat(auth): introduce crypto-agile PublicKey and PrivateKey enum types 2026-02-18 14:42:36 -08:00
deny.toml chore: remove stale cargo-deny exception 2026-02-05 09:43:21 -08:00
Dockerfile build(docker): integrate cargo-chef for cached dependency layers 2026-02-19 13:21:16 -08:00
flake.lock chore(deps): update nix flake deps 2026-02-04 23:49:35 -08:00
flake.nix fix(nix): use explicit nightly toolchain in dev-shell and coverage runner 2026-02-13 00:01:56 -08:00
justfile feat(lint): add actionlint, hadolint, markdownlint, gitleaks to lint infrastructure 2026-02-09 20:40:24 -08:00
LICENSE.txt chore: use AGPL license 2025-05-23 12:59:35 -07:00
README.md fix(readme): update build badge to use tests.yml workflow 2026-02-18 14:34:37 -08:00

Eidetica

build coverage license

Remember Everything. Everywhere. All at once.

I wanted to search my email, so I started by building a decentralized database.

It made sense at the time...

Eidetica will allow you to write a local-first, peer-to-peer, decentralized application just by storing your data here. An app developer does not need to deal with anything else, just use the database interface provided here to store data, add a user flow to initialize sync and "login" to the network, and everything else will be handled for you.

It's not quite all there yet, but I'm working on it. Peer-to-Peer connectivity is only minimal at the moment.

Extensive, but largely LLM Generated/Human Curated documentation is maintained under docs/ and hosted on github.io.

Blog posts that I've written about Eidetica: https://jackson.dev/tags/eidetica/

Discuss on Matrix:

EXPERIMENTAL

Everything is still experimental, and very much in-development. That includes the underlying storage format, which is still GUARANTEED to change between now and declaring 1.0.

No backwards compatibility OR MIGRATION PATH is guaranteed before 1.0.

Vision

  • Peer-to-Peer Database, built on top of layered Merkle-CRDTs
  • Direct connections using iroh
  • Multi-transport sync (HTTP + Iroh P2P simultaneously)
  • Decentralized Authentication
  • Built in Rust for native compilation and broad platform support
  • Efficient Sync with a data model aware API (TODO)
  • P2P Object Storage across the same sync network (TODO)
  • Sparse and Shallow views with 0 extra overhead (TODO, data model already supports)
  • WASM for embedding it into webapps (TODO)

This is an attempt to combine a few successful decentralized approaches into something more unified, suitable for a storage layer of the decentralized web. There are a few synergies that I am taking advantage of to make each component work together efficiently, so it is more valuable to co-design the Sync API, Storage format, Authentication scheme, etc.

I wanted this for a different project and wasn't able to find something with everything I wanted, so here we are.

Eidetica lets you make a decentralized app, so long as you store your DB (and eventually, Objects), in the storage format here. It manages storage, authentication, sync, conflict resolution, and encryption. Future work includes better peer sync and discovery, user management, sparse checkouts, and many more features.

Contained here are both a library suitable for embedding in your own applications and a binary that will be a hostable multi-user synchronization node.

Under the hood it uses the Merkle-CRDT concept pioneered by OrbitDB to create an eventually consistent database by providing a total ordering of database operations to a CRDT, and extends it by layering multiple DAG's into the underlying structure. This does have downsides, and it is not suitable for all applications, but I think I can take the concept quite far by extending that architecture out into the rest of the system.

OrbitDB relies on IPFS and libp2p to sync, but by writing custom synchronization protocols that understand the data structures I expect that there are large efficiency gains to be had.

The library is extremely modular. It is simple to define your own CRDT, your own custom Backend, even your own transport layer if you need to support Bluetooth/Zigbee/etc communication.

See the docs/ for a user guide, examples, internal architecture, and full design docs explaining design decisions.

Data Model

The user facing data model is intentionally designed to match existing Databases closely.

  • Database - The fundamental unit of authentication, synchronization, and storage.
  • Store - Part of a Database, think "Table" but more general.
  • Transaction - An Atomic Operation across any number of Stores in a Database.

Stores can be any CRDT, even user defined. At the moment Eidetica provides a Doc type that is a generic nested Document type, a Table that functions as a NoSQL-ish Table for any data you want, and a PasswordStore that wraps any store with transparent password-based encryption. Behind a feature flag is also a wrapper for the popular Y-Doc CRDT type. This can be extended with more custom types to match user patterns.

Provided data types all use Last-Write-Wins conflict resolution, but facilities for other strategies will be provided.

A Transaction can operate across multiple Stores, so you can synchronize your changes to multiple Tables/Docs/etc.

Eventually, you will be able to sparsely checkout just particular Stores within a Database while still being able to locally verify the full history, and shallow checkout the current state from the network.

Contributing

At this time, outside contributions will not be accepted due to licensing considerations.

Repository

Mirrored on GitHub and Codeberg.

For practical reasons GitHub is the official repo, but use either repo to contribute. Issues can't be synced so there may be some duplicates.