# zhealth Makefile # Run `make help` to see available commands .PHONY: help build release lint typecheck test clean serve stop # Default target help: @echo "Available commands:" @echo " make serve - Start both backend and frontend servers" @echo " make stop - Stop running backend and frontend servers" @echo " make build - Build for development" @echo " make release - Build optimized production bundle" @echo " make migrate - Run database migrations" @echo " make seed - Seed database with initial data" @echo " make lint - Run linters (Clippy + ESLint)" @echo " make typecheck - Type checking (Rust + TypeScript)" @echo " make test - Run all tests" @echo " make clean - Clean build artifacts" stop: @echo "Stopping backend (port 3000) and frontend (port 5173)..." -@lsof -ti :3000 | xargs -r kill 2>/dev/null || true -@lsof -ti :5173 | xargs -r kill 2>/dev/null || true @echo "Servers stopped" # Backend commands .PHONY: backend-dev backend-build backend-release backend-lint backend-test migrate seed migrate: cd backend && cargo run -- migrate seed: cd backend && cargo run -- seed backend-dev: cd backend && cargo run -- serve backend-build: cd backend && cargo build backend-release: cd backend && cargo build --release backend-lint: cd backend && cargo clippy -- -D warnings backend-test: cd backend && cargo test # Frontend commands .PHONY: frontend-dev frontend-build frontend-release frontend-lint frontend-test frontend-install frontend-install: cd frontend && npm install frontend-dev: cd frontend && npm run dev frontend-build: cd frontend && npm run build frontend-release: cd frontend && npm run build frontend-lint: cd frontend && npm run lint frontend-test: @echo "Frontend tests not yet configured" # Combined commands build: backend-build frontend-build release: backend-release frontend-release lint: backend-lint frontend-lint typecheck: backend-lint frontend-lint test: backend-test frontend-test serve: @echo "Starting backend (port 3000) and frontend (port 5173)..." @cd backend && cargo run -- serve & cd frontend && npm run dev clean: cd backend && cargo clean cd frontend && rm -rf node_modules dist @echo "Cleaned build artifacts"