Packages
WARNING
We created this page with the help of the GenAI tool.
We're currently double-checking it to ensure the information is 100% correct and free of hallucinations.
Emmett is organized as a modular monorepo. Install only what you need.
Core Package
@event-driven-io/emmett
The foundation of the Emmett ecosystem. Required for all projects.
npm install @event-driven-io/emmettProvides:
- Event and Command type definitions
- Decider pattern implementation
- In-memory event store for testing
- Command handling utilities
- Projection building blocks
Event Store Packages
Choose one based on your infrastructure needs.
@event-driven-io/emmett-postgresql
Production-ready PostgreSQL event store with Pongo integration.
npm install @event-driven-io/emmett-postgresqlFeatures:
- Inline and async projections
- Pongo document database integration
- Full ACID transactions
- Background message consumers
@event-driven-io/emmett-esdb
EventStoreDB integration for native Event Sourcing.
npm install @event-driven-io/emmett-esdbFeatures:
- Persistent subscriptions
- Global event ordering
- Built-in projections
- Optimized for Event Sourcing
@event-driven-io/emmett-mongodb
MongoDB event store with flexible storage strategies.
npm install @event-driven-io/emmett-mongodbFeatures:
- Single or multi-collection storage
- Document-per-stream option
- MongoDB aggregation pipelines
- Atlas-compatible
@event-driven-io/emmett-sqlite
Lightweight SQLite event store for development and embedded apps.
npm install @event-driven-io/emmett-sqliteFeatures:
- File-based or in-memory
- Zero configuration
- Fast test execution
- better-sqlite3 powered
Web Framework Packages
@event-driven-io/emmett-expressjs
Express.js integration with testing utilities.
npm install @event-driven-io/emmett-expressjsFeatures:
- Application factory
- Problem Details (RFC 9457)
- ETag concurrency handling
- ApiSpecification for testing
@event-driven-io/emmett-fastify
Fastify integration with plugin architecture.
npm install @event-driven-io/emmett-fastifyFeatures:
- Plugin-based setup
- Schema validation
- Graceful shutdown
- Fastify inject testing
Testing Package
@event-driven-io/emmett-testcontainers
TestContainers integration for E2E testing.
npm install -D @event-driven-io/emmett-testcontainersFeatures:
- Pre-configured containers for PostgreSQL, MongoDB, EventStoreDB
- Docker Compose integration
- Automatic cleanup
- CI/CD optimized
Utility Package
@event-driven-io/emmett-shims
Polyfills for environments without native support.
npm install @event-driven-io/emmett-shimsFeatures:
- AsyncIterator support
- Environment detection
- Edge runtime compatibility
Package Compatibility
All packages follow semantic versioning. Major versions are released together to ensure compatibility.
| Package | Current Version | Node.js |
|---|---|---|
| emmett | ≥18.0 | |
| emmett-postgresql | ≥18.0 | |
| emmett-esdb | ≥18.0 | |
| emmett-mongodb | ≥18.0 | |
| emmett-sqlite | ≥18.0 | |
| emmett-expressjs | ≥18.0 | |
| emmett-fastify | ≥18.0 | |
| emmett-testcontainers | ≥18.0 | |
| emmett-shims | ≥18.0 |
Typical Project Setup
API with PostgreSQL
npm install @event-driven-io/emmett \
@event-driven-io/emmett-postgresql \
@event-driven-io/emmett-expressjs
npm install -D @event-driven-io/emmett-testcontainersAPI with EventStoreDB
npm install @event-driven-io/emmett \
@event-driven-io/emmett-esdb \
@event-driven-io/emmett-fastify
npm install -D @event-driven-io/emmett-testcontainersAPI with MongoDB
npm install @event-driven-io/emmett \
@event-driven-io/emmett-mongodb \
@event-driven-io/emmett-expressjs
npm install -D @event-driven-io/emmett-testcontainersRelated Projects
Pongo
PostgreSQL as a Document Database with MongoDB-like API.
npm install @event-driven-io/pongoSee Also
- Getting Started - Complete tutorial
- Choosing an Event Store - Detailed comparison
- Samples - Working examples
