2.6 KiB
2.6 KiB
Quick Start Guide - Admin Panel
🚀 Get Started in 3 Steps
Step 1: Install Dependencies
cd frontend-dapp
pnpm install
Note: This project uses pnpm as the package manager. If you don't have pnpm installed:
npm install -g pnpm
# or
corepack enable
Step 2: Configure Environment Variables
cp .env.example .env.local
# Edit .env.local with your actual values:
# - VITE_WALLETCONNECT_PROJECT_ID (get from https://cloud.walletconnect.com)
# - VITE_THIRDWEB_CLIENT_ID (get from https://thirdweb.com/dashboard)
# - VITE_RPC_URL_138 (your Chain 138 RPC endpoint)
# Optional:
# - VITE_ENABLE_CHAIN2138=true
# - VITE_RPC_URL_2138 / VITE_EXPLORER_URL_2138
# - VITE_DEFAULT_FRONTEND_CHAIN_ID=2138
Step 3: Start Development Server
pnpm run dev
Access the admin panel at: http://localhost:3002/admin
📋 Required Environment Variables
Minimum required variables for development:
VITE_WALLETCONNECT_PROJECT_ID=your_project_id
VITE_THIRDWEB_CLIENT_ID=your_client_id
VITE_RPC_URL_138=http://192.168.11.250:8545
# Optional:
# VITE_ENABLE_CHAIN2138=true
# VITE_RPC_URL_2138=https://rpc.public-2138.defi-oracle.io
# VITE_EXPLORER_URL_2138=https://public-2138.defi-oracle.io
# VITE_DEFAULT_FRONTEND_CHAIN_ID=2138
🎯 First Time Setup Checklist
- Clone repository
- Run
npm install - Copy
.env.exampleto.env.local - Fill in environment variables in
.env.local - Run
npm run dev - Navigate to
/adminroute - Connect wallet (must be on Ethereum Mainnet)
- Verify you're the admin address
📚 Next Steps
- Read
ADMIN_PANEL_README.mdfor feature overview - Read
SECURITY_BEST_PRACTICES.mdfor security guidelines - Read
DEPLOYMENT_GUIDE.mdfor production deployment
🆘 Troubleshooting
"Project ID Not Configured" Error
- Make sure
VITE_WALLETCONNECT_PROJECT_IDis set in.env.local - Restart the dev server after changing environment variables
"Cannot Connect to Chain 138"
- Verify
VITE_RPC_URL_138is correct - Check that Chain 138 node is running and accessible
TypeScript Errors
- Run
pnpm installto ensure all dependencies are installed - Run
pnpm exec tsc --noEmitto check for errors
Build Errors
- Clear cache:
rm -rf node_modules/.vite - Reinstall:
rm -rf node_modules && pnpm install - Run
pnpm run build:checkto verify both typecheck and production build
Need Help? Check the comprehensive documentation:
README.md- Main documentationADMIN_PANEL_README.md- Admin panel featuresDEPLOYMENT_GUIDE.md- Production deploymentSECURITY_BEST_PRACTICES.md- Security guidelines