mud_server.web.routes
WebUI routes for serving the admin dashboard shell, play shell, and static assets.
This module intentionally keeps server-side logic minimal: - Serves a single HTML shell for /admin and /admin/*. - Serves a single HTML shell for /play and /play/<world_id>/*. - Delegates all application behavior to client-side JS. - Uses FastAPI’s StaticFiles to serve CSS/JS assets.
No authentication logic lives here; the client authenticates against existing API endpoints and enforces role checks. Server-side role checks remain in the API layer.
Attributes
Functions
Build the admin WebUI router for serving the HTML shell. |
|
Build the play WebUI router for serving the play shell. |
|
Backwards-compatible wrapper that returns the admin router. |
|
|
Register WebUI routes and static assets on the FastAPI app. |
Module Contents
- mud_server.web.routes.ADMIN_ASSET_VERSION = '20260315a'
- mud_server.web.routes.PLAY_ASSET_VERSION = '20260226c'
- mud_server.web.routes.APP_VERSION
- mud_server.web.routes.templates
- mud_server.web.routes.build_admin_router()[source]
Build the admin WebUI router for serving the HTML shell.
- Returns:
APIRouter configured to serve the admin dashboard shell.
- Return type:
fastapi.APIRouter
- mud_server.web.routes.build_play_router()[source]
Build the play WebUI router for serving the play shell.
The play UI is a single-page shell. Client-side routing handles specific subpaths like /play/<world_id>/rooms/…