Skip to content

Introducing nestarc

We're excited to introduce nestarc — a collection of production-ready NestJS modules designed specifically for SaaS backends.

Why nestarc?

Building a multi-tenant SaaS application with NestJS requires solving the same set of cross-cutting concerns every time:

  • Tenant isolation — ensuring data doesn't leak between tenants
  • Audit logging — tracking who changed what and when
  • Feature flags — rolling out features gradually
  • Soft deletes — safely removing data without losing it
  • Pagination — handling large datasets efficiently
  • Response standardization — consistent API contracts

Each of these is well-understood, but implementing them correctly takes significant effort. nestarc packages these solutions into composable, well-tested modules that work together.

The Stack

All nestarc packages share a common foundation:

  • NestJS 10/11 for the application framework
  • Prisma 5/6 for type-safe database access
  • PostgreSQL for the database layer
  • TypeScript end-to-end

Packages compose via Prisma Client Extensions, so you can combine @nestarc/tenancy, @nestarc/soft-delete, and @nestarc/audit-log in a single Prisma client chain.

What's Available

PackageVersionDescription
@nestarc/tenancy0.8.0PostgreSQL RLS + Prisma multi-tenancy
@nestarc/safe-response0.13.1API response wrapper with Swagger
@nestarc/audit-log0.1.0Automatic CUD change tracking
@nestarc/feature-flag0.2.0DB-based feature flags
@nestarc/soft-delete0.2.0Prisma soft-delete extension
@nestarc/pagination0.1.0Cursor + offset pagination
@nestarc/idempotency0.1.3IETF-style idempotency with response replay
@nestarc/outbox0.1.0Transactional outbox for reliable domain events
@nestarc/webhook0.2.0Outbound webhook delivery with signing and retry
@nestarc/api-keys0.1.0Tenant-scoped API keys with scoped guards
@nestarc/data-subject0.1.0GDPR/CCPA export and erase workflows
@nestarc/jobs0.1.0Tenant-aware background jobs

Get Started

Released under the MIT License.