A self-hosted, low-cost multi-chain token explorer with a PolygonScan-like UI for 10 EVM chains.
ExplorerToken provides a lightweight token explorer solution that leverages Etherscan API v2 across multiple chains without the need for heavy indexers. The platform offers comprehensive token and transaction data with an intuitive user interface.
- Multi-chain Support: Explore tokens across 10 EVM-compatible chains
- Comprehensive Data: Transfers, Holders, Token Info, Contract details, Analytics, and full transaction details
- Chain Badges: Visual identification of different blockchain networks
- Admin Dashboard: Manage API keys, chains, cache settings, and view metrics
- Low Resource Usage: No heavy indexing infrastructure required
All blockchain data is fetched from Etherscan API v2 (https://api.etherscan.io/v2/api) using chainid and apikey query parameters. No local indexing or blockchain nodes required.
┌─────────────────────────────────────────────────────────────┐
│ Frontend │
│ (React + Vite + TypeScript + Tailwind) │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Pages: Home/Search, Address View, Tx Details, │ │
│ │ Admin Login, Dashboard │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
│ HTTP/REST API
▼
┌─────────────────────────────────────────────────────────────┐
│ Backend │
│ (Node.js + Express + TypeScript) │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ • Etherscan API v2 Proxy & Normalizer │ │
│ │ • JWT Authentication (Admin) │ │
│ │ • Rate Limiting (Per-IP) │ │
│ │ • Caching Layer (Redis/NodeCache) │ │
│ │ • Basic Metrics & Usage Logging │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│ │
│ │
▼ ▼
┌──────────────────────┐ ┌──────────────────────┐
│ PostgreSQL │ │ Redis Cache │
│ │ │ (Optional) │
│ • Settings │ │ │
│ • Admin Users │ │ Fallback: │
│ • API Usage Logs │ │ NodeCache │
│ • Analytics Cache │ │ (In-Process) │
└──────────────────────┘ └──────────────────────┘
Backend
- Acts as a proxy to Etherscan API v2
- Normalizes upstream responses into consistent DTOs
- Implements JWT-based admin authentication
- Provides caching (Redis preferred, NodeCache fallback)
- Enforces per-IP rate limiting
- Tracks basic usage metrics
Frontend
- Explorer UI for viewing token transfers, holders, and details
- Admin dashboard for configuration management
- Chain-aware interface with visual badges
- React Query for efficient data fetching
Database (PostgreSQL)
- Stores application settings and configuration
- Manages admin user credentials
- Logs API usage metrics
- Caches analytics data
- Schema migrations are plain SQL files in
backend/migrations/executed in order
Cache Layer
- Redis (optional, recommended for production)
- NodeCache (in-process fallback)
- TTL configured via admin dashboard
On initial deployment, a setup wizard guides you through:
- Enter Etherscan API key
- Select supported chains
- Create admin user
- Configure cache TTL settings
- 1. Bootstrap Monorepo & CI
- 2. Backend Skeleton
- 3. DB Schema & Migrations
- 4. Etherscan v2 Client (paths-driven)
- 5. Explorer API Routes
- 6. Cache & Rate-Limit
- 7. Frontend Scaffold
- 8. Setup Wizard & Admin
- 9. Docker & Compose
- 10. Deploy Workflow (SSH)
- 11. Polish & Security
ExplorerToken includes a built-in setup wizard that runs on first launch:
- Start the application (backend and frontend)
- Navigate to the setup wizard - You'll be automatically redirected to
/setup - Complete the 4-step wizard:
- Step 1: Enter your Etherscan API key
- Step 2: Select which blockchain chains to support (10 default EVM chains available)
- Step 3: Create your admin account (username and password, minimum 8 characters)
- Step 4: Configure cache TTL (default: 60 seconds, minimum: 10 seconds)
- Submit the setup - This creates the admin user and initializes the database
- Login - You'll be redirected to
/loginto sign in with your new credentials - Access the dashboard - Manage your explorer from
/dashboard
After logging in, the admin dashboard provides:
- Settings Tab: Configure supported chains and cache TTL
- API Key Tab: Update your Etherscan API key
- Cache Tab: Clear the application cache to force fresh data fetching
- Metrics Tab: View API usage statistics and analytics
All admin routes are protected with JWT authentication. The JWT token is automatically attached to requests and stored in localStorage.
The application includes a global route guard that:
- Checks
/api/setup/stateon initialization - Redirects all routes to
/setupif setup is incomplete - Allows access to all routes once setup is complete
- No server restart required after completing setup
- Node.js >= 20 (specified in
.nvmrc) - npm (comes with Node.js)
- PostgreSQL (for local development)
- Redis (optional, for caching)
# Install dependencies
npm install
# Build all packages
npm run build
# Run linting
npm run lint
# Run tests
npm test
# Run database migrations (see docs/db.md for details)
cd backend
npm run migrate
# Start development servers
npm run devTo run the frontend in development mode:
cd frontend
cp .env.sample .env
npm i
npm run dev
# Frontend will be available at http://localhost:5173
# The Vite proxy forwards /api → http://localhost:4000Note: The backend should be running on port 4000 before starting the frontend.
To start the backend:
cd backend
npm i
cp .env.sample .env
# Put your Etherscan API key in backend/.env (ETHERSCAN_API_KEY)
npm run dev/
├── backend/ # Backend API server
├── frontend/ # React frontend application
├── scripts/ # Deployment and utility scripts
├── docs/ # Additional documentation
├── .github/ # GitHub Actions workflows
└── package.json # Root workspace configuration
Both backend and frontend have .env.sample files. Copy these to .env and configure:
Backend (see backend/.env.sample):
PORT: Server portDATABASE_URL: PostgreSQL connection stringREDIS_URL: Redis connection string (optional)ETHERSCAN_API_KEY: Your Etherscan API keyJWT_SECRET: Secret for JWT token generation
Frontend (see frontend/.env.sample):
VITE_API_URL: API base URL (defaults to/apiwhich proxies to backend in dev mode)
Deployment is handled via GitHub Actions to a VPS using Docker Compose. See the Deploy Workflow milestone for details.
- VPS: Deployed via SSH (configured in GitHub secrets)
- Reverse Proxy: Nginx with SSL
- Containers: Docker Compose orchestration
- Database: PostgreSQL container with backup scripts
- Cache: Redis container (optional)
- Create a focused branch for your changes
- Ensure all tests pass:
npm test - Lint your code:
npm run lint:fix - Build successfully:
npm run build - Open a PR with clear description
MIT License - see LICENSE file for details
- Never commit secrets or API keys
- Use
.envfiles for local configuration - Review
.env.samplefiles for required variables - All secrets are managed via environment variables or GitHub Actions secrets