Open source Rust event store
FACTSTR
Free to use · Open source · Multiple store implementations

A lean event store built around facts, consistency context, and a shared runtime contract.

FACTSTR is the public face of the factstore project: an open-source Rust event store built around facts, append-only writes, conditional consistency checks, and multiple store implementations behind one shared contract.

Why this project

One contract. Multiple stores. Explicit semantics.

The project keeps the public runtime contract stable while different store implementations evolve underneath it. That makes behavior verifiable across memory and persistent backends without losing the core model.

Append-only event storage

Query-defined consistency context

Conditional append with typed conflict failure

Shared contract across multiple store implementations

Event-type and payload-predicate filtering

Reusable conformance tests for store behavior

Store support

Choose the store that fits the current stage of the system.

Available now

Memory Store

Fast in-memory runtime store for local work, tests, and simple integrations.

Available now

PostgreSQL Store

Persistent PostgreSQL-backed store behind the same shared contract.

Next step

File Store

Planned file-based storage for simple persistent deployments without a database server.

Scope boundary

Current focus

The current repository keeps the implemented scope narrow so the contract and store behavior stay clear.

Core semantics

Behavior is explicit, not hidden behind a backend.

FACTSTR is shaped around append-only facts, clear query behavior, and conflict detection based on consistency context. The goal is a runtime contract that stays understandable while remaining useful across store implementations.

Global monotonically increasing sequence numbers
One committed batch receives one consecutive sequence range
Queries return events ordered by ascending sequence number
Conditional append checks the full conflict context
Query results separate returned rows from full matching context
Workspace

Small, clear workspace structure.

factstore

Shared runtime contract crate

factstore-memory

Publishable in-memory store

factstore-postgres

Publishable PostgreSQL store

factstore-conformance

Reusable semantic test support

Origin

Built on an earlier TypeScript event store created with Ralf Westphal.

Before FACTSTR in Rust, the underlying ideas were already explored in a TypeScript implementation built together with Ralf Westphal. That earlier project includes optimistic locking, payload-based querying, real-time subscriptions, and projection-oriented usage.

What carried forward

Context-specific consistency instead of broad aggregate-style locking.
Event filtering and payload-based query semantics as part of the public model.
A strong focus on runtime behavior that stays explicit across store implementations.
Concepts Behind This

Further reading on the ideas behind FACTSTR.