forked from johnnytan5/WInTheChat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (64 loc) · 2.01 KB
/
Copy pathMakefile
File metadata and controls
81 lines (64 loc) · 2.01 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
# ============================================
# WInTheChat - Development Makefile
# ============================================
# All env vars are loaded from root .env and exported to every sub-process.
-include .env
export
UV := uv run
PORT_MCP := 9000
PORT_API := 8000
PORT_FRONTEND := 3000
# Install
.PHONY: install
install: install-python install-frontend ## Install all dependencies
.PHONY: install-python
install-python:
uv sync --all-packages
.PHONY: install-frontend
install-frontend:
cd frontend && npm install
# Individual services
.PHONY: mcp
mcp: ## Start FastMCP tool server (:9000)
$(UV) python -m fastmcp_server.server
.PHONY: api
api: ## Start FastAPI backend (:8000)
$(UV) uvicorn backend.app.main:app --reload --port $(PORT_API)
.PHONY: frontend
frontend: ## Start Next.js dev server (:3000)
cd frontend && npm run dev
# Start all (parallel)
.PHONY: dev
dev: ## Start all 3 services in parallel
@echo "Starting WInTheChat services..."
@echo " FastMCP -> http://localhost:$(PORT_MCP)"
@echo " FastAPI -> http://localhost:$(PORT_API)"
@echo " Frontend -> http://localhost:$(PORT_FRONTEND)"
@echo ""
$(UV) python scripts/dev_runner.py --mcp-port $(PORT_MCP) --api-port $(PORT_API)
# Database
.PHONY: seed
seed: ## Seed Supabase with demo data
$(UV) python -m backend.scripts.seed_data
# Build
.PHONY: build-frontend
build-frontend: ## Build Next.js for production
cd frontend && npm run build
.PHONY: typecheck
typecheck: ## Run TypeScript type checking
cd frontend && npx tsc --noEmit
# Utilities
.PHONY: lint
lint: ## Lint Python code with ruff
$(UV) ruff check .
.PHONY: format
format: ## Format Python code with ruff
$(UV) ruff format .
.PHONY: clean
clean: ## Remove build artifacts
rm -rf frontend/.next frontend/node_modules/.cache
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
.PHONY: help
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help