Skip to content

Packages

nestarc publishes independent NestJS packages for production SaaS backends. Install only the modules that solve the problem in front of you, then add the next layer when the product needs it.

Current scope

There are 13 SaaS backend packages under the @nestarc npm scope. Developer tools such as @nestarc/mcp-guard live under Tooling instead of this package adoption path.

Status model

StatusMeaning
CoreMature package docs and generated API reference are available.
BetaPublished package with production-oriented docs; full generated API reference is being expanded.
LabsExperimental or developer tooling outside the SaaS backend package lineup.
StepAdd this layerPackagesUse when
1SaaS API foundationtenancy, safe-response, paginationYou are building tenant-scoped HTTP APIs and want consistent response and list behavior.
2Data safetysoft-delete, idempotencyDeletes, retries, payments, imports, or external callbacks can corrupt state if handled ad hoc.
3Operations and authaudit-log, api-keys, feature-flag, rbacTeams need traceability, scoped machine access, controlled rollout, or tenant-aware authorization.
4Async and integrationoutbox, jobs, webhookWrites need reliable event fan-out, background work, or outbound delivery.
5Privacy and compliancedata-subjectExport, erase, retention, and legal basis workflows need consistent policy handling.

See the Adoption Roadmap for the detailed sequence.

Package matrix

Foundation

PackageStatusVersionSolvesStart here
@nestarc/tenancyCore0.12.0Tenant context, PostgreSQL RLS, Prisma query isolation.You need tenant data isolation enforced below application code.
@nestarc/safe-responseCore0.14.0Consistent API envelopes, errors, pagination, Swagger helpers.Frontend teams need predictable responses across controllers.
@nestarc/paginationCore0.1.0Cursor and offset pagination with filters, sorting, and Swagger.List endpoints are gaining custom query parsing and repeated DTOs.

Data safety

PackageStatusVersionSolvesStart here
@nestarc/soft-deleteCore0.4.0Prisma soft delete, cascade, restore, purge, event hooks.Deleting records must preserve auditability and avoid accidental reads.
@nestarc/idempotencyBeta0.3.0IETF-style Idempotency-Key, fingerprinting, response replay.Retries can duplicate payments, orders, imports, or webhook receivers.

Operations and auth

PackageStatusVersionSolvesStart here
@nestarc/audit-logCore0.1.0Prisma CUD auto-tracking, before/after diff, actor metadata.You need to answer who changed what, when, and from where.
@nestarc/api-keysBeta0.1.0Tenant-scoped API keys, hashing, peppers, environments, scopes.Customers or integrations need scoped machine access.
@nestarc/feature-flagCore0.3.0DB-backed flags, cache adapters, rollout, tenant overrides, Admin API.You want gradual rollout without external flag-service dependency.
@nestarc/rbacBeta0.1.0Tenant-aware roles, permissions, guards, resource scopes, Prisma storage.Controllers and services have ad hoc role checks that are starting to drift.

Async and integration

PackageStatusVersionSolvesStart here
@nestarc/outboxBeta0.1.0Transactional outbox, polling, SKIP LOCKED, retry, event decorators.Database writes and event emission must succeed or recover together.
@nestarc/jobsBeta0.1.0Tenant-fair jobs, in-memory scheduler, BullMQ backend, context propagation.One tenant's backlog should not starve everyone else's work.
@nestarc/webhookBeta0.12.1HMAC-signed webhook delivery, retries, circuit breaker, delivery logs.Your app sends events to customer endpoints.

Privacy and compliance

PackageStatusVersionSolvesStart here
@nestarc/data-subjectBeta0.1.0GDPR/CCPA export and erase policies, retention, anonymization, outbox fan-out.Privacy requests touch invoices, audit logs, tax records, and tenant data.

Tooling

ToolStatusVersionPurpose
@nestarc/mcp-guardLabs0.2.0Static scanning for MCP servers and MCP client configuration files.

Install pattern

Each package can be installed by name:

bash
npm install @nestarc/tenancy

Replace tenancy with the package you want to adopt. Package-specific peer dependencies and setup steps are listed in each package's Installation page.

Released under the MIT License.