Production Deployment
Heron consists of three deployable components: the frontend (Vercel), the backend (any server/VM), and the on-chain programs (already deployed).
Frontend (Next.js → Vercel)
The consumer wallet UI deploys to Vercel with zero configuration:
cd app/web
pnpm install
pnpm build
# Deploy via Vercel CLI or git pushVercel Configuration
| Setting | Value |
|---|---|
| Framework | Next.js |
| Build command | pnpm build |
| Output directory | .next |
| Node.js version | 20.x |
| Root directory | app/web |
Environment Variables (Vercel)
NEXT_PUBLIC_API_URL=https://your-backend.example.comBackend (FastAPI)
The Python backend runs as a long-lived process (keeper scheduler starts automatically):
cd app/backend
uv sync
uv run uvicorn main:app --host 0.0.0.0 --port 8787Environment Variables
# Required
HERON_SOLANA_RPC=https://devnet.helius-rpc.com/?api-key=YOUR_KEY
HERON_SOLANA_KEYPAIR=~/.config/solana/heron-solana-vault-owner.json
GOOGLE_CLOUD_PROJECT=heron-category-d
HERON_NETWORK=solana
# Pay.sh (optional — agent works without, just no paid data)
PAYSH_ENDPOINT=https://x402-api.vybenetwork.xyz/v4/token-price/So11111111111111111111111111111111111112
PAYSH_MAX_USDC=0.10
PAYSH_BUDGET_USDC=5.00
# Optional
VIRTUALS_API_KEY= # LLM for risk veto narration
HERON_TEE_AMI= # AWS Nitro Enclave AMIGCP Credentials
The backend needs access to GCP Secret Manager for pay.sh wallet keypairs:
# Option 1: Application Default Credentials (local dev)
gcloud auth application-default login
# Option 2: Service account key (production)
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.jsonSystemd Example
[Unit]
Description=Heron Backend
After=network.target
[Service]
Type=simple
User=heron
WorkingDirectory=/opt/heron/app/backend
EnvironmentFile=/opt/heron/.env
ExecStart=/opt/heron/.venv/bin/uvicorn main:app --host 0.0.0.0 --port 8787
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.targetOn-Chain Programs
Solana (Anchor)
Already deployed on devnet:
Program: BSPwK2zXA4K887pbm5ovxzVQS2rWJAaQkkiEU3TRY632
Network: Solana DevnetTo redeploy:
cd packages/solana
anchor build
anchor deploy --provider.cluster devnetEVM (Hardhat)
Arc and GIWA contracts deploy via Hardhat:
cd packages/contracts
pnpm compile
pnpm hardhat deploy --network arc
pnpm hardhat deploy --network giwaDocs Site (This Site)
This documentation site deploys to Vercel as a static export:
cd docs
pnpm install
pnpm build
# Deploy via Vercel CLI or git pushVercel Configuration
| Setting | Value |
|---|---|
| Framework | Next.js |
| Build command | pnpm build |
| Output directory | out |
| Root directory | docs |
Health Check
After deployment, verify all components:
# Backend health
curl https://your-backend.example.com/api/health
# → {"ok": true, "llm": true}
# Frontend accessible
curl -s -o /dev/null -w "%{http_code}" https://your-frontend.example.com
# → 200
# Keeper running (check logs for 5-min cycles)
journalctl -u heron -f | grep "keeper cycle"