Skip to content

Add a data-retention and account-deletion policy + implementation #504

Description

@Codex723

Summary

Design and implement a user-initiated account deletion flow (or documented manual process) compliant with typical data-protection expectations for a fintech app.

Difficulty

Advanced — estimated effort: ~3-7 days (may need discussion before starting). Labels: backend, security, design, advanced

Where to Work

  • See relevant files referenced in the description above.

How to Approach This

  1. Locate the relevant file(s) below under src/app/api/ or src/lib/.
  2. Check src/lib/api-response.ts and follow its existing success/error response shape — don't invent a new one.
  3. If you're touching validation, add/extend a Zod schema in src/lib/validations.ts rather than validating inline.
  4. If the change affects the database, check prisma/schema.prisma first and run npx prisma generate after any schema edit.
  5. Add or update tests near the affected route/lib file (create a __tests__ folder alongside it if one doesn't exist yet, matching the project's existing test conventions).
  6. Manually verify with npm run dev and a tool like curl or Postman/Insomnia against the affected endpoint before opening a PR.

Acceptance Criteria

  • Behavior described above is implemented in the file(s) listed under "Files Likely Affected".
  • Response shape follows the existing convention in src/lib/api-response.ts.
  • Input validation (if applicable) is added via src/lib/validations.ts, not inline.
  • Tests added/updated covering both the happy path and at least one failure/edge case.
  • Manually verified against a running local server (npm run dev).
  • No new TypeScript or lint errors (npm run lint, tsc --noEmit).

Notes for Contributors

Comment on this issue before starting so it can be assigned to you and duplicate work is avoided. If the described approach doesn't quite fit once you're in the code (e.g. the file has moved, or there's a cleaner way to do it), that's fine — leave a comment explaining the deviation in your PR description rather than silently changing scope.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions