This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Full build (frontend + backend):
make buildFrontend only:
npm install
npm run build # production
npm run watch # development with hot reloadBackend only (from src/):
cd src && go build -o ../factorio-server-manager/factorio-server-manager .Cross-platform release:
make gen_release # builds Linux and Windows binariesClean:
make cleanBackend tests:
cd src && go test ./... -v
cd src && go test ./... -v -test.short # faster, skips integration testsFor mod-related tests, set environment variables in src/.env:
factorio_username/factorio_password- Factorio portal credentials
Frontend: No dedicated test suite; relies on webpack build success.
This is a full-stack web application for managing Factorio game servers.
api/- REST API handlers and WebSocket endpointsfactorio/- Factorio server control (saves, mods, config, RCON)bootstrap/- Configuration and user initialization- Key dependencies: gorilla/mux (router), gorilla/websocket, gorm+sqlite3 (users DB)
App/components/- Reusable UI componentsApp/views/- Page components (Controls, Saves, Mods, Logs, Console, Settings)api/- API client layer with resource-specific modulesapi/socket.js- WebSocket for real-time log streaming- Built with Webpack, outputs to
app/bundle.jsandapp/style.css - Uses Tailwind CSS for styling
- Backend serves frontend static files from
app/ - WebSocket provides real-time game console output
- RCON protocol used for Factorio server communication
- Mod portal integration for downloading mods from official Factorio API
Primary deployment method. See docker/README.md for details.
Dockerfile- Production (downloads pre-built binaries)Dockerfile-local- Development (builds from source)- Docker Hub:
ofsm/ofsm