2.8 KiB
2.8 KiB
Quick Start - Complete Setup
🚀 One-Command Setup
Run the complete setup script to:
- ✅ Verify all files
- ✅ Test database connection
- ✅ Run database migrations
- ✅ Verify migrations
- ✅ Check for admin users
- ✅ Verify service files
cd smom-dbis-138/services/token-aggregation
./scripts/complete-setup.sh
📋 Step-by-Step Manual Setup
1. Configure Environment
cd smom-dbis-138/services/token-aggregation
cp .env.example .env
nano .env # Edit with your database URL and settings
2. Run Database Migrations
./scripts/run-migrations.sh
Or manually:
psql $DATABASE_URL -f ../../explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
psql $DATABASE_URL -f ../../explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
3. Create Admin User
./scripts/create-admin-user.sh
Enter:
- Username
- Password
- Email (optional)
- Role (admin/super_admin/operator/viewer)
4. Install Dependencies
# Backend
npm install
# Frontend
cd frontend
npm install
cd ..
5. Build
# Backend
npm run build
# Frontend
cd frontend
npm run build
cd ..
6. Start Service
Option A: Local Development
# Terminal 1: Backend
npm run dev
# Terminal 2: Frontend
cd frontend
npm run dev
Option B: Production
npm start
# Frontend served via nginx (after Proxmox deployment)
Option C: Proxmox Deployment
./scripts/deploy-to-proxmox.sh
✅ Verification Checklist
After setup, verify:
- Database migrations applied
- Admin user created
- Service starts without errors
- Can access control panel
- Can login with admin credentials
- Can add API keys via UI
- Can add endpoints via UI
- Dashboard shows statistics
🔍 Quick Tests
Test Database Connection
psql $DATABASE_URL -c "SELECT COUNT(*) FROM admin_users;"
Test API
curl http://localhost:3000/health
Test Admin API (after login)
# Get token from login
TOKEN="your-jwt-token"
curl -H "Authorization: Bearer $TOKEN" http://localhost:3000/api/v1/admin/status
📊 Expected Results
After complete setup:
- Database: 13+ tables created (token aggregation + admin config)
- Backend: Service running on port 3000
- Frontend: Control panel accessible
- Admin: At least 1 admin user created
🎯 Next Actions
- Login to control panel
- Add API Keys for external services
- Configure Endpoints for chains 138 and 651940
- Add DEX Factories for pool discovery
- Monitor service via dashboard
📚 Documentation
README.md- Service overviewCONTROL_PANEL.md- Control panel featuresPROXMOX_DEPLOYMENT.md- Deployment guideSETUP_COMPLETE.md- This file