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.1.0DB-based feature flags
@nestarc/soft-delete0.2.0Prisma soft-delete extension
@nestarc/pagination0.1.0Cursor + offset pagination

Get Started

Check out the Getting Started guide to set up your first multi-tenant API in 5 minutes.

Released under the MIT License.