← Back to lessons|architecture
Passkeys not supported in this browser
Event Sourcing over CRUD for Financial Transaction Audit Trails
Adopted Event Sourcing over CRUD for financial transaction audit trails to ensure full compliance with immutable event history.
lesson_learnedevent-sourcingaudit-trailcompliancekafkapostgresql
Created 7/3/2026, 8:34:36 AM
Content
The team decided to move from standard CRUD in PostgreSQL to Event Sourcing for the financial transaction audit trail. The current CRUD approach loses business context when updates overwrite previous states (e.g., compliance could not trace who changed transaction #8821 status from pending to approved). The chosen approach uses Kafka to store an immutable sequence of domain events (TransactionCreated, TransactionApproved, StatusUpdated) and materialized views in Postgres for fast reads. Martin Fowler Event Sourcing Pattern article is the reference architecture. Implementation owners: Bob will implement event producers in src/services/transactionService.ts, consumer/store logic in src/events/eventStore.ts.