96 lines
2.6 KiB
Markdown
96 lines
2.6 KiB
Markdown
# Quick Start Guide - Admin Panel
|
|
|
|
## 🚀 Get Started in 3 Steps
|
|
|
|
### Step 1: Install Dependencies
|
|
```bash
|
|
cd frontend-dapp
|
|
pnpm install
|
|
```
|
|
|
|
**Note**: This project uses `pnpm` as the package manager. If you don't have pnpm installed:
|
|
```bash
|
|
npm install -g pnpm
|
|
# or
|
|
corepack enable
|
|
```
|
|
|
|
### Step 2: Configure Environment Variables
|
|
```bash
|
|
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
|
|
```bash
|
|
pnpm run dev
|
|
```
|
|
|
|
**Access the admin panel at:** `http://localhost:3002/admin`
|
|
|
|
## 📋 Required Environment Variables
|
|
|
|
Minimum required variables for development:
|
|
|
|
```env
|
|
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.example` to `.env.local`
|
|
- [ ] Fill in environment variables in `.env.local`
|
|
- [ ] Run `npm run dev`
|
|
- [ ] Navigate to `/admin` route
|
|
- [ ] Connect wallet (must be on Ethereum Mainnet)
|
|
- [ ] Verify you're the admin address
|
|
|
|
## 📚 Next Steps
|
|
|
|
- Read `ADMIN_PANEL_README.md` for feature overview
|
|
- Read `SECURITY_BEST_PRACTICES.md` for security guidelines
|
|
- Read `DEPLOYMENT_GUIDE.md` for production deployment
|
|
|
|
## 🆘 Troubleshooting
|
|
|
|
### "Project ID Not Configured" Error
|
|
- Make sure `VITE_WALLETCONNECT_PROJECT_ID` is set in `.env.local`
|
|
- Restart the dev server after changing environment variables
|
|
|
|
### "Cannot Connect to Chain 138"
|
|
- Verify `VITE_RPC_URL_138` is correct
|
|
- Check that Chain 138 node is running and accessible
|
|
|
|
### TypeScript Errors
|
|
- Run `pnpm install` to ensure all dependencies are installed
|
|
- Run `pnpm exec tsc --noEmit` to check for errors
|
|
|
|
### Build Errors
|
|
- Clear cache: `rm -rf node_modules/.vite`
|
|
- Reinstall: `rm -rf node_modules && pnpm install`
|
|
- Run `pnpm run build:check` to verify both typecheck and production build
|
|
|
|
---
|
|
|
|
**Need Help?** Check the comprehensive documentation:
|
|
- `README.md` - Main documentation
|
|
- `ADMIN_PANEL_README.md` - Admin panel features
|
|
- `DEPLOYMENT_GUIDE.md` - Production deployment
|
|
- `SECURITY_BEST_PRACTICES.md` - Security guidelines
|