From ac5ee2ac2c236cf1eaba490ce16794d26a9a7590 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Tue, 21 Jul 2026 10:27:05 +0200 Subject: [PATCH] Add static test UI for manual QA Single-page vanilla HTML/JS frontend (register/login, balance, place bet, withdraw) served by FastAPI at the same origin so it can exercise the live API without CORS setup. Manual-testing aid only, not part of the MVP spec. Co-Authored-By: Claude Sonnet 5 --- app/main.py | 4 ++ app/static/index.html | 149 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 app/static/index.html diff --git a/app/main.py b/app/main.py index c36cd28..177b0e1 100644 --- a/app/main.py +++ b/app/main.py @@ -2,6 +2,7 @@ import asyncio from contextlib import asynccontextmanager from fastapi import FastAPI +from fastapi.staticfiles import StaticFiles import app.bets.confirmation # noqa: F401 (registers the "bet" confirmation handler) import app.rounds.confirmation # noqa: F401 (registers the "payout" confirmation handler) @@ -61,3 +62,6 @@ app.include_router(admin_router) @app.get("/health") async def health() -> dict[str, str]: return {"status": "ok"} + + +app.mount("/", StaticFiles(directory="app/static", html=True), name="static") diff --git a/app/static/index.html b/app/static/index.html new file mode 100644 index 0000000..5e04ca1 --- /dev/null +++ b/app/static/index.html @@ -0,0 +1,149 @@ + + + + +PLM Lottery - Test UI + + + + +

PLM Lottery - Test UI

+ +
+
+
+

Registrati

+ + + + + +
+
+

Login

+ + + + + +
+
+
+ + + +

Log

+

+
+
+
+
+