feat: add Data Processing Agreement (DPA) document type #29

Merged
pook merged 1 commit from feature/dpa-document-type into main 2026-04-09 06:14:21 -04:00
Owner

Summary

  • Add GDPR Article 28 compliant DPA as a new selectable document type in the generation engine
  • Create DPA template with all required sections: subject matter/duration, nature/purpose of processing, data types, data subjects, processor obligations, controller obligations, sub-processing terms, 72-hour breach notification, audit rights, data deletion/return, international transfers (EU/UK), and UK addendum
  • Add POST /generate/data-processing-agreement API endpoint
  • Update questionnaire route to accept dpa document type
  • Update all frontend components (document list, questionnaire page, review step) with DPA option
  • Add 7 unit tests covering template structure, GDPR section completeness, jurisdiction filtering, and clause validation

Files changed (18)

New files:

  • packages/api/src/templates/dpa.ts — DPA clause templates
  • packages/api/src/routes/generate-dpa.ts — Generation endpoint
  • packages/api/tests/unit/dpa-template.test.ts — Unit tests

Modified:

  • DB schema, template index, document generator, LLM service, shared types
  • Questionnaire route, app entry point (route registration)
  • Frontend: questionnaire page, document list, review step, document viewer, agency client page
  • Test fixtures

Test plan

  • 7 unit tests pass (bun test packages/api/tests/unit/dpa-template.test.ts)
  • E2E: POST /generate/data-processing-agreement with completed questionnaire returns 201
  • E2E: DPA appears in document list with correct label and color
  • Verify DB migration adds 'dpa' to document_type enum

🤖 Generated with Claude Code

## Summary - Add GDPR Article 28 compliant DPA as a new selectable document type in the generation engine - Create DPA template with all required sections: subject matter/duration, nature/purpose of processing, data types, data subjects, processor obligations, controller obligations, sub-processing terms, 72-hour breach notification, audit rights, data deletion/return, international transfers (EU/UK), and UK addendum - Add `POST /generate/data-processing-agreement` API endpoint - Update questionnaire route to accept `dpa` document type - Update all frontend components (document list, questionnaire page, review step) with DPA option - Add 7 unit tests covering template structure, GDPR section completeness, jurisdiction filtering, and clause validation ## Files changed (18) **New files:** - `packages/api/src/templates/dpa.ts` — DPA clause templates - `packages/api/src/routes/generate-dpa.ts` — Generation endpoint - `packages/api/tests/unit/dpa-template.test.ts` — Unit tests **Modified:** - DB schema, template index, document generator, LLM service, shared types - Questionnaire route, app entry point (route registration) - Frontend: questionnaire page, document list, review step, document viewer, agency client page - Test fixtures ## Test plan - [x] 7 unit tests pass (`bun test packages/api/tests/unit/dpa-template.test.ts`) - [ ] E2E: POST /generate/data-processing-agreement with completed questionnaire returns 201 - [ ] E2E: DPA appears in document list with correct label and color - [ ] Verify DB migration adds 'dpa' to document_type enum 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add GDPR Article 28 compliant DPA as a new document type in the generation
engine. Includes template with all required sections (subject matter, processor/
controller obligations, sub-processing, 72-hour breach notification, audit
rights, data deletion/return), API endpoint, frontend selectors, and unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pook merged commit 8fe42b39af into main 2026-04-09 06:14:21 -04:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot!29
No description provided.