Event Sourcing
The fundamental idea of Event Sourcing is that of ensuring every change to the state of an application is captured in an event object, and that these event objects are themselves stored in the sequence they were applied for the same lifetime as the application state itself.
Event Sourcing is an architectural pattern where every change to application state is captured as an immutable event and persisted in an append-only event store. Instead of overwriting current state, the system stores the full sequence of events, allowing current state to be derived by replay. This enables complete audit trails, temporal queries (reconstruct state at any past moment), and powerful debugging and analytics — with clear trade-offs in complexity that this skill helps you navigate.
“We're building a financial ledger for a fintech startup. Every account balance change needs a full audit trail, and regulators may ask us to…”
Store what happened, not just what is — rebuild any past state from your event log
Fowler's Event Sourcing pattern replaces the standard CRUD model — overwrite current state — with an append-only Event Store where every state change is recorded as an immutable Event object with a defined schema. Application state, encapsulated in Aggregates, is reconstructed at runtime by replaying events from the store. Snapshots provide a performance shortcut by capturing aggregate state at a point in time, avoiding full-history replay on large streams. Projections (Read Models) are derived views computed from the event stream, typically paired with CQRS (Command Query Responsibility Segregation) to separate write and read paths. The pattern enables temporal queries (reconstruct state at any past moment), complete audit trails, and event replay for debugging or analytics — but introduces meaningful complexity in schema evolution, eventual consistency management, and operational overhead.
Most systems store only current state — the last write wins, history is destroyed. When a financial discrepancy surfaces or a production bug needs reproducing, there is no record of what happened, in what order, or why. Engineers working on audit-heavy, compliance-regulated, or complex-domain systems find that CRUD-style state mutation erases exactly the information they most need.
Design an Event Sourcing architecture grounded in Fowler's canonical pattern: identify your domain events, structure your event store, design aggregate reconstitution logic, and plan projections — with explicit trade-off guidance so you adopt the complexity only when the benefits genuinely justify it.
- A description of your domain: what entities change state, what business processes drive those changes
- Your current or planned data storage approach and the pain points driving you toward Event Sourcing (audit, temporal queries, debugging, analytics)
- Your tech stack and constraints (language, framework, persistence layer, team size)
- Any existing domain model, event type sketches, or command/query structure you have so far
- A fit/no-fit assessment with specific trade-off analysis for your exact use case — including when simpler alternatives are better
- A domain event inventory with schema sketches, metadata requirements, and a versioning strategy for schema evolution
- Aggregate reconstitution logic design and snapshot timing recommendations for your event volume
- Projection and Read Model designs for your query needs, including CQRS integration guidance
Watch the methodology work.
Three specimens from a single real session: the same situation, unaided and calibrated, the full transcript, and the skill answering live in the channel where the work happens.
“Your accounts table stores current_balance, status, and updated_at. A regulator requests the exact sequence of transactions on account #4821 between March 1 and March 15, 2024. Your DBA finds only the final balance and a single updated_at timestamp. An engineer spends two days piecing together history from fragmented application logs — and still cannot explain a $340 discrepancy that appeared sometime in that window.”
“Your event store contains every FundsDeposited, FundsWithdrawn, and AccountFrozen event for account #4821, each with amount, currency, processorReferenceId, initiatedBy, and a cryptographically sequenced timestamp. The regulator's request takes 15 minutes: filter events by date range, replay through the transaction-history projection. The $340 discrepancy is explained by a FundsWithdrawn event at 11:58 PM on March 12 initiated by system-process/fee-collection — fully auditable, unambiguous, and reproducible by any future replay.”
The same skill, where the work happens.
No new app to learn. The methodology runs over the WhatsApp Business API, so the answer lands as a reply in the thread you’re already in — same rigour, zero context-switch.
What it does, specifically.
Each capability is a distinct move drawn straight from the source methodology — not a generic assistant guessing.
Fit Assessment
Evaluates whether Event Sourcing is appropriate for your specific use case based on your domain's audit requirements, temporal query needs, team maturity, and operational constraints. Produces an explicit recommendation including cases where simpler alternatives (audit tables, change data capture) are more appropriate.
Domain Event Identification
Guides you through identifying, naming, and scoping the domain events that should be captured in your system. Distinguishes business-meaningful state changes from low-level technical noise, and reviews event naming for clarity and correctness.
Event Schema & Versioning Design
Designs the structure of each event type: required domain payload fields, metadata (event ID, aggregate ID, sequence number, timestamp, causation and correlation IDs), and a versioning strategy for handling schema evolution as your domain model changes over time.
Aggregate Reconstitution Design
Designs the logic by which your Aggregates are rebuilt from event replay: the apply/fold pattern, how each event type mutates aggregate state, handling of corrupted or out-of-order events, and integration with your domain model structure.
Projection & Read Model Design
Designs Projections (Read Models) derived from your event stream for query purposes: which events each projection consumes, the data shape it produces, rebuild strategies, and how to integrate CQRS to cleanly separate command and query responsibilities.
Snapshot Strategy Planning
Determines when and how to introduce Snapshots to avoid full-history replays on large aggregate streams, including snapshot frequency heuristics, storage approach, and how snapshots interact with event replay logic without compromising event log immutability.
Anti-Pattern Review
Reviews your current or planned Event Sourcing design against documented failure modes: storing derived state in events, treating events as CRUD synonyms, anemic event stores, ignoring idempotency requirements, conflating domain events with integration events, and premature snapshotting.
Graded before it shipped.
Every skill is scored against independent scenarios for methodology fidelity before it goes live — not vibes, a rubric.
Event Inventory & Schema Sketches
A structured catalog of your domain events with proposed field names, types, metadata requirements (IDs, timestamps, sequence), and a versioning approach — the foundational design document for your event store.
Aggregate Reconstitution Blueprint
A design document showing how each Aggregate is rebuilt from event replay: the apply/fold logic per event type, snapshot integration points, and edge-case handling for your specific domain.
Projection Design Map
A mapping of query needs to Projection designs: which events each projection consumes, the data shape it produces, rebuild strategy, and how it integrates with your CQRS read side.
Fit & Trade-off Decision Summary
A documented assessment of whether Event Sourcing is appropriate for your use case — with specific trade-offs called out, alternatives considered, and a recommendation on scope (full ES, hybrid, or alternative pattern).
Grounded in the original work.
Every answer traces back to a real source and the practitioner who wrote it — not a secondhand summary. Here is the source of record.
Martin Fowler
Martin Fowler is Chief Scientist at ThoughtWorks and one of the most influential voices in software architecture. He is the author of foundational texts including 'Patterns of Enterprise Application Architecture', 'Refactoring: Improving the Design of Existing Code', and 'UML Distilled'. His website martinfowler.com is a canonical reference for enterprise software patterns, and he is a signatory of the original Agile Manifesto.
Patterns of Enterprise Application Architecture
Chief Scientist at ThoughtWorks; author of 'Patterns of Enterprise Application Architecture' and 'Refactoring'; signatory of the Agile Manifesto; martinfowler.com is a canonical reference for software architecture patterns.
Be first to run it.
Event Sourcing is being built right now. Leave your email and we’ll tell you the moment it goes live.