clipwright/dashboard
juancarlos.cavero 1d9fef7445 feat(cloud): self-service account deletion (GDPR art. 17)
The privacy policy already told users that "deleting your account from the
dashboard removes your content" — there was no way to do it. This adds one:
Account -> Delete account in the dashboard, DELETE /api/account on the server.

The endpoint refuses API-key auth (a leaked osk_ must not destroy the account
it was issued from) and requires the caller to retype the account email; the UI
does the same, collapsed behind a danger zone that itemises what actually goes.
Erasure is immediate and irreversible, because after it there is nothing left
to authenticate a recovery request against.

The order of the steps is the design, each one a failure mode:

- Stripe cancel first, aborting everything if it fails, so we never erase a
  user we are still billing. An InvalidRequestError is treated as already
  cancelled: a portal cancellation whose webhook never landed leaves our row
  reading "active" forever, and the one account that could not be deleted
  would be the one Stripe already stopped charging.
- R2 before the database, because those rows are the only index of which
  objects belong to the user; dropping them first turns a failed purge into
  permanent orphans.
- The DB delete is one transaction over an explicit table list, not the
  declared ON DELETE CASCADEs: create_all never ALTERs an existing table, so a
  constraint added after a table shipped lives in the models and not in
  production. tests/test_account_erasure.py fails if a new table references
  users.id without joining that list.
- A reserved usage_ledger row blocks the delete: erasing under a running job
  would pull the output from beneath it and leave the reservation unsettled.

What survives, and why: the Stripe customer and its invoices (six years,
Spanish commercial law) and one account_deletions row holding a sha256 of the
email as proof the erasure happened, itself purged after five years by the
retention sweeper. app.py registers a callback so the working files in output/
and uploads/ go too instead of waiting for the hourly sweep.

Privacy policy sections 6 (EN + ES) now point at the button and name both
survivors; the Legal hub summary says the same in one line.
2026-08-24 19:12:05 +02:00
..
public feat(seo): canvas screenshot on the n8n page, and link it from the landing 2026-08-21 21:41:58 +02:00
seo feat(cloud): self-service account deletion (GDPR art. 17) 2026-08-24 19:12:05 +02:00
src feat(cloud): self-service account deletion (GDPR art. 17) 2026-08-24 19:12:05 +02:00
.gitignore improve video preview 2025-12-21 01:59:15 +01:00
Dockerfile fix(analytics): make product analytics opt-in and host-scoped 2026-07-28 09:58:33 +02:00
eslint.config.js added front-end and backend 2025-12-19 17:59:03 +01:00
index.html feat(dashboard): make the app usable on a phone 2026-08-24 02:25:24 +02:00
nginx.conf fix(seo): permanent apex redirect, real 404s, and gallery links that resolve 2026-07-27 11:48:33 +02:00
package-lock.json feat: Add Remotion integration for animated subtitles, hooks and effects 2026-04-10 14:00:11 +02:00
package.json feat: Add Remotion integration for animated subtitles, hooks and effects 2026-04-10 14:00:11 +02:00
postcss.config.js added front-end and backend 2025-12-19 17:59:03 +01:00
README.md added front-end and backend 2025-12-19 17:59:03 +01:00
tailwind.config.js feat(dashboard): make the app usable on a phone 2026-08-24 02:25:24 +02:00
vite-plugin-seo.js feat(legal): full legal corpus — Terms, Privacy, Legal Notice in EN+ES 2026-08-19 22:06:11 +02:00
vite.config.js feat(seo): make the site readable by AI crawlers 2026-07-27 10:56:15 +02:00

React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.