chore: consolidate local WIP (repo cleanup 20260707)
All checks were successful
CI / lint-and-test (push) Successful in 9m52s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
defiQUG
2026-07-07 09:41:38 -07:00
parent c94eb595f8
commit a03417be98
121 changed files with 4253 additions and 1750 deletions

View File

@@ -1,39 +1,33 @@
#!/bin/bash
#!/usr/bin/env bash
# Setup verification script
# Checks if all required dependencies and configurations are in place
set -e
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
echo "🔍 Checking Solace Treasury DApp setup..."
echo ""
# Check Node.js
if command -v node &> /dev/null; then
NODE_VERSION=$(node --version)
echo "✅ Node.js: $NODE_VERSION"
echo "✅ Node.js: $(node --version)"
else
echo "❌ Node.js not found. Please install Node.js >= 18.0.0"
exit 1
fi
# Check pnpm
if command -v pnpm &> /dev/null; then
PNPM_VERSION=$(pnpm --version)
echo "✅ pnpm: $PNPM_VERSION"
echo "✅ pnpm: $(pnpm --version)"
else
echo "❌ pnpm not found. Install with: npm install -g pnpm"
exit 1
fi
# Check PostgreSQL
if command -v psql &> /dev/null; then
echo "✅ PostgreSQL: $(psql --version | head -n1)"
else
echo "⚠️ PostgreSQL not found (required for database)"
fi
# Check if dependencies are installed
if [ -d "node_modules" ]; then
echo "✅ Dependencies installed"
else
@@ -41,62 +35,58 @@ else
exit 1
fi
# Check contracts compilation
if [ -d "contracts/artifacts" ]; then
echo "✅ Contracts compiled"
else
echo "⚠️ Contracts not compiled. Run: cd contracts && pnpm run compile"
fi
# Check environment files
echo ""
echo "📋 Environment files:"
if [ -f "frontend/.env.local" ] || [ -f "frontend/.env" ]; then
echo "✅ Frontend env file exists"
else
echo "⚠️ Frontend .env.local not found (create from template)"
fi
for f in frontend/.env.local backend/.env backend/.env.indexer contracts/.env; do
if [ -f "$f" ]; then
echo "$f exists"
else
echo "⚠️ $f not found"
fi
done
if [ -f "backend/.env" ]; then
echo "✅ Backend env file exists"
else
echo "⚠️ Backend .env not found (create from template)"
fi
if [ -f "contracts/.env" ]; then
echo "✅ Contracts env file exists"
else
echo "⚠️ Contracts .env not found (create from template)"
fi
# Check database migrations
if [ -d "backend/drizzle" ] && [ "$(ls -A backend/drizzle/*.sql 2>/dev/null)" ]; then
echo "✅ Database migrations generated"
echo "✅ Database migrations present"
else
echo "⚠️ Database migrations not generated. Run: cd backend && pnpm run db:generate"
echo "⚠️ Database migrations missing. Run: cd backend && pnpm run db:generate"
fi
# Check if database is accessible (if DATABASE_URL is set)
if [ -f "backend/.env" ]; then
set -a
# shellcheck disable=SC1091
source backend/.env
if [ -n "$DATABASE_URL" ]; then
if command -v psql &> /dev/null; then
if psql "$DATABASE_URL" -c "SELECT 1;" &> /dev/null; then
echo "✅ Database connection successful"
else
echo "⚠️ Database connection failed (check DATABASE_URL)"
fi
set +a
if [ -n "${DATABASE_URL:-}" ] && command -v psql &> /dev/null; then
if psql "$DATABASE_URL" -c "SELECT 1;" &> /dev/null; then
echo "✅ Database connection successful"
else
echo "⚠️ Database connection failed (check DATABASE_URL or docker start solace-postgres)"
fi
fi
fi
if [ -f "contracts/deployments/chain138.json" ]; then
echo "✅ Chain 138 deployment record present"
else
echo "⚠️ No chain138 deployment — run: cd contracts && pnpm run deploy:chain138"
fi
echo ""
echo "Running audit-env..."
bash scripts/audit-env.sh || true
echo ""
echo "✨ Setup check complete!"
echo ""
echo "Next steps:"
echo "1. Create .env files if missing"
echo "2. Set up database: cd backend && pnpm run db:migrate"
echo "3. Deploy contracts: cd contracts && pnpm run deploy:sepolia"
echo "4. Start dev servers: pnpm run dev"
echo "1. cd backend && pnpm run db:migrate && pnpm run db:seed"
echo "2. pnpm run sync-env (after deploy)"
echo "3. pnpm run dev (frontend :3000, backend :3001)"
echo "4. cd backend && pnpm run indexer:start"