A comprehensive event sourcing platform that packages a robust event store with higher-level event sourcing abstractions. This platform provides reliable, robust, and flexible packages for implementing event sourcing in different applications, with progressive examples serving as living documentation.
The platform is organized into distinct contexts following Domain-Driven Design principles:
event-sourcing-platform/
โโโ event-store/ # Rust event store service, gRPC server, and client SDKs
โ โโโ eventstore-core/ # Shared traits, errors, protobuf types
โ โโโ eventstore-backend-*/ # Memory + Postgres backends
โ โโโ eventstore-bin/ # gRPC server binary
โโโ event-sourcing/ # Event sourcing SDKs and abstractions
โ โโโ rust/ # Rust SDK (alpha)
โ โโโ typescript/ # TypeScript SDK (primary focus)
โ โโโ python/ # Placeholder for future Python SDK
โโโ vsa/ # Vertical Slice Architecture Manager (in planning)
โ โโโ vsa-core/ # Core Rust library
โ โโโ vsa-cli/ # CLI tool
โ โโโ vsa-wasm/ # WASM bindings for Node.js
โโโ examples/ # TypeScript "living documentation" examples
โ โโโ 001-basic-store-ts/ # Direct event store usage
โ โโโ 002-simple-aggregate-ts/
โ โโโ โฆ
โ โโโ 009-web-dashboard-ts/
โโโ dev-tools/ # Local Postgres/Redis helper scripts and Docker Compose
โโโ infra-as-code/ # Terraform + Ansible scaffolding (work in progress)
โโโ docs-site/ # Docusaurus documentation site (work in progress)
โโโ docs/ # Project notes and supporting docs
- Rust (latest stable) - for the event store
- Node.js (18+) - for TypeScript SDK and examples
- Python (3.8+) - for Python SDK and examples
- Docker - for development services
- PostgreSQL - for persistent storage (via Docker)
-
Clone and enter the repository:
git clone https://github.com/<org>/event-sourcing-platform.git cd event-sourcing-platform
-
Install workspace dependencies (pnpm 9+ recommended):
pnpm -w install
-
Start local infrastructure (PostgreSQL + Redis) โ optional:
make dev-start # or `make start-services` for the lightweight compose stack -
Build and smoke-test the platform:
make build make smoke-test # runs the Rust event-store smoke check
Start with the progressive learning examples:
# Basic event store usage (no event sourcing)
make examples-001
# Simple event sourcing with one aggregate
make examples-002
# Multiple aggregates working together
make examples-003Purpose: Pure event storage and retrieval
Dependencies: None (standalone)
Technology: Rust with gRPC API
The event store provides:
- โ Durable event storage with optimistic concurrency
- โ Client-proposed sequence numbers (true optimistic concurrency)
- โ Multiple backends (memory, PostgreSQL)
- โ gRPC API with protocol buffer definitions
- โ Basic client libraries for multiple languages
cd event-store
make helpPurpose: Event sourcing patterns and abstractions
Dependencies: Event Store context
Technology: Multi-language SDKs (Rust, TypeScript, Python)
The event sourcing SDKs provide:
- ๐ Aggregate abstractions and lifecycle management
- ๐ Command/Event handling patterns
- ๐ Repository pattern implementations
- ๐ Projection and read model management
- ๐ Rich developer experience with type safety
cd event-sourcing
make helpPurpose: Living documentation and progressive learning
Dependencies: Event Store + Event Sourcing contexts
Technology: Real applications with no mocks
The examples demonstrate:
- ๐ Progressive learning from basics to complete systems
- ๐ Real working code with actual databases
- ๐ Docker Compose setups for easy experimentation
- ๐ Best practices and patterns
- ๐ Performance considerations
cd examples
make helpAll examples are implemented in TypeScript today. They default to the gRPC event store provided by dev-tools; append -- --memory to run against the in-memory client.
| Example | Status | Highlights |
|---|---|---|
| 001-basic-store-ts | โ Ready | Append/read streams, optimistic concurrency basics |
| 002-simple-aggregate-ts | โ Ready | Aggregate decorators, repository pattern |
| 003-multiple-aggregates-ts | โ Ready | Aggregate collaboration and sequencing |
| 004-cqrs-patterns-ts | โ Ready | Separate write/read models with projections |
| 005-projections-ts | โ Ready | Analytics projections and reporting views |
| 006-event-bus-ts | โ Ready | Event-driven interactions across bounded contexts |
| 007-ecommerce-complete-ts | ๐ง Placeholder | Wiring for future full e-commerce workflow |
| 007-inventory-complete-ts | โ Ready | Inventory lifecycle with projections and alerts |
| 008-observability-ts | โ Ready | Operational metrics and health instrumentation |
| 008-banking-complete-ts | ๐ง Placeholder | Scaffold for banking domain (commands TBD) |
| 009-web-dashboard-ts | โ Ready | Express-based dashboard consuming projections |
Run an example with:
make examples-001 # replace with desired example number
# or directly with pnpm:
pnpm --filter ./examples/001-basic-store-ts run start -- --memory# Build everything
make build
# Build specific components
make event-store
make event-sourcing
make examples
make tools# Run all tests
make test
# Test specific components
make test-event-store
make test-event-sourcing
make test-examples# Run QA checks on everything
make qa
# QA specific components
make qa-event-store
make qa-event-sourcing
make qa-examples# Start development services (PostgreSQL, etc.)
make start-services
# Stop development services
make stop-services
# Run smoke tests against services
make smoke-testCurrent automated coverage focuses on the pieces that ship today:
- Rust event store โ cargo unit + integration tests cover the core traits, in-memory backend, Postgres backend, and gRPC server wiring. Postgres tests automatically spin up Testcontainers when a local database is not available.
- TypeScript event-sourcing SDK โ Jest tests validate aggregate lifecycle, optimistic concurrency, and event serialisation helpers.
Planned additions (not yet automated):
- Cross-language SDK compatibility suites (Rust โ๏ธ TypeScript โ๏ธ future Python).
- Example-level end-to-end checks and smoke tests for each scenario.
- Performance/stress benchmarks and observability regression tests.
- Domain Focus: Event Store and Event Sourcing define the rules of the event sourcing domain
- Living Documentation: Examples demonstrate how to use core packages to build real applications
- Progressive Learning: Examples build from basic concepts to complete systems
- No Mocks: All examples use real working code with actual databases
- Future Extensibility: Architecture supports future event modeling and code generation
- Code generation from event models
- Domain-specific language for event modeling
- Multi-language code generation
- Scaffolding and boilerplate reduction
- KurrentDB backend
- Kafka backend
- EventStoreDB adapter
- Custom backend implementations
- Advanced CLI features
- Web UI enhancements
- Code generation tools
- Event modeling tools
Each component has comprehensive documentation:
- Event Store Documentation - Core event storage
- Event Sourcing Documentation - ES patterns and SDKs
- Examples Documentation - Learning examples
- Tools Documentation - Development tools
We welcome contributions! Please see our contributing guidelines and code of conduct.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run
make qato ensure quality - Submit a pull request
- Run
make setupfor initial setup - Use
make dev-setupfor development environment - Use
make buildandmake testduring development - Use
make qabefore submitting changes
This project is licensed under the MIT License - see the LICENSE file for details.
- โ Event Store (Rust) โ Memory and Postgres backends with a production-ready gRPC surface.
- โ TypeScript SDK โ Drives all current examples; adding richer patterns iteratively.
- ๐ Rust SDK โ Early alpha; core abstractions present, feature parity in progress.
- ๐ Python SDK โ Placeholder directory waiting for implementation.
- ๐ VSA Tool โ Vertical Slice Architecture Manager in planning phase. See vsa/README.md for details.
- โ Examples โ TypeScript examples 001โ006, 007 inventory, 008 observability, and 009 dashboard are runnable today.
- ๐ง Examples (future) โ 007 e-commerce and 008 banking are scaffolds awaiting domain logic.
- ๐ง Infra-as-code & docs-site โ Module scaffolding exists; provider-specific stacks and walkthroughs are being built.
This platform draws inspiration from and builds upon the work of leading event sourcing practitioners:
- Understanding Event Sourcing by Martin Dilger - A comprehensive book combining Event Modeling and Event Sourcing to plan and build software systems of any size and complexity. Sample code on GitHub.
- Event Modeling - The original Event Modeling article provides foundational concepts for our approach.
This platform serves as a comprehensive foundation for event sourcing applications, providing both the low-level event storage and high-level patterns needed to build robust, scalable systems.