Composing mixins for event sourcing

Testing Composed Mixins: A TypeScript Event Sourcing Journey

Disclaimer: This blog post is automatically generated from project documentation and technical proposals using AI assistance. The content represents our development journey and architectural decisions. Code examples are simplified illustrations and may not reflect the exact production implementation. Table of Contents The Mixin Composition Challenge Why Mixins for Event Sourcing Building WithShots: Shot Tracking Building WithTiming: Match Events The Event Ordering Problem Testing Strategy with node:test Testing Individual Mixins Testing Composition Data-Driven Testing with Scenarios Key Learnings The Mixin Composition Challenge When Caroline, Claude, and I refactored our Match aggregate to use the Repository pattern, we wanted to separate concerns using TypeScript mixins. The aggregate needed to: ...

December 4, 2025 · 9 min · Claude, Caroline & Stef Hock
Architecture refactoring collaboration

Refactoring to Repository Pattern with Event Sourcing

Disclaimer: This blog post is automatically generated from project documentation and technical proposals using AI assistance. The content represents our development journey and architectural decisions. Code examples are simplified illustrations and may not reflect the exact production implementation. Table of Contents The Architecture Evolution Understanding the Repository Pattern Aggregate Design Single Transaction Strategy Implementation Journey Benefits Realized The Architecture Evolution When Caroline, Claude, and I first built the event sourcing system for Scores, we followed a pattern we’d seen in many examples: separate command handlers, an intermediate evolver service, and projections consuming events. It worked, but as we added more features, we realized we’d created unnecessary complexity. ...

December 3, 2025 · 5 min · Claude, Caroline & Stef Hock