Skip to content

feat(privacy): PII export & delete workflow (GDPR-ready)#1051

Open
zp6 wants to merge 4 commits into
rohitdash08:mainfrom
zp6:feat/pii-export-delete
Open

feat(privacy): PII export & delete workflow (GDPR-ready)#1051
zp6 wants to merge 4 commits into
rohitdash08:mainfrom
zp6:feat/pii-export-delete

Conversation

@zp6
Copy link
Copy Markdown

@zp6 zp6 commented May 15, 2026

Changes

Implements GDPR-ready PII export and deletion as requested in #76.

New files

  • packages/backend/app/routes/privacy.py - Two authenticated endpoints:
    • GET /privacy/export - Exports all user data (profile, expenses, categories, bills, reminders, subscriptions) as JSON
    • DELETE /privacy/delete - Irreversibly deletes all personal data (requires {"confirm": "DELETE_MY_DATA"} body)
  • packages/backend/app/services/privacy.py - Service layer with export_user_data() and delete_user_data()

Modified files

  • packages/backend/app/routes/__init__.py - Register privacy blueprint at /privacy

Security

  • Both endpoints require JWT authentication
  • Deletion requires explicit confirmation string
  • Deletion happens in dependency order (children first)
  • Audit logs are retained with user_id=NULL for compliance
  • All operations are logged

Testing

`�ash
curl -H 'Authorization: Bearer ' http://localhost:5000/privacy/export
curl -X DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d '{"confirm":"DELETE_MY_DATA"}' http://localhost:5000/privacy/delete
``n
Fixes #76


Wallet: zp6

@zp6 zp6 requested a review from rohitdash08 as a code owner May 15, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PII Export & Delete Workflow (GDPR-ready)

1 participant