Tech USP: Every change to an entity is an event on an aggregate stream. History, time travel and rebuild are part of the framework, you don’t build them.
Buyer’s view: Who changed the record on March 12 at 14:32? One query. The same history serves ISO 27001 audits, GDPR access requests and internal reviews on demand instead of in a sprint.
What this means in practice
In Kumiko, a write handler doesn’t write directly to a table, it emits an event:
r.writeHandler({
name: "incident.open",
schema: openIncidentSchema,
handler: async (event, ctx) => {
await ctx.events.append("incident-opened", {
incidentId,
title: event.title,
severity: event.severity,
});
},
});
The event lands in the events table (Postgres, no Kafka). The read-model table (incidents) is built from it via projection, synchronously in the same transaction. Read-after-write “just works”.
What you get for free
The full history as a framework primitive
const events = await ctx.events.load(incidentId);
Returns the full event history for the entity: who changed what, and when. It needs no separate audit table, no Postgres triggers and carries no drift risk.
“What did it look like at 14:32 on March 12?”
const oldState = await ctx.events.load("incident", id, {
asOf: Temporal.Instant.from("2026-03-12T14:32:00Z"),
});
Time travel as a framework primitive.
Read models are rebuildable
Schema migration of a read-model table = drop projection, rebuild from the event log, upcast old events. If a schema bug destroyed data, drop the projection and rebuild it from the event log. The original data is never gone.
GDPR erasure without gaps in the history
Crypto-shredding: PII fields encrypted with user-specific keys. “Right to be forgotten” = delete the key. The aggregate stays readable for audits (event structure), PII is mathematically illegible.
What it isn’t
- Postgres is the source of truth: No vendor lock-in on an external event bus. Kafka, NATS or EventStoreDB can be plugged in if you want them (see below), but you don’t need them to start
- No DDD vocabulary requirement: You can learn Kumiko without a single “aggregate” or “bounded context”. Events live under the hood, the author layer is
r.writeHandler({...}) - No performance killer: Single-stream projections run inline (read-after-write OK). Cross-aggregate projections are explicitly async
- No uber-scale tool: Postgres + Kumiko is built for business apps. More than 100k events/sec belongs in Kafka
Already running Kafka? No problem
Two requests come up regularly in enterprise conversations, and we deliver both:
“We want Kumiko events in our Kafka cluster”
Outbox hook after every ctx.events.append. Your data lake / BI / other system subscribes as usual, at-least-once guaranteed. Postgres stays the source of truth. On request.
“We want Kafka as the wakeup backbone for multi-datacenter” The internal event dispatcher (today Postgres LISTEN/NOTIFY) gets a Kafka adapter. Cross-region replication, higher write throughput across instances. On request.
What we do not do: Kafka as the sole event store instead of Postgres. That would be an architectural reset breaking Kumiko’s atomic read-model writes inside the same transaction.
Architecture deep dive
| Doc | Content |
|---|---|
| event-dispatcher | Async delivery, MultiStreamProjection, dead letter, retention |
| projections | Projection patterns (single-stream, cross-aggregate) |
Continue in the docs