Gioca: the round, the player's funds and their bet; the bet is two steps
(a confirmation screen that sends nothing, then an explicit confirm) with a
fresh idempotency key per screen, and the server re-checks everything.
Portafoglio: spendable apart from in-confirmation, deposit address with a QR
of the player's own address, copy button, simulated test deposits.
Movimenti: the player's own ledger, paged, stacked as cards on a phone.
GET /app/stato/ feeds the page and its polling. Every view takes the user from
the session only. Checked end to end in a real browser (Playwright): status
moves from pending to confirmed without a reload, a double click is one bet.
Mutation checks: cross-account leak, non-idempotent POST and unrestricted
test-deposit amounts are all caught.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
public_state() feeds both the server-rendered home (works without JavaScript)
and GET /stato/, so they cannot disagree: none, open, closing, drawing, paying
and maintenance, the round's own quota, the winner's 70% of the *confirmed*
pool, bets in flight apart, and the closing time on the server's clock. home.js
counts down against the server clock and polls every 5 s while visible. Checked
in headless Chromium on mobile and desktop widths. Also records the profile
reports (WEB-55, roadmap A9) and the name-lock trade-off (LIM-24).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Registration (case-insensitive unique names, 8-256 char passwords, no email),
sign-in with a generic error and a fresh session, internal-only ?next=,
POST-only sign-out, password change that closes the other sessions. The
failed-login backoff, the registration quota and the password-change guard
live in the database so every web process shares them; the client IP is the
last X-Forwarded-For hop. One responsive stylesheet with light/dark theme,
labelled fields, alerts and no inline scripts or styles; Italian error pages
and a readable CSRF failure. Mutation checks: open redirects, uncounted
failures and a missing CSRF middleware are all caught.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>