#!/usr/bin/env bash # End-to-end smoke verification for local dev stack. set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$ROOT" API="${NEXT_PUBLIC_API_URL:-http://localhost:3001}" FE="${FRONTEND_URL:-http://localhost:3000}" TREASURY="${NEXT_PUBLIC_TREASURY_WALLET_ADDRESS:-0x96bF8cd30C4f0e22fa33469f8e2C23AA3faF525C}" echo "=== Solace Full-Stack Verification ===" echo "" bash scripts/audit-env.sh echo "" echo "## Type checks" (cd frontend && pnpm exec tsc --noEmit) echo "✅ Frontend types" echo "" echo "## HTTP smoke" curl -sf "$API/health" | grep -q '"status"' && echo "✅ GET /health" curl -sf "$API/api/config" | grep -q '"chainId"' && echo "✅ GET /api/config" curl -sf "$API/api/treasury?wallet=$TREASURY" | grep -q '"treasury"' && echo "✅ GET /api/treasury" curl -sf -o /dev/null -w '' "$FE/" && echo "✅ Frontend $FE" curl -sf -o /dev/null -w '' "$FE/settings" && echo "✅ Frontend /settings" curl -sf -o /dev/null -w '' "$FE/approvals" && echo "✅ Frontend /approvals" curl -sf -o /dev/null -w '' "$FE/receive" && echo "✅ Frontend /receive" if command -v pnpm >/dev/null && [[ -d frontend/node_modules/@playwright/test ]]; then echo "" echo "## E2E (optional)" if (cd frontend && PW_SKIP_WEBSERVER=1 pnpm run test:e2e 2>&1); then echo "✅ Playwright smoke tests" else echo "⚠️ Playwright tests failed (dev server may be compiling — retry with pnpm run test:e2e)" fi fi if [[ -f contracts/deployments/chain138.json ]]; then echo "✅ chain138 deployment JSON" fi echo "" echo "=== All checks passed ==="