""" Hub web application — serves the MeshBay SPA and static assets. The SPA (Preact + htm) handles: - Authentication (login, register, token refresh) - Group discovery and browsing - WebRTC connection to nodes for P2P file transfer - Dark/light theme with system preference detection Static files are served from meshbay_hub/static/ via Starlette StaticFiles. The root route (/) returns the SPA HTML shell. """ from pathlib import Path from fastapi import APIRouter from fastapi.responses import HTMLResponse STATIC_DIR = Path(__file__).parent.parent / "static" router = APIRouter(tags=["webapp"]) @router.get("/", response_class=HTMLResponse) async def index(): return HTMLResponse(_HTML) _HTML = """\ MeshBay
"""