-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (63 loc) · 2.95 KB
/
Makefile
File metadata and controls
72 lines (63 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.PHONY: help install install-backend install-frontend dev dev-backend dev-frontend test test-backend test-frontend test-coverage test-coverage-backend test-coverage-frontend build build-frontend quality quality-backend quality-frontend clean clean-backend clean-frontend
help: ## Show this help message
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Installation
install: install-backend install-frontend ## Install all dependencies
install-backend: ## Install backend dependencies
cd backend && uv sync
install-frontend: ## Install frontend dependencies
cd frontend && npm install
# Development servers
dev: ## Start both development servers (backend + frontend)
@echo "Starting backend and frontend development servers..."
@echo "Backend will be available at http://localhost:8000"
@echo "Frontend will be available at http://localhost:5173"
@make dev-backend & make dev-frontend
dev-backend: ## Start backend development server
cd backend && make dev
dev-frontend: ## Start frontend development server
cd frontend && make dev
# Testing
test: test-backend test-frontend ## Run all tests
test-backend: ## Run backend tests
cd backend && make test
test-frontend: ## Run frontend tests
cd frontend && make test
test-coverage: test-coverage-backend test-coverage-frontend ## Run all tests with coverage
test-coverage-backend: ## Run backend tests with coverage
cd backend && make test-coverage
test-coverage-frontend: ## Run frontend tests with coverage
cd frontend && make test-coverage
# Building
build: build-frontend ## Build all components
build-frontend: ## Build frontend for production
cd frontend && make build
# Code quality
quality: quality-backend quality-frontend ## Run all quality checks
quality-backend: ## Run backend quality checks
cd backend && make quality
quality-frontend: ## Run frontend quality checks
cd frontend && make quality
# Cleaning
clean: clean-backend clean-frontend ## Clean all build artifacts
clean-backend: ## Clean backend build artifacts
cd backend && find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
cd backend && find . -type f -name "*.pyc" -delete 2>/dev/null || true
cd backend && rm -rf .pytest_cache htmlcov coverage.xml 2>/dev/null || true
clean-frontend: ## Clean frontend build artifacts
cd frontend && make clean
# Full development workflow
setup: install ## Complete project setup
@echo "Installing pre-commit hooks..."
cd backend && make pre-commit-install
cd frontend && make pre-commit-install
@echo "Project setup complete!"
@echo "Run 'make dev' to start development servers"
@echo "Run 'make test' to run all tests"
@echo "Run 'make quality' to run all quality checks"
# Production preparation
prod-prep: build ## Prepare for production deployment
@echo "Production build complete!"
@echo "Backend: cd backend && make start"
@echo "Frontend: Serve the dist/ directory from frontend/"