# Justfile for Go Project Management # List all available recipes default: @just --list # --- Backend --- # Build the API server build-api: go build -o bin/api ./cmd/api # Run the API server locally run-api: go run ./cmd/api # Start the API and Database using Docker Compose docker-up: docker compose up --build -d # Stop Docker Compose services docker-down: docker compose down # Run all tests test: go test ./... # Run tests with verbose output test-v: go test -v ./... # Clean build artifacts clean: rm -rf bin/ # --- TUI --- # Build the Terminal UI build-tui: go build -o bin/tui ./cmd/tui # Run the Terminal UI run-tui: go run ./cmd/tui # --- GUI --- # Build the GUI (Fyne) build-gui: go build -o bin/gui ./cmd/gui # Run the GUI run-gui: go run ./cmd/gui # --- Web --- # Install web dependencies web-install: cd web && npm ci # Run the web app's dev server web-dev: cd web && npm start # Build the web app for production (output: web/dist/web) web-build: cd web && npm run build # Run the web app's tests web-test: cd web && npm test # --- Database --- # Generate Go code from SQL (requires sqlc) sqlc: sqlc generate # Write the OpenAPI spec to api/openapi.json openapi: go run ./cmd/openapi # Connect to the running database via psql db-shell: docker compose exec db psql -U postgres -d gamedb