Danijel Martinek 56dcf48ff2 Merge branch 'worktree-audit-and-compliance': audit logging & DPA compliance (ADR-018)
Adds @repo/core-audit as the 5th optional core package (gen core-package audit), providing DPA-compliant audit logging:

- AuditEntry shape (closed enum, no payload/body), IP truncation, salted pseudonymization
- Two integration patterns: use-case calls + Payload hooks
- Sinks: NoopAuditLog, StdoutJsonAuditLog, PayloadAuditLog (append-only), MultiSinkAuditLog (settle-all + stderr fallback)
- TraceIdEnrichingAuditLog decorator bridges to OTel correlationId
- Privileged eraseSubject for GDPR via overrideAccess
- RecordingAuditLog test double in core-testing
- Generator template captured + byte-identical e2e reconstruction
- ADR-018, docs/guides/audit-and-compliance.md, 6 doc surfaces updated

28 commits, base ac8dfcca1b54ad.
2026-05-11 16:53:12 +02:00

Clean Architecture Monorepo Template

Turborepo + pnpm monorepo organized by vertical features. See CLAUDE.md for the full conventions reference and AGENTS.md for the package map.

Quick Start

pnpm install           # Install all dependencies
pnpm dev               # Start all dev servers
pnpm build             # Build all packages
pnpm test              # Run all tests
pnpm turbo boundaries  # Validate workspace dependency graph
pnpm turbo gen feature # Scaffold a new feature package
docker compose up -d   # Start PostgreSQL

Optional packages

The default template includes the must-have core packages and all 5 feature packages. Five core packages are optional and scaffold on demand:

pnpm turbo gen core-package realtime  # Socket.IO realtime layer (ADR-016)
pnpm turbo gen core-package events    # Cross-feature events + Payload jobs (ADR-015)
pnpm turbo gen core-package trpc      # tRPC server setup
pnpm turbo gen core-package ui        # Design system
pnpm turbo gen core-package audit     # DPA-compliant audit logging (ADR-018)

See docs/architecture/template-tiers.md for the full tier list.

Key ports

Service Port
Next.js 3000
Payload CMS 3001
TanStack Start 3002
PostgreSQL 5432
Storybook 6006
Description
No description provided
Readme 27 MiB
Languages
TypeScript 61.1%
JavaScript 24.1%
Handlebars 13.6%
Shell 1%
Dockerfile 0.1%