Skip to content

NestJS Integration

@synkro/nestjs brings Synkro into the NestJS ecosystem with decorator-based handler registration, async module configuration, and full feature parity with @synkro/core.

Features

  • Decorator-based registration — use @OnEvent and @OnWorkflowStep to bind handlers directly on your service methods
  • Async module config — configure the transport and connection via ConfigService or any async provider
  • Lazy provider binding — decorated handlers are discovered at startup and wired into the Synkro instance automatically
  • Full core paritySynkroService exposes publish, on, introspect, getEventMetrics, and the raw getInstance escape hatch

Installation

Terminal window
npm install @synkro/nestjs @synkro/core

Peer dependencies

PackageVersion
@nestjs/common^10.0.0 || ^11.0.0
@nestjs/core^10.0.0 || ^11.0.0
@synkro/core^0.15.0
reflect-metadata^0.1.13 || ^0.2.0

Next steps