Backend: - Complete FastAPI backend with 42+ REST endpoints (auth, servers, config, players, bans, missions, mods, games, system) - Game adapter architecture with Arma 3 as first-class adapter - WebSocket real-time events for status, metrics, logs, players - Background thread system (process monitor, metrics, log tail, RCon poller) - Fernet encryption for sensitive config fields at rest - JWT auth with admin/viewer roles, bcrypt password hashing - SQLite with WAL mode, parameterized queries, migration system - APScheduler cleanup jobs for logs, metrics, events Frontend: - Server Detail page with 7 tabs (overview, config, players, bans, missions, mods, logs) - Settings page with password change and admin user management - Create Server wizard (4-step; known bug: silent validation failure) - New hooks: useServerDetail, useAuth, useGames - New components: ServerHeader, ConfigEditor, PlayerTable, BanTable, MissionList, ModList, LogViewer, PasswordChange, UserManager - WebSocket onEvent callback for real-time log accumulation - 120 unit tests passing (Vitest + React Testing Library) Docs: - Added .gitignore, CLAUDE.md, README.md - Updated FRONTEND.md, ARCHITECTURE.md with current implementation state - Added .env.example for backend configuration Known issues: - Create Server form: "Next" buttons don't validate before advancing, causing silent submit failure when fields are invalid - Config sub-tabs need UX redesign for non-technical users
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class CreateServerRequest(BaseModel):
|
|
name: str
|
|
description: str | None = None
|
|
game_type: str = "arma3"
|
|
exe_path: str
|
|
game_port: int = Field(ge=1024, le=65535)
|
|
rcon_port: int | None = Field(default=None, ge=1024, le=65535)
|
|
auto_restart: bool = False
|
|
max_restarts: int = Field(default=3, ge=0, le=20)
|
|
|
|
|
|
class UpdateServerRequest(BaseModel):
|
|
name: str | None = None
|
|
description: str | None = None
|
|
exe_path: str | None = None
|
|
game_port: int | None = Field(default=None, ge=1024, le=65535)
|
|
rcon_port: int | None = Field(default=None, ge=1024, le=65535)
|
|
auto_restart: bool | None = None
|
|
max_restarts: int | None = None
|
|
|
|
|
|
class StopServerRequest(BaseModel):
|
|
force: bool = False
|
|
reason: str | None = None
|
|
|
|
|
|
class UpdateConfigSectionRequest(BaseModel):
|
|
config_version: int | None = None # Required for optimistic locking on PUT
|
|
# All other fields come from the adapter's JSON Schema — passed through as-is
|
|
model_config = {"extra": "allow"} |