Establish safe boundaries
Enforce tenant isolation, predictable API contracts, authorization, and auditability inside your application.
Start with tenancy
Open-source modules protect data and delivery. Nestarc Reliability follows evidence across requests, databases, queues, workers, and webhooks — without collecting payloads.
Open-source packages keep execution in your environment. Nestarc Reliability correlates the bounded operational evidence those systems explicitly report; it does not execute customer work or collect request bodies, webhook payloads, raw logs, or SQL.
Use tenancy, idempotency, outbox, jobs, and webhook independently or together inside your NestJS application.
Follow one operation from request to external effect. The current pilot is read-only, and recovery controls are not enabled.
Supported packages have active compatibility coverage and maintained documentation. Preview packages are usable, but their APIs and operating contracts are still evolving. Status does not replace the version number or changelog when assessing upgrade risk.
PostgreSQL RLS + Prisma multi-tenancy with tenant-aware cache keys.
Supported · v0.15.0safe-responseAPI response wrapper with Swagger integration, field selection, error catalogs, and i18n support.
Supported · v0.3.0paginationPrisma 7 cursor, keyset, and offset pagination with filters, sorting, and Swagger helpers.
Supported · v0.6.0soft-deletePrisma soft-delete with relation filters, cascade, bulk restore, purge, and lifecycle events.
Preview · v0.4.0idempotencyIETF draft-07 Idempotency-Key handling with stable fingerprints, Redis/Postgres storage, and response/header replay.
Preview · v0.4.0audit-logAtomic Prisma change tracking with checkpointed export, durable streams, and retention controls.
Preview · v0.3.0api-keysTenant-scoped API keys with zero-downtime rotation, IP allowlists, lifecycle hooks, and verification metrics.
Supported · v0.5.0feature-flagDB-backed feature flags with cache adapters, Admin API, rollouts, and tenant overrides.
Supported · v0.2.0rbacTyped tenant-aware permissions, fail-closed guards, resource scopes, Prisma storage, and audit hooks.
Preview · v0.2.0outboxPrisma-native transactional outbox with polling, retry, and event decorators.
Preview · v0.3.0jobsTyped jobs with tenant-fair in-memory scheduling, restart-safe BullMQ workers, Redis dedupe, retries, and outbox publishing.
Supported · v0.13.0webhookIdempotent outbound delivery with HMAC signing, retry and replay controls, worker metrics, and data retention.
Preview · v0.2.0data-subjectGDPR/CCPA export and erase workflows with entity policies, retention, and outbox fan-out.
Multi-tenant SaaS teams repeatedly implement the same high-risk infrastructure. nestarc provides tested building blocks with explicit compatibility ranges, operational contracts, and documented limitations.
// Scattered across 50+ services, easy to forget, hard to audit
async updateUser(id: string, dto: UpdateUserDto) {
const before = await this.prisma.user.findUnique({ where: { id } });
await this.prisma.$executeRaw`SELECT set_config('app.current_tenant', ${tenantId}, true)`;
const after = await this.prisma.user.update({ where: { id, deletedAt: null }, data: dto });
await this.auditService.log({
action: 'user.update',
targetType: 'User',
targetId: id,
metadata: { before, after },
});
return { success: true, data: after, timestamp: new Date() };
}// Tenant isolation, audit logging, soft-delete filtering, and response wrapping
// are all handled automatically by Prisma extensions and NestJS interceptors.
// PrismaService exposes a client created with:
// createAuditedClient(base, { consistency: 'atomic-required', trackedModels: ['User'] });
async updateUser(id: string, dto: UpdateUserDto) {
return this.prisma.client.withAuditTransaction((tx) =>
tx.user.update({ where: { id }, data: dto }),
);
}Package documentation publishes benchmark setup, compatibility ranges, and known limitations alongside the feature guide. Benchmark results describe specific code paths under documented conditions; they are not universal latency promises or cross-package comparisons.
Static security scanning for MCP server implementations and MCP client configuration files. It is published under the @nestarc scope, but lives separately from the NestJS SaaS module lineup.
Explore mcp-guard →