Skip to content

Implement admin web interface #346

@ann7415

Description

@ann7415

Implement a lightweight admin web interface served by the game server (embedded static assets) with authenticated REST endpoints.

Scope:
Serve embedded static files:
GET / -> admin page
GET /style.css -> styling
GET /app.js -> frontend logic

Authentication:
Require Authorization: Bearer on all /api/* routes
Return 401 on missing/invalid token

Read endpoints:
GET /api/status -> { ok, sessions, rooms }
GET /api/rooms -> list rooms with { roomId, name, players, maxPlayers, playerNames }
GET /api/sessions -> list sessions with { id, username, authed, ip, port, roomId|null }

Moderation endpoints:
POST /api/kick { who: <sessionId|string username> }:
Remove from room if present
Remove server-side session
Return { ok: true } or proper errors (400/404/500)
POST /api/kickroom { roomId, who }:
Only remove player from the specified room (do not drop session)
POST /api/banroom { roomId, who }:
Ban username at room level and kick from that room if currently inside
POST /api/unbanroom { roomId, who }:
Remove username from room ban list

Server control:
POST /api/shutdown -> triggers onShutdown callback

Metadata

Metadata

Assignees

Labels

graphicsVisual rendering, shaders, or graphical issues.serverIssues related to the server-side implementation.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions