MCPcopy Index your code
hub / github.com/dialog-db/dialog-db

github.com/dialog-db/dialog-db @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
5,135 symbols 18,639 edges 469 files 1,643 documented · 32%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Dialog DB

License Tests

Dialog DB

The world is divided into word-processing, spreadsheet, database and other applications. Computers are hierarchical. We have a desktop and hierarchical files which have to mean everything.

Right now you are a prisoner of each application you use. You have only the options that were given you by the developer of that application.

All of this is phoney. It is a system of conventions that have been established and we can have better conventions.

- Ted Nelson, Visionary lays into the web

Dialog is an embeddable database designed for local-first software.

It has (or aims to have) the following properties:

  • Schema-on-read via an expressive Datalog-esque query API
  • Efficient synchronization across replicas
  • Support for both Web Assembly and native runtime environments
  • Emphasis on data privacy and user-centered authority

Status: Experimental

Dialog is in active development and should be considered experimental in nature.

Expect fundamental details to break over time (binary encoding, index construction etc.). At this stage, we cannot offer any promise of a path to migrate old versions of the database forward as breaking changes are landed.

Project Layout

  • ./rust: the core implementation of Dialog.
  • ./typescript: packages for using Dialog in TypeScript and/or React.
  • ./adr: architectural design records
  • ./notes: informal notes about Dialog or adjacent topics

Getting Started

This project encodes a comprehensive development environment via Nix flakes. If you have Nix installed, you can drop into a shell with all the tools you need to build and modify Dialog using the following command:

nix develop

From a suitable development environment, you can build using standard Rust and Node.js tooling. For example: cargo test will run the full Rust test suite for your native target.

License

This project is licensed under the Mozilla Public License 2.0.

Extension points exported contracts — how you extend this code

When (Interface)
Trait for types that can be converted into a When collection This trait enables ergonomic rule definitions by allowing [15 …
rust/dialog-query/src/rule/when.rs
Principal (Interface)
An entity identified by a [DID]. Implemented by anything that has a DID — key types, signers, DID documents, etc. Does [11 …
rust/dialog-varsig/src/principal.rs
Attenuation (Interface)
Trait for constraints that narrow the ability path. Attenuation implies [`Policy`] via blanket impl. The `attenuation() [17 …
rust/dialog-capability/src/attenuation.rs
Statement (Interface)
A domain-level write operation that can be asserted or retracted. Types like concept structs and attribute expressions [6 …
rust/dialog-artifacts/src/artifacts/update.rs
Selectable (Interface)
A trait for types that can be selected from [`Ipld`] [5 implementers]
rust/dialog-ucan-core/src/delegation/policy/selector/selectable.rs
FromUcanArgs (Interface)
Maps an execution effect type to its attenuation type that can be reconstructed from UCAN args. The `Attenuation` assoc [5 …
rust/dialog-remote-ucan-s3/src/authorizer.rs
Distribution (Interface)
Strategy for assigning ranks to keys. The distribution decides which keys become node boundaries, and thereby the shape [5 …
rust/dialog-search-tree/src/distribution.rs
Provider (Interface)
(no doc) [83 implementers]
rust/dialog-common/src/helpers.rs

Core symbols most depended-on inside this repo

clone
called by 989
rust/dialog-diagnose/src/promise.rs
to_vec
called by 351
rust/dialog-ucan-core/src/collection.rs
attenuate
called by 345
rust/dialog-capability/src/subject.rs
clone
called by 309
rust/dialog-storage/src/storage/transactional_memory.rs
iter
called by 303
rust/dialog-query/src/schema.rs
did
called by 221
typescript/dialog-experimental/src/session.ts
perform
called by 212
rust/dialog-query/src/attribute/query/all.rs
perform
called by 212
rust/dialog-capability/src/fork.rs

Shape

Function 2,169
Method 2,043
Class 612
Interface 160
Enum 151

Languages

Rust99%
TypeScript1%

Modules by API surface

rust/dialog-query/src/concept/descriptor.rs80 symbols
rust/dialog-ucan-core/src/delegation/policy/predicate.rs77 symbols
rust/dialog-query/src/term.rs77 symbols
rust/dialog-query/src/type_system.rs75 symbols
rust/dialog-ucan-core/src/invocation.rs72 symbols
rust/dialog-ucan-core/src/delegation/policy/selector/filter.rs72 symbols
rust/dialog-search-tree/src/differential.rs72 symbols
rust/dialog-repository/src/repository.rs69 symbols
rust/dialog-query/src/concept.rs61 symbols
rust/dialog-search-tree/src/tree/transient.rs57 symbols
rust/dialog-search-tree/src/tree.rs54 symbols
rust/dialog-query/src/attribute.rs48 symbols

For agents

$ claude mcp add dialog-db \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact