Installation
Install the kernel package in an application:
yarn add @haskou/ddd-kernelThat is enough for the core kernel, contracts, domain primitives, dependency injection and in-memory adapters.
Install extra packages only for the adapters your application imports.
Pub/Sub Adapters
The in-memory pub/sub adapter has no extra runtime dependencies.
The AMQP adapter uses amqplib:
yarn add amqplibDB Adapters
The in-memory repository adapter has no extra runtime dependencies.
The MongoDB repository adapter uses mongodb:
yarn add mongodbUI Adapters
The Express adapter uses express, routing-controllers and decorator metadata packages:
yarn add express routing-controllers reflect-metadata class-transformer class-validatorInstall cors only when enabling routingControllersOptions.cors:
yarn add corsOther Adapters
Schedulers use node-cron:
yarn add node-cronThe Winston logger uses winston:
yarn add winstonWebSocket helpers use ws:
yarn add wsTypeScript Resolution
The package publishes ESM, CommonJS and declaration files for every public subpath. Modern projects should prefer moduleResolution: "NodeNext" or "Bundler", but declaration mappings are also provided for projects still using classic moduleResolution: "node".