# Data Deletion (LGPD / GDPR / Play DSA)

The app exposes user-initiated deletion in two surfaces:

1. **In-app**: Perfil → Apagar conta e dados → confirmation → calls
   `DELETE /v1/users/me`. Backend wipes closet items, saved looks,
   feedback rows, and styling sessions associated with the user ID.
2. **Web form**: `https://api-production-4a83.up.railway.app/delete` — documents
   the deletion process and support contact while in-app deletion remains the
   primary self-service surface.

## Backend behaviour

- `InMemoryStore.delete_user` and `SqlStore.delete_user` remove all
  rows for the user ID synchronously (closet, saved looks, feedback,
  calendar entries, profile, device tokens, styling sessions).
- Uploaded files in object storage are removed by a daily janitor job
  that compares `uploads` rows against active user IDs.

## Data export (portability)

- `GET /v1/users/me/export` returns a single JSON payload containing
  profile, closet, saved looks, calendar, feedback, uploads, and
  devices associated with the user — fulfilling the LGPD / GDPR
  portability right without support tickets.

## Audit

Each delete call is logged with timestamp and request ID, retained for
6 months for audit and abuse-prevention purposes.