A comprehensive, production-ready web application for analyzing Ethereum tokens with real-time data from Etherscan API.
- Real-time Token Analysis - Live data from Etherscan API
- Interactive Bubble Map - Visual representation of token holders
- Comprehensive Charts - Price history, volume, holder count, and whale activity
- Holder Analysis - Detailed breakdown of all token holders
- Pool Data Analysis - Liquidity pool metrics and statistics
- Transaction Flow - Real-time transaction monitoring
- Security & Validation - Input validation, rate limiting, and error handling
- Production-Ready - Comprehensive error handling and logging
- Performance Optimized - Code splitting, lazy loading, and caching
- Responsive Design - Mobile-first approach with Tailwind CSS
- Real-time Updates - 30-second interval data refresh
- Security Hardened - Rate limiting, input sanitization, and CSP headers
- Comprehensive Testing - Unit, integration, and component tests
Analyzed Token: 0xe226B7Ae83a44Bb98F67BEA28C4ad73B0925C49E
Pool Contract: 0x60a5773f77Af4c9ee34d16870d65A5f139Fb8F03
- Node.js 18+
- npm or yarn
- Etherscan API Key (free at etherscan.io)
-
Clone the repository
git clone <repository-url> cd QLK-Token-Analyzer
-
Install dependencies
npm install
-
Configure environment
cp .env.example .env
Edit
.envand add your Etherscan API key:VITE_ETHERSCAN_API_KEY=your_etherscan_api_key_here
-
Start development server
npm run dev
-
Open in browser Navigate to
http://localhost:5173
# Development
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
# Testing
npm run test # Run tests in watch mode
npm run test:run # Run tests once
npm run test:ui # Run tests with UI
npm run test:coverage # Run tests with coverage
# Code Quality
npm run lint # Run ESLintsrc/
βββ components/ # React components
β βββ BubbleMap.tsx # Interactive bubble visualization
β βββ ChartsSection.tsx # Interactive charts with Recharts
β βββ ErrorBoundary.tsx # Error handling component
β βββ ...
βββ services/ # API and data services
β βββ etherscanService.ts # Etherscan API integration
β βββ blockchainData.ts # Data processing service
β βββ securityService.ts # Security and validation
βββ hooks/ # Custom React hooks
βββ types/ # TypeScript type definitions
βββ utils/ # Utility functions
βββ test/ # Test files
- Frontend: React 18, TypeScript, Vite
- Styling: Tailwind CSS
- Charts: Recharts
- Blockchain: Ethers.js, Etherscan API
- Testing: Vitest, Testing Library
- Security: Input validation, rate limiting, CSP
The application integrates with Etherscan API for real-time data:
- Token information and metadata
- Holder balances and distribution
- Transaction history
- Pool data and liquidity metrics
- 5 requests per second (Etherscan free tier)
- Automatic retry with exponential backoff
- Request caching (30-second expiry)
- Ethereum address validation with checksum verification
- Numeric input validation with range checks
- XSS protection with input sanitization
- Per-IP rate limiting (60 requests/minute)
- Automatic blocking for excessive requests
- Security event logging
- Strict CSP headers
- XSS protection
- Clickjacking prevention
- Lazy loading of components
- Dynamic imports for better initial load time
- API response caching (30 seconds)
- Browser caching for static assets
- Memoization for expensive calculations
- Efficient polling with abort controllers
- Automatic pause when tab is inactive
- Connection status monitoring
- Unit tests for services and utilities
- Component tests with React Testing Library
- Integration tests for API interactions
- Security tests for validation functions
# Run all tests
npm run test
# Run with coverage
npm run test:coverage
# Run specific test file
npm run test src/test/services/securityService.test.tsnpm run buildSet the following in your production environment:
VITE_ETHERSCAN_API_KEY=your_production_api_key
VITE_TOKEN_ADDRESS=0xe226B7Ae83a44Bb98F67BEA28C4ad73B0925C49E
VITE_POOL_ADDRESS=0x60a5773f77Af4c9ee34d16870d65A5f139Fb8F03- Vercel - Optimal for React applications
- Netlify - Great for static site deployment
- AWS S3 + CloudFront - Enterprise-grade hosting
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
MIT License - see LICENSE file for details
For issues and questions:
- Create an issue on GitHub
- Check the documentation
- Review the test files for usage examples