forked from MiloChiang/paypol-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (69 loc) · 3.69 KB
/
Makefile
File metadata and controls
80 lines (69 loc) · 3.69 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
.PHONY: install dev build test clean daemon circuit agent-auth docker-up docker-down help
# ── Default ────────────────────────────────────────────────
help:
@echo ""
@echo " PayPol Protocol — Developer Commands"
@echo " ──────────────────────────────────────────────────"
@echo " make install Install all dependencies"
@echo " make dev Start full dev environment"
@echo " make daemon Start ZK proof daemon"
@echo " make agent-auth Start Python auth service (port 8000)"
@echo " make build Build dashboard + SDK + agents"
@echo " make test Run all tests"
@echo " make circuit Recompile Circom ZK circuit"
@echo " make docker-up Start Postgres + Temporal"
@echo " make docker-down Stop Docker services"
@echo " make clean Remove build artifacts"
@echo ""
# ── Install all workspace dependencies ────────────────────
install:
npm install
pip install -r services/agent-auth/requirements.txt
cd apps/dashboard && npm install
cd services/daemon && npm install
cd services/agents && npm install
cd services/ai-brain && npm install
cd packages/sdk && npm install
cd packages/nexus && npm install
@echo "✓ All dependencies installed"
# ── Start full dev environment ─────────────────────────────
dev: docker-up
@echo "Starting all services..."
cd services/ai-brain && node orchestrator.js &
cd services/agents && npm run dev &
cd apps/dashboard && npm run dev
# ── ZK proof daemon ────────────────────────────────────────
daemon:
cd services/daemon && npx ts-node daemon.ts
# ── Python agent-auth service ──────────────────────────────
agent-auth:
cd services/agent-auth/src && uvicorn main:app --reload --port 8000
# ── Build all ──────────────────────────────────────────────
build:
cd apps/dashboard && npm run build
cd packages/sdk && npm run build
cd services/agents && npm run build
@echo "✓ Build complete"
# ── Tests ──────────────────────────────────────────────────
test:
cd packages/contracts && forge test -vvv
cd packages/nexus && npm test
cd packages/sdk && npm test
@echo "✓ Tests complete"
# ── Compile Circom ZK circuit ──────────────────────────────
circuit:
cd packages/circuits && \
circom paypol_shield.circom --r1cs --wasm --sym -o .
@echo "✓ Circuit compiled"
# ── Docker ─────────────────────────────────────────────────
docker-up:
docker-compose up -d db tempo
@echo "✓ Postgres + Temporal running"
docker-down:
docker-compose down
# ── Clean build artifacts ──────────────────────────────────
clean:
find . -name "dist" -not -path "*/node_modules/*" -type d -exec rm -rf {} + 2>/dev/null; true
find . -name ".next" -not -path "*/node_modules/*" -type d -exec rm -rf {} + 2>/dev/null; true
cd packages/nexus && rm -rf artifacts cache typechain-types 2>/dev/null; true
@echo "✓ Artifacts cleaned"