forked from mind-vault-1/mindvault
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (58 loc) · 2.1 KB
/
Copy pathMakefile
File metadata and controls
70 lines (58 loc) · 2.1 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
.PHONY: setup setup-usdc dev dev-server dev-web test install migrate wallets seed validate
# MindVault local development entrypoints.
# Prerequisites: Node.js 20+, pnpm, and a configured server/.env (see server/.env.example).
install:
pnpm install
migrate:
pnpm db:generate && pnpm db:migrate
wallets:
@echo "Generating a Stellar testnet wallet (platform or agent)..."
pnpm generate-wallet
@echo ""
@echo "Run 'make wallets' again if you need separate platform + agent wallets."
setup-usdc:
pnpm --filter @mindvault/server setup-usdc
# First-time setup after copying server/.env.example -> server/.env and filling credentials.
setup: install migrate wallets
@echo ""
@echo "Setup complete."
@echo " 1. Copy keys from 'make wallets' into server/.env (PAY_TO, AGENT_SECRET_KEY, REGISTRY_SECRET_KEY)."
@echo " 2. Run 'make setup-usdc' after AGENT_SECRET_KEY is set to add a USDC trustline."
@echo " 3. Acquire Soroban testnet USDC for x402 (see server/scripts/setup-usdc.ts output)."
@echo " 4. Start the stack with 'make dev'."
dev-server:
pnpm dev:server
dev-web:
pnpm --filter @mindvault/web dev
# Run API (:4021) and web app (:5173) together.
dev:
@trap 'kill 0' INT TERM; \
pnpm dev:server & \
pnpm --filter @mindvault/web dev & \
wait
test:
pnpm run build:registry-client
pnpm test
# Full local validation — run before opening a PR.
# Builds packages, runs tests, and checks formatting/linting.
# Does not require live secrets (Supabase, Stellar).
validate:
@echo "==> Building registry client..."
pnpm run build:registry-client
@echo "==> Building server..."
pnpm --filter @mindvault/server build
@echo "==> Running tests..."
pnpm --filter @mindvault/server test
pnpm --filter @mindvault/web test 2>/dev/null || true
@echo "==> Checking formatting..."
pnpm run format:check
@echo "==> Linting..."
pnpm run lint
@echo "==> Checking doc links..."
pnpm run docs:links
@echo ""
@echo "All checks passed."
# Populate the catalog with sample resources for local development.
# Safe to re-run. Pass ONCHAIN=1 to also register on Stellar testnet.
seed:
cd server && pnpm seed $(if $(ONCHAIN),--onchain,)