factum

Java Framework · Core

Apache-2.0

Event sourcing that feels like Spring.

The full loop — event store, projections, durable workflows, timers, outbox — on one PostgreSQL database. No proprietary server. Apache-2.0, free forever, including production persistence.

~410/sec
commands per context at the concurrent plateau — the real read-fold-decide-append-project-commit path
15 min
to a working event-sourced entity with a same-transaction projection, from one starter dependency
L0–L3
layered API — every convenience compiles down to a public lower layer, so you never hit a wall
No broker
required for the dev loop — the full loop runs on one Postgres database you already run

Architecture

A decision is
a pure function.

A command and the state folded from replayed history in, new events or a rejection out — no framework types, no database calls. Events append with decision-scope optimistic concurrency: valid only if nothing matching what was read has appeared since, otherwise the runtime re-reads and re-decides.

Most Spring Boot teams hand-build the same infrastructure — an outbox, a dedup table, a state machine, an audit trail that drifts. Factum's bet: record every business decision as an immutable event, and make that record the system of truth. The rest falls out.

Follow the 15-minute path →
Order.java
@EventSourcedEntity(tag = "order")
class Order {
 
    private boolean placed;
 
    @Decide
    List<Object> handle(PlaceOrder cmd) {
        if (placed) throw new AlreadyPlaced(cmd.orderId());
        return List.of(new OrderPlaced(cmd.orderId(), cmd.totalCents()));
    }
 
    @Evolve
    void on(OrderPlaced e) { placed = true; }
}

The mechanism

Record the decision. Derive everything else.

Zero-server on PostgreSQL

The full loop — event store, projections, workflows, timers, outbox — runs on one Postgres database you already run. No proprietary server, and no broker for the dev loop.

store: PostgreSQL — the event store

Dynamic Consistency Boundaries

Tag-based optimistic concurrency scoped to what a decision actually reads — the classic aggregate is just the special case of one tag.

concurrency: Dynamic Consistency Boundaries (DCB)

Durable workflows on the journal

Workflow-as-code on a virtual thread; the journal is ordinary tagged events in the same Postgres store — projectable with SQL.

workflows: journaled as ordinary tagged events

Change without fear

Events evolve by upcasting instead of rewriting history, and projections rebuild from the journal as a routine operation. Every convenience compiles down to a public lower layer — starter, annotations, functional core, plain Spring.

Drop a layer, never hit a wall.
Every decision on the record.
factum — Latin: a thing done; a deed

Product Guide

Factum Framework — Product Guide

Event sourcing that feels like Spring.

For business and technical architecture teams

Download the guide

Factum Framework license

Apache-2.0
source
open — github, no gate
production use
free forever, all features
fee
none

The framework and the Factum commons libraries are permissively licensed for good. The commercial products build on this foundation.

How Factum licensing works →

Start on the golden path.

A working event-sourced entity with a same-transaction projection in under 15 minutes, on the stack you already run.