2.4 KiB
2.4 KiB
Control Panel Documentation
Overview
The Token Aggregation Service includes a web-based control panel for managing API keys, endpoints, and DEX factory configurations.
Access
- URL:
http://<container-ip>(after Proxmox deployment) - Default Port: 80 (nginx serves frontend, proxies API to port 3000)
Features
1. Dashboard
- Service status overview
- Statistics for API keys, endpoints, and DEX factories
- Real-time updates
2. API Keys Management
- Add new API keys for:
- CoinGecko
- CoinMarketCap
- DexScreener
- Custom providers
- View active/inactive keys
- Set rate limits
- Set expiration dates
- Enable/disable keys
3. Endpoints Management
- Add RPC endpoints for ChainID 138 and 651940
- Add explorer endpoints
- Add indexer endpoints
- Set primary endpoints
- Health check status
- Enable/disable endpoints
4. DEX Factories Management
- Add UniswapV2 factory addresses
- Add UniswapV3 factory addresses
- Add DODO PoolManager addresses
- Configure router addresses
- Set start blocks
- Add descriptions
Authentication
Creating Admin User
Use the provided script:
cd smom-dbis-138/services/token-aggregation
./scripts/create-admin-user.sh
Or via API:
curl -X POST http://localhost:3000/api/v1/admin/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"your-password"}'
Roles
- super_admin: Full access, can manage users
- admin: Can manage API keys, endpoints, factories
- operator: Can view and enable/disable items
- viewer: Read-only access
API Endpoints
All admin endpoints are under /api/v1/admin/:
POST /api/v1/admin/auth/login- LoginGET /api/v1/admin/api-keys- List API keysPOST /api/v1/admin/api-keys- Create API keyPUT /api/v1/admin/api-keys/:id- Update API keyDELETE /api/v1/admin/api-keys/:id- Delete API keyGET /api/v1/admin/endpoints- List endpointsPOST /api/v1/admin/endpoints- Create endpointPUT /api/v1/admin/endpoints/:id- Update endpointGET /api/v1/admin/dex-factories- List DEX factoriesPOST /api/v1/admin/dex-factories- Create DEX factoryGET /api/v1/admin/status- Service statusGET /api/v1/admin/audit-log- Audit log
Deployment
The control panel is automatically deployed with the service to Proxmox. See scripts/deploy-to-proxmox.sh for details.