Minigraf
v2.0.1

Minigraf documentation

Minigraf is a tiny, portable bi-temporal graph database with Datalog queries: embedded, single-file, with time travel. These docs cover every release from v2.0.0 on. Pick a version at the top of the page; What changed compares two versions.

Tutorials#

A step-by-step introduction to Minigraf's Datalog dialect, driven by a real-world e-commerce storyline. Each section builds on the last.

Cookbook#

Problem-oriented recipes for common Minigraf patterns. Each recipe is self-contained: a one-line problem statement, the Datalog (or Rust API where needed), and brief notes.

Pages#

  • Datalog Reference — Complete syntax reference: facts, queries, recursive rules, bi-temporal operators, value types, and the EDN command syntax
  • Time travel visualizer — Browser app that draws a database's history over transaction time and valid time. Cookbook recipes and tutorial sections link to it with their data already loaded.
  • Architecture — Module structure, EAV data model, file format (v7), WAL layout, storage internals, and cross-platform workspace crates
  • Use Cases — Detailed guides for the three primary deployment targets: AI agents, mobile apps, and WASM/browser
  • Comparison — Side-by-side comparison with XTDB, Cozo, Datomic, GraphLite, petgraph, IndraDB, SurrealDB, and time-series databases; temporal vs. time-series explainer
  • Learning Resources — Curated links for Datalog, temporal databases, and SQLite internals
  • Performance Tuning — cost model, configuration knobs, query patterns, and benchmark reference

Packages#

PlatformPackage
Rustcrates.io/crates/minigraf
Browser WASM@minigraf/browser on npm
WASI (Node.js)@minigraf/wasi on npm
Node.jsminigraf on npm
Pythonminigraf on PyPI
Java/JVMminigraf-jvm on Maven Central
Androidminigraf-android on Maven Central
iOS / macOSSwift Package Manager: minigraf-swift
Cminigraf-c releases
How this page was assembled

This page is 8 fragments. Minigraf picked them from docs.graph with this query, where the version is a point on the valid-time axis:

(query [:find ?order ?blob ?added :valid-at "2002-01-01T00:00:01Z" :where [?f :frag/page "home"] [?f :frag/order ?order] [?f :frag/blob ?blob] [?f :frag/added-in ?added]])

Run it in the query console