PLAN.md:
- Add SERVER_BINARY, SERVER_PARAMS, STEAMCMD_PATH to env vars table
- Add testdata/ to project structure
- Add testing section (backend tests, stubs, frontend tests, make targets)
- Update process start flow with env var overrides
CODEBASE.md:
- Add testdata/ stubs to directory map
- Replace zustand with vitest/testing-library/jsdom in frontend deps
- Update CI to include test steps
- Update Makefile targets description
- Add atomic state machine to ProcessManager description
- Add env overrides and atomic state to design decisions
- Update data flow with env var overrides
README.md:
- Add SERVER_BINARY, SERVER_PARAMS, STEAMCMD_PATH to env vars table
- Remove FRONTEND_DIR (embedded frontend)
- Update Development section with make targets
- Stub now parses -profiles= arg and writes RPT entries to
profilesDir/arma3server_x64_<timestamp>.rpt
- RPT includes header (exe timestamp, computer name, OS) and periodic
entries (MissionEditor, World, Server: Player) on each heartbeat cycle
- New test TestStart_StubWritesRPTLog verifies RPT file creation and
content via the profiles directory
arma3server_x64 stub:
- Logs binary path and all arguments ([STUB] binary=... args=...)
- Prints heartbeat every 5 seconds
- Accepts -t N flag to exit after N seconds (for auto-exit tests)
steamcmd stub:
- Parses +force_install_dir and +workshop_download_item args
- Creates fake mod directories at the expected workshop content path
- Prints fake download progress and success logs
New tests:
- TestStart_StubLogsArgsAndPath: verifies arg logging via log streamer
- TestStart_StubLogsBinaryPath: verifies binary path logging
- TestStart_StubHeartbeatLogs: verifies heartbeat lines appear within timeout
- TestStart_StubAutoExit: verifies -t flag causes server to auto-exit
- TestDownloadMods_StubCreatesModDirs: verifies single mod dir creation
- TestDownloadMods_StubCreatesMultipleModDirs: verifies multi-mod dir creation
- TestDownloadMods_StubLogsAppear: verifies fake download logs on channel
- TestDownloadMods_StubSteamcmdArgsLogged: verifies install_dir logging
Relative paths resolved differently from project root vs backend/ CWD,
causing the stub arma3server_x64 to be copied to the wrong location.
Use $(abspath ...) so all paths are absolute and CWD-independent.
- ProcessManager.Start() reads SERVER_BINARY and SERVER_PARAMS from env
with platform-based defaults as fallback
- SteamCmdManager.run() reads STEAMCMD_PATH from env, defaults to
'steamcmd'
- Makefile: add SERVER_BINARY/SERVER_PARAMS/STEAMCMD_PATH variables,
copy stubs to dev-deploy in 'make dev', pass env vars to backend
- .gitignore: add bin/
- Extract fmtSize to src/utils/format.ts (was duplicated in Mods.tsx and Status.tsx)
- Remove duplicate ModEntry interface from ModlistEditor.tsx, import from types
- Refactor pages/ConfigEditor.tsx to use shared components/ConfigEditor.tsx
- Add enabled option to queries with undefined params to prevent premature fetches
- ProcessManager: atomic.Int32 state enum (idle/starting/running/stopping)
eliminates race between IsRunning check and Start/Stop
- SteamCmdManager: atomic.Bool with CompareAndSwap for same protection
- Restart() now propagates Stop() errors instead of swallowing them
- Full rewrite of PLAN.md to reflect current architecture (27 REST + 3 WS endpoints,
embedded frontend, automation, scheduler, health check, GoReleaser CI)
- Added health.go, mods.go, scheduler.go, robfig/cron dep to CODEBASE.md
- Added Gitea Actions CI/CD section to CODEBASE.md
- Added conventional commits to code style section
- Added missing API routes and embed/ to README.md
- Go binary defaults DATA_DIR=./data, SERVERFILE_DIR=./serverfiles
(relative to cwd) — just copy the binary and run
- MODS_DIR, CFG_DIR, PROFILES_DIR are derived from SERVERFILE_DIR
- Removed DEV_DEPLOY_DIR indirection (was only used for development)
- Makefile expands defaults to ../dev-deploy/... directly for dev
- FileFromFS with http.FS(embedFS) returned 301 redirects due to
Gin setting c.Request.URL.Path to a relative path for http.FileServer
- Replace with direct fs.ReadFile + Gin c.Data, determining content
type via mime.TypeByExtension
- Supports all asset types (JS, CSS, SVG, HTML) and SPA fallback
- New backend/embed package embeds frontend dist/ via //go:embed
- Go binary serves frontend from embedded FS (no external files needed)
- Dev mode uses placeholder dir (dev.txt) so Go compiles; Vite handles
frontend in dev mode
- Makefile copies frontend/dist/ to backend/embed/dist/ during build
- Removed FRONTEND_DIR env var and filesystem serving fallback
- Removed frontend path from Health API response and Status page frontend
section (only Served boolean remains)
- Removed frontendDir from Handler struct/constructor (unused)
Backend:
- New /api/server/health endpoint returning server, paths, disk,
mods, steamcmd, and frontend status
- Health endpoint checks directory existence/writability, disk usage,
server binary, and frontend dist availability
Frontend:
- New Status page (route /status) with sections for Server, SteamCMD,
Mods, Frontend, Directories (with exists/writable badges), and
Disk Usage (with size formatting and used-percent coloring)
- Paths are clickable to copy and use start-truncation (ellipsis on
the left) with native hover tooltip
- Health API client integration with 10s auto-refresh
Misc:
- Update .gitignore and Makefile, minor Layout nav addition
- RenderModlistHTML: generates compatible preset HTML from a modlist
- GET /api/modlists/:id/export: returns downloadable .html file
- Export button on ModlistEditor page
- Skips local mods (no workshop ID), includes only Steam workshop mods
- .goreleaser.yaml: cross-compile linux/windows, Docker image, Gitea releases
- .gitea/workflows/ci.yml: verify build on every push/PR
- .gitea/workflows/release.yml: goreleaser + Docker on tag push
- Dockerfile: switch to debian:bookworm-slim, install steamcmd from Valve
- Dockerfile.goreleaser: minimal image used by goreleaser dockers
- docker-compose.yml: parameterize SERVERS_DIR via env var