@event-nest/core
v6.1.0
Published
Event sourcing module for NestJS. It provides a set of decorators and classes to build an application based on event sourcing.
Maintainers
Readme
Event Nest
A collection of NestJS libraries for building event-sourced applications.
Documentation
Read the Event Nest documentation or start with Build Your First Aggregate.
Features
- Domain events and aggregate roots with event replay.
- Transactional event persistence through MongoDB, PostgreSQL, or Microsoft SQL Server.
- Optimistic concurrency through aggregate stream versions.
- Optional snapshots with composable synchronous or asynchronous policies.
- In-process NestJS domain subscriptions after persistence.
- Aggregate purging for explicit administrative deletion workflows.
Event Nest is a focused set of libraries, not a complete application framework, ORM, or distributed event bus.
Installation
Install core and one persistence adapter:
pnpm add @event-nest/core @event-nest/postgresql pgReplace @event-nest/postgresql pg with @event-nest/mongodb mongodb or @event-nest/mssql tedious for another adapter. See the installation guide for module configuration.
Packages
| Package | Purpose |
| --- | --- |
| @event-nest/core | Aggregate, event, repository, snapshot, and subscription primitives |
| @event-nest/mongodb | MongoDB event and snapshot storage |
| @event-nest/postgresql | PostgreSQL event and snapshot storage |
| @event-nest/mssql | Microsoft SQL Server event and snapshot storage |
Compatibility
Event Nest requires Node.js 22 or later and supports NestJS 10 and 11. See the compatibility reference for exact driver peer ranges and migration notes.
License
Event Nest is MIT licensed.
