Skip to content

FACTSTR

crates.io npm

FACTSTR is a Rust event store built around append-only facts, command context consistency, committed-batch streams, and durable replay.

It helps applications keep decisions local to the facts that matter, append new facts safely, and build query models from committed batches without introducing aggregate-first structure.

What You Can Use

FACTSTR currently provides:

  • a Rust contract crate: factstr
  • store implementations for Memory, SQLite, and PostgreSQL
  • live streams with committed-batch delivery
  • durable streams for replay and catch-up
  • Node.js bindings and TypeScript types through @factstr/factstr-node

Why It Matters

Use FACTSTR when you want:

  • append-only facts instead of mutable domain state as the source of truth
  • command context consistency instead of aggregate-centric locking
  • explicit sequence numbers and ordered reads
  • projections that can replay and continue after restart
  • an embedded SQLite option before introducing external infrastructure
  • a PostgreSQL option when the application already runs PostgreSQL

Install

Rust

[dependencies]
factstr = "0.4.1"
factstr-sqlite = "0.4.1"

Memory and PostgreSQL stores are also available through factstr-memory and factstr-postgres.

Node.js and TypeScript

npm install @factstr/factstr-node

The Node.js bindings currently expose the Memory, SQLite, and PostgreSQL stores. PostgreSQL requires a database URL.

Start Here