Fail closed by default
Scoped repositories reject missing tenancy, trusted identity never comes from arbitrary headers, file access defaults to owner-only, and history reads default to deny.
Fail-closed TypeORM tenancy, trusted request identity, authorization, cache isolation, outbound HTTP, files, history, jobs, queues, validation, and i18n — shipped as eight stable entry points.

npm install @sdcorejs/nestjsThe only peer dependencies are @nestjs/common ^11 and @nestjs/core ^11. Zod v4 is installed as a required runtime because validation is part of the root API; ioredis, jwks-rsa, jsonwebtoken, and @aws-sdk/client-s3 remain optional feature runtimes. Start with installation, then copy the complete application example.
| Import | Use it for |
|---|---|
@sdcorejs/nestjs | SdCoreModule, common context/security primitives, response and validation helpers |
@sdcorejs/nestjs/core | ORM, context, tenancy, audit |
@sdcorejs/nestjs/auth | JWT/JWKS, permissions, internal calls |
@sdcorejs/nestjs/services | Cache and outbound HTTP |
@sdcorejs/nestjs/validation | Zod v4 guards and query presets |
@sdcorejs/nestjs/queue | BullMQ registration and worker base class |
@sdcorejs/nestjs/i18n | Catalogs, language resolution, localized exception envelopes |
@sdcorejs/nestjs/features | Uploaded files, action history, distributed job scheduler |
These eight paths are the complete supported export map. Deep imports are intentionally unsupported. See the entry-point reference and full API catalog.
Version 1.1.0 hardens shared-database and shared-infrastructure boundaries: trusted principal mapping, fail-closed scoped mutations, cache namespaces, uploaded-file ownership and durable cleanup, action-history authorization/redaction, and fenced job leases with stable idempotency keys. It requires Node.js 20 or newer and an explicit coordinated migration for existing applications.
Read the release notes · Upgrade from 1.0 · Security checklist