forked from cfchase/multi-agent-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
114 lines (90 loc) · 4.09 KB
/
Makefile
File metadata and controls
114 lines (90 loc) · 4.09 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Multi-Agent Platform Makefile
# Container Registry Operations
REGISTRY ?= quay.io/cfchase
TAG ?= latest
# Auto-detect container tool (docker preferred, then podman)
CONTAINER_TOOL ?= $(shell ./scripts/lib/detect-container-tool.sh)
export CONTAINER_TOOL
# Include modular makefiles
include makefiles/db.mk
include makefiles/services.mk
include makefiles/build.mk
include makefiles/deploy.mk
include makefiles/helm.mk
include makefiles/test.mk
.PHONY: help setup setup-frontend setup-backend dev dev-frontend dev-backend dev-2 dev-frontend-2 dev-backend-2
.PHONY: env-setup sync-version bump-version show-version health-backend health-frontend
.PHONY: clean clean-all fresh-start quick-start
# Default target
help: ## Show this help message
@echo "Multi-Agent Platform - Available commands:"
@echo ""
@grep -hE '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Setup and Installation
setup: ## Install all dependencies
@echo "Installing frontend dependencies..."
cd frontend && npm install
@echo "Installing backend dependencies (including dev dependencies)..."
cd backend && uv sync --extra dev
@echo "Setup complete!"
setup-frontend: ## Install frontend dependencies only
cd frontend && npm install
setup-backend: ## Install backend dependencies only
cd backend && uv sync --extra dev
# Development
dev: ## Run frontend and backend (run services-start first)
@if ./scripts/dev-oauth.sh status >/dev/null 2>&1; then \
echo "OAuth running - access app at: http://localhost:4180"; \
else \
echo "WARNING: Services not running. Run 'make services-start' first."; \
fi
@echo ""
npx concurrently --kill-others-on-fail "make dev-backend" "make dev-frontend"
dev-frontend: ## Run frontend development server
cd frontend && npm run dev
dev-backend: ## Run backend development server
cd backend && uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
dev-2: ## Run second instance for parallel development (frontend:8081, backend:8001)
@echo "Starting second development instance..."
npx concurrently "make dev-backend-2" "make dev-frontend-2"
dev-frontend-2: ## Run second frontend instance (port 8081)
cd frontend && VITE_PORT=8081 VITE_BACKEND_PORT=8001 npm run dev -- --port 8081
dev-backend-2: ## Run second backend instance (port 8001)
cd backend && uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8001
# Environment Setup
env-setup: ## Copy environment example files (backend/.env is source of truth)
@echo "Setting up environment files..."
@if [ ! -f backend/.env ]; then cp backend/.env.example backend/.env; echo "Created backend/.env"; fi
@if [ ! -f frontend/.env ]; then cp frontend/.env.example frontend/.env; echo "Created frontend/.env"; fi
@echo ""
@echo "Edit backend/.env to configure:"
@echo " - Database credentials"
@echo " - OAuth credentials (OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET)"
@echo " - Set ENVIRONMENT=local to bypass OAuth"
# Version Management
sync-version: ## Sync VERSION to pyproject.toml and package.json
@./scripts/sync-version.sh
bump-version: ## Bump version (usage: make bump-version TYPE=patch|minor|major)
@if [ -z "$(TYPE)" ]; then echo "Error: TYPE is required. Usage: make bump-version TYPE=patch|minor|major"; exit 1; fi
@./scripts/bump-version.sh $(TYPE)
show-version: ## Show current version
@cat VERSION
# Health Checks
health-backend: ## Check backend health
@echo "Checking backend health..."
@curl -f http://localhost:8000/api/v1/utils/health-check || echo "Backend not responding"
health-frontend: ## Check if frontend is running
@echo "Checking frontend..."
@curl -f http://localhost:8080 || echo "Frontend not responding"
# Cleanup
clean: ## Clean build artifacts and dependencies
@echo "Cleaning build artifacts..."
rm -rf frontend/dist
rm -rf frontend/node_modules
rm -rf backend/__pycache__
rm -rf backend/.pytest_cache
clean-all: clean ## Clean everything
# Development Workflow
fresh-start: clean setup env-setup ## Clean setup for new development
@echo "Fresh development environment ready!"
quick-start: setup env-setup dev ## Quick start for development