# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview A minimal cloud-native Go web application using the Gin framework. Serves a greeting endpoint on port 8000 and exposes Prometheus metrics on port 8080. All application logic lives in `cmd/main.go`. ## Build & Run Commands ```bash # Build locally (requires Go 1.23+, toolchain 1.24.11) go build -tags netgo -ldflags "-linkmode 'external' -extldflags '-static'" -o server ./cmd # Run locally GIN_MODE=release ./server # Build and run via Docker Compose (ports 8000 + 8080) docker-compose up --build # Kubernetes deployment kubectl apply -f deployment.yaml ``` ## Architecture - **Single-file app** (`cmd/main.go`): Dual Gin routers — app router on `:8000`, metrics router on `:8080` - **Environment variables**: `USERNAME`, `MY_POD_NAME` (used in greeting response) - **Metrics**: gin-metrics library exposes Prometheus metrics at `/metrics` on the metrics router - **Deployment**: Multi-stage Dockerfile producing a scratch-based static binary; Kubernetes manifests with Traefik ingress and PodMonitor - **CI/CD**: Woodpecker CI (`.woodpecker.yaml`) builds with Kaniko and pushes to `git.codemowers.io` registry - **No tests, no database, no linter configuration** - `templates/` and `static/` directories exist but are not currently wired up in the router