Production Recipes

Use @tantainnovative/ndpr-recipes as a versioned npm source package for backend persistence, routes, adapters, and compliance workflow templates.

@tantainnovative/ndpr-toolkit gives you the runtime components, hooks, validators, scoring, and server utilities. @tantainnovative/ndpr-recipes gives you versioned backend source templates: database schema, route handlers, middleware, and storage adapters that you copy into your application and own.

Treat the recipes package like a maintained implementation workbook. Install it to pin the source version, copy the pieces you need, then adapt naming, authentication, tenancy, logging, and deployment details to your stack.

pnpm add @tantainnovative/ndpr-toolkit
pnpm add -D @tantainnovative/ndpr-recipes

# Prisma projects
cp node_modules/@tantainnovative/ndpr-recipes/prisma/schema.prisma prisma/schema.prisma

# Copy source templates into your app so you can edit them
cp -r node_modules/@tantainnovative/ndpr-recipes/src/nextjs/app-router/api app/api
cp -r node_modules/@tantainnovative/ndpr-recipes/src/adapters src/ndpr-adapters

The recipes are intentionally not hidden behind a runtime abstraction. Compliance persistence needs to fit your authentication, data retention, audit logging, tenant isolation, and incident-response process.

Which Package Should I Use?

NeedUseWhy
Drop-in UI@tantainnovative/ndpr-toolkit/presetsFastest way to ship consent, DSR, DPIA, breach, and policy screens.
Custom UI with toolkit logic@tantainnovative/ndpr-toolkit/hooksUse hooks and bring your own design system.
Server validation and scoring@tantainnovative/ndpr-toolkit/serverRSC-safe utilities with no React import graph.
Production persistence examples@tantainnovative/ndpr-recipesVersioned source templates for database schemas, adapters, and route handlers.

Recipe Inventory

AreaPathWhen to use it
Prisma schemaprisma/schema.prismaUse when your app already runs Prisma migrations.
Drizzle schemasrc/drizzle/schema.tsUse when your app owns schema changes through Drizzle Kit.
Next.js routessrc/nextjs/app-router/api/**Copy into App Router projects that need server-side persistence.
Express routessrc/express/**Mount in existing Node/Express APIs.
Storage adapterssrc/adapters/**Bridge toolkit hooks/components to your database layer.
Consent middlewaresrc/nextjs/app-router/middleware.tsGate routes by consent state.

Module Coverage

ModuleBackend surfaceProduction purpose
ConsentConsent records, revocation, audit trailPersist active and historical consent snapshots.
DSRRequest intake, reference IDs, target datesTrack 30-day response workflows.
BreachIncident intake, lifecycle updates, NDPC readinessKeep 72-hour notification evidence visible.
DPIAAssessment metadata, risk score, approval statusStore Section 28 assessment evidence.
ROPAProcessing records and completeness checksMaintain records of processing activities.
ComplianceCompliance score API routeExpose server-calculated posture to dashboards.
DCPMI / CAR utilitiesDesignation tier and audit return scheduleSupport GAID 2025 classification and filing planning.

Production Checklist

  • Pin both package versions in your lockfile before copying recipe source.
  • Replace sample subject identifiers with authenticated user, tenant, or session identifiers.
  • Add your tenant isolation and role checks before every write route.
  • Review retention periods, audit-log fields, and breach escalation routing with counsel or your DPO.
  • Run migrations in a staging environment and test consent revocation, DSR intake, breach updates, and ROPA completeness.
  • Keep copied recipe files in your own source control so future changes are reviewed as normal app code.

Next Steps