-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
85 lines (74 loc) · 2.72 KB
/
Copy pathMakefile
File metadata and controls
85 lines (74 loc) · 2.72 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
73
74
75
76
77
78
79
80
81
82
83
84
85
# GitHub Stars Constellation - Development Makefile
.PHONY: help install backend frontend frontend-react frontend-demo run clean clean-venv test lint format
# Default target
help:
@echo "🌟 GitHub Stars Constellation - Available Commands:"
@echo ""
@echo "📦 Installation & Setup:"
@echo " make install - Install Python dependencies with uv"
@echo " make clean-venv - Remove virtual environments"
@echo ""
@echo "🚀 Development Servers:"
@echo " make backend - Start FastAPI backend server (port 8001)"
@echo " make frontend - Start React frontend (port 5173)"
@echo " make frontend-demo - Start simple HTML demo (port 3001)"
@echo " make run - Start both backend and React frontend"
@echo ""
@echo "🔧 Development Tools:"
@echo " make test - Run Python tests"
@echo " make lint - Run code linting"
@echo " make format - Format code"
@echo " make clean - Clean build artifacts"
# Install dependencies
install:
@echo "🔧 Installing dependencies with uv..."
uv sync
@echo "✅ Dependencies installed successfully!"
# Start backend server
backend:
@echo "🚀 Starting FastAPI backend server..."
uv run python -m backend.main
# Start React frontend (Phase 4)
frontend:
@echo "🚀 Starting React frontend server..."
cd frontend-react && npm run dev
# Start simple frontend demo (Phase 3)
frontend-demo:
@echo "🚀 Starting simple frontend demo server..."
cd frontend && python3 -m http.server 3001
# Start both backend and React frontend
run:
@echo "🚀 Starting both backend and React frontend servers..."
@echo "Backend: http://localhost:8001"
@echo "Frontend: http://localhost:5173"
@echo "API Docs: http://localhost:8001/docs"
@$(MAKE) -j2 backend frontend
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
rm -rf backend/dist/ backend/build/ 2>/dev/null || true
rm -rf frontend-react/dist/ frontend-react/build/ 2>/dev/null || true
@echo "✅ Cleanup complete!"
# Clean virtual environments
clean-venv:
@echo "🧹 Removing virtual environments..."
rm -rf .venv backend/.venv 2>/dev/null || true
@echo "✅ Virtual environments removed!"
# Run tests
test:
@echo "🧪 Running tests..."
uv run python -m pytest backend/tests/ -v
# Run linting
lint:
@echo "🔍 Running linters..."
uv run python -m black --check backend/
uv run python -m isort --check-only backend/
uv run python -m mypy backend/
# Format code
format:
@echo "✨ Formatting code..."
uv run python -m black backend/
uv run python -m isort backend/