Skip to content

@sdcorejs/nestjsSecure NestJS building blocks

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.

SDCoreJS logo

Install

npm versionNode.js supportMIT licenseCI status

bash
npm install @sdcorejs/nestjs

The 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.

Choose the right entry point

ImportUse it for
@sdcorejs/nestjsSdCoreModule, common context/security primitives, response and validation helpers
@sdcorejs/nestjs/coreORM, context, tenancy, audit
@sdcorejs/nestjs/authJWT/JWKS, permissions, internal calls
@sdcorejs/nestjs/servicesCache and outbound HTTP
@sdcorejs/nestjs/validationZod v4 guards and query presets
@sdcorejs/nestjs/queueBullMQ registration and worker base class
@sdcorejs/nestjs/i18nCatalogs, language resolution, localized exception envelopes
@sdcorejs/nestjs/featuresUploaded 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.

What changed in 1.1.0

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

Released under the MIT License.