docs: update root .md files to reflect current frontend state and planned UX enhancements

- ARCHITECTURE.md: fix diagram (Server Detail was "planned", now complete), expand
  frontend directory listing with all 5 pages, all server components, all hooks
- FRONTEND.md: note planned terrain/display_name/workshop_id fields on Mission/Mod
  types; add planned hooks table for Phases 1-5 of UX enhancement plan
- MODULES.md: annotate PlayerRepository with get_by_slot() and ThreadRegistry with
  get_rcon_client() as planned additions in Phase 4
- API.md: add "Upcoming Endpoints" section documenting all planned routes for
  Phases 1-5 of the UX enhancement plan
- README.md: update unit test count (69 → ~120), update frontend structure comment
  to list all current pages/components/hooks
This commit is contained in:
Tran G. (Revernomad) Khoa
2026-04-17 15:50:33 +07:00
parent a688bdfdf9
commit e71dd9a600
5 changed files with 73 additions and 12 deletions

View File

@@ -205,11 +205,22 @@ All server data flows through TanStack Query hooks:
**Key type notes**:
- `Server` type in `useServers.ts` uses `game_port`, `current_players`, `max_players` (matches enriched API response)
- `Mission` type: `{ name, filename, size_bytes }` (not DB schema fields)
- `Mod` type: `{ name, path, size_bytes, enabled }` (not DB schema fields)
- `Mission` type: `{ name, filename, size_bytes }` `terrain` field planned (Phase 2 UX enhancement)
- `Mod` type: `{ name, path, size_bytes, enabled }` `display_name`, `workshop_id` fields planned (Phase 3 UX enhancement)
- `Ban` type: `{ id, server_id, guid, name, reason, banned_by, banned_at, expires_at, is_active, game_data }` (matches API)
- There is no REST endpoint for logs — logs are only pushed via WebSocket events
**Planned hooks (UX Enhancement Plan):**
| Hook | Phase | Endpoint |
|---|---|---|
| `useConfigUISchema(serverId)` | Phase 1 | `GET /api/servers/:id/config/ui-schema` |
| `useMissionRotation(id)` | Phase 2 | `GET /api/servers/:id/missions/rotation` |
| `useUpdateMissionRotation(id)` | Phase 2 | `PUT /api/servers/:id/missions/rotation` |
| `useKickPlayer(id)` | Phase 4 | `POST /api/servers/:id/players/:slot_id/kick` |
| `useBanPlayer(id)` | Phase 4 | `POST /api/servers/:id/players/:slot_id/ban` |
| `useLogFiles(id)` | Phase 5 | `GET /api/servers/:id/logfiles` |
QueryClient defaults: `staleTime: 10s`, `retry: 2`, `refetchOnWindowFocus: false`.
### Client State (Zustand)