Skip to content

[FEATURE]: implement Background Data Export System (GDPR Compliance) #225

Description

@ErebAsh

Background & Context

Under GDPR and CCPA regulations, users must be able to request and download a complete copy of their personal data. Currently, compiling all user data (meetings, transcripts, action items, organizations, and AI summaries) on-the-fly during a single HTTP request will result in timeouts for power users. We need to leverage our existing bullmq infrastructure to process data export requests asynchronously in the background.

Acceptance Criteria

  • Queue Creation: A new BullMQ queue named data-export-queue is initialized in server/services/queueService.js.
  • Trigger Endpoint: A new endpoint POST /api/user/request-data-export is created, which adds a job to the queue and returns a 202 Accepted response.
  • Worker Logic: A background worker is implemented to:
    • Query all documents associated with the requesting userId across all relevant collections (User, Meetings, Memberships).
    • Format the data into structured, readable formats (e.g., JSON and CSV).
    • Compress the generated files into a single .zip archive.
  • Storage: The .zip file is securely saved to a temporary local directory or a cloud storage bucket (e.g., AWS S3).
  • Notification: Once the zip is ready, the worker utilizes the nodeMailer service to send an email to the user containing a secure, time-limited download link.
  • Rate Limiting: A strict rate limit is applied to the trigger endpoint (e.g., maximum 1 export request per 24 hours per user) to prevent queue flooding.

Technical Implementation Notes

  • Dependencies: You may need to introduce a library like archiver or jszip to handle the creation of the .zip file within the worker.
  • Security: Ensure the generated download link is authenticated or uses a secure, expiring presigned URL. Do not expose static files publicly.
  • Error Handling: If the worker fails, it should retry automatically (configured via BullMQ) and eventually send a failure notification email if all retries are exhausted.

Out of Scope

  • Account deletion (right to be forgotten). This is handled in a separate epic.
  • Exporting raw audio/video files (only transcripts and structured data are required for this iteration).

{
"assignedAt": null,
"lastActivityAt": null,
"reminder12SentAt": null,
"reminder18SentAt": null,
"expiredAt": null,
"welcomeSentAt": "2026-07-13T17:25:22.326Z",
"welcomeSource": "claim",
"guidance": {},
"processedClaimCommentIds": [
4960720933
],
"processedUnclaimCommentIds": []
}

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions