Description
Fulfill GDPR-portability by adding POST /admin/data/export/:user_id which enqueues a background export and, when complete, emails the user a time-limited signed URL to their export bundle.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/routes/admin/dataExport.ts (new), src/workers/dataExport.ts (new)
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/gdpr-data-export
- Implement changes
- Enqueue background job producing NDJSON bundle to object storage
- Sign a 48h URL with HMAC; email to user
- Log audit entry with admin id, target user id, job id
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- export failure (retry with backoff), user with zero data, URL expired at click time
- Include test output and security notes
Example commit message
feat: GDPR data export endpoint
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Fulfill GDPR-portability by adding
POST /admin/data/export/:user_idwhich enqueues a background export and, when complete, emails the user a time-limited signed URL to their export bundle.Requirements and context
src/routes/admin/dataExport.ts(new),src/workers/dataExport.ts(new)Suggested execution
git checkout -b feat/gdpr-data-exportTest and commit
npm testExample commit message
feat: GDPR data export endpointGuidelines