Files
plm-lottery/docs/adr/ADR-50-frontend-statici-senza-framework-ne-build.md
davideandClaude Sonnet 5.5 24e5fc3d8b Bound credentials, brake password changes, cap bug reports, page the user list, structure every error (B-94, SEC-54, SEC-55, API-09, API-15, API-16, API-19, API-21, API-28, API-33, REG-12, AUD-42)
- login and password-change fields: at most 256 characters
- wrong current password: per-user brake (5 free, 2s doubling to 300s), 429 even for the
  right password while locked; password_changed audited in the same transaction
- POST /bug-reports: 10 per IP per hour, consumed only by a stored report
- GET /admin/users: limit/after_id paging, the panel walks the pages
- 401/403/404/405/422/503 all answer {code, message, params}; the 422 omits the input
- static files revalidated on every use (Cache-Control: no-cache)
- error.* keys for the new codes in all seven languages

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 00:59:25 +02:00

891 B

ADR-50 — Frontend statici, senza framework né build

  • Stato: Accettata
  • Area: Interfacce, API e lingue
  • Fonte di verità per: la scelta di progetto descritta qui sotto; i requisiti (PREFISSO-NN) che la attuano stanno nei documenti di dominio, indicati nelle Conseguenze.

Decisione

Frontend statici, senza framework né build: due SPA servite direttamente da FastAPI, che parlano con la stessa API JSON (nessuna separazione fra API utente e admin oltre al controllo del token). Le pagine HTML hanno Cache-Control: no-store, i file JS e CSS Cache-Control: no-cache (il browser li riconvalida a ogni caricamento, così un aggiornamento non lascia una pagina nuova con uno script vecchio; architettura.md, B-94).

Codice: app/main.py:index_page · app/main.py:admin_panel · app/static/app.js · app/static/admin.js