Package Exports
- evtstore
- evtstore/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (evtstore) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
EvtStore
Type-safe Event Sourcing and CQRS with Node.JS and TypeScript
Note: createDomain
will be migrating to createDomainV2
in version 11.x
The createDomainV2
API solves circular reference issues when importing aggregates.
The original createDomain
will be available as createDomainV1
from 11.x onwards.
Why
I reguarly use event sourcing and wanted to lower the barrier for entry and increase productivity for colleagues.
The design goals were:
- Provide as much type safety and inference as possible
- Make creating domains quick and intuitive
- Be easy to test
- Allow developers to focus on application/business problems instead of Event Sourcing and CQRS problems
To obtain these goals the design is highly opinionated, but still flexible.
Examples
EvtStore is type-driven to take advantage of type safety and auto completion. We front-load the creation of our Event
, Aggregate
, and Command
types to avoid having to repeatedly import and pass them as generic argument. EvtStore makes use for TypeScript's mapped types and conditional types to achieve this.
Supported Databases
See Providers for more details and examples
- Postgres using node-postgres
- SQLite, MySQL, Postgres using Knex
- In-memory
- MongoDB
- Neo4j v3.5
- Neo4j v4
API
See API