.PHONY: help build run test clean migrate-up migrate-down docker-up docker-down help: ## Show this help message @echo 'Usage: make [target]' @echo '' @echo 'Available targets:' @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST) build: ## Build the application @echo "Building..." @go build -o bin/server ./cmd/server run: ## Run the application @echo "Running..." @go run ./cmd/server test: ## Run tests @echo "Running tests..." @go test -v ./... test-coverage: ## Run tests with coverage @echo "Running tests with coverage..." @go test -v -coverprofile=coverage.out ./... @go tool cover -html=coverage.out -o coverage.html lint: ## Run linter @echo "Running linter..." @golangci-lint run fmt: ## Format code @echo "Formatting code..." @go fmt ./... clean: ## Clean build artifacts @echo "Cleaning..." @rm -rf bin/ @rm -f coverage.out coverage.html migrate-up: ## Run database migrations up @echo "Running migrations up..." @go run cmd/migrate/main.go up migrate-down: ## Run database migrations down @echo "Running migrations down..." @go run cmd/migrate/main.go down migrate-create: ## Create a new migration (usage: make migrate-create name=create_users_table) @echo "Creating migration: $(name)" @go run cmd/migrate/main.go create $(name) docker-up: ## Start Docker services @echo "Starting Docker services..." @docker-compose up -d docker-down: ## Stop Docker services @echo "Stopping Docker services..." @docker-compose down docker-logs: ## View Docker logs @docker-compose logs -f dev: ## Run in development mode with hot reload @echo "Starting development server..." @air install-tools: ## Install development tools @echo "Installing development tools..." @go install github.com/cosmtrek/air@latest @go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest