.PHONY: help install dev test clean validate

help:
	@echo "ImageCreator - Available commands:"
	@echo "  make install    - Install all dependencies"
	@echo "  make dev        - Start development servers"
	@echo "  make test       - Run all tests"
	@echo "  make validate   - Run validation scripts"
	@echo "  make clean      - Clean build artifacts"

install:
	cd backend && pip install -r requirements.txt
	cd frontend && npm install

dev-backend:
	cd backend && uvicorn app.main:app --host 0.0.0.0 --port 3611 --reload

dev-frontend:
	cd frontend && npm run dev

test:
	cd backend && pytest tests/ -v

validate:
	bash scripts/validate.sh

clean:
	find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
	find . -type d -name "node_modules" -exec rm -rf {} + 2>/dev/null || true
	find . -type d -name "dist" -exec rm -rf {} + 2>/dev/null || true
	find . -type f -name "*.pyc" -delete 2>/dev/null || true