Decentralized Ethereum Name Service management platform with Web3 wallet integration, static deployment, and IPFS support.
- ENS Resolution: Resolve .eth names to Ethereum addresses
- Ownership Queries: Check ENS name ownership and expiry dates
- Availability Checking: Verify name availability for registration
- Text Records: Retrieve and manage ENS text records
- Content Hashes: Handle IPFS and other content hash protocols
- Wallet Integration: MetaMask, WalletConnect, and Coinbase Wallet support
- Multi-Chain: Support for Ethereum mainnet, testnets, Polygon, and Arbitrum
- Decentralized: Static deployment with IPFS support for true decentralization
- Performance: Optimized for Web3 with efficient RPC calls and caching
- Security: Web3-specific security with wallet connection validation
- Analytics: On-chain data analysis and ENS portfolio tracking
- Real-time: Live updates for ENS name status and transactions
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Web3 Wallets │────│ DApp Frontend │────│ ENS Service │
│ │ │ (Static Site) │ │ (Client-side) │
│ - MetaMask │ │ (IPFS/Static) │ │ - RPC Calls │
│ - WalletConnect │ │ (No Backend) │ │ - On-chain Data │
│ - Coinbase │ │ │ │ - Cache Layer │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────┐ ┌─────────────────┐
│ Blockchain │────│ IPFS/Storage │
│ Networks │ │ (Decentralized)│
│ │ │ │
│ - Ethereum │ │ - ENS Records │
│ - Polygon │ │ - Content Hashes│
│ - Arbitrum │ │ - Metadata │
└─────────────────┘ └─────────────────┘
- Node.js: 18.0.0 or higher
- Web3 Wallet: MetaMask, Coinbase Wallet, or any WalletConnect-compatible wallet
- IPFS (optional): For decentralized deployment
- Git: For version control and deployment
# Clone the repository
git clone https://github.com/your-org/ens-tools.git
cd ens-tools
# Install dependencies
npm install
# Copy environment configuration
cp .env.example .env
# Edit environment variables
nano .env# Required environment variables
NODE_ENV=development
PORT=3001
ETHEREUM_NETWORK=mainnet
INFURA_API_KEY=your_infura_api_key
JWT_SECRET=your_secure_jwt_secret_min_32_chars
MONGODB_URI=mongodb://localhost:27017/ens-tools
REDIS_URL=redis://localhost:6379# Start development server with hot reload
npm run dev
# Run linting
npm run lint
# Run tests
npm run test
# Run tests with coverage
npm run test:unit# Build the application
npm run build
# Start production server
npm startWeb3 applications are typically deployed as static sites to maximize decentralization and reduce server dependencies.
# Install Netlify CLI
npm install -g netlify-cli
# Build and deploy
npm run deploy:netlify
# Or deploy manually
npm run build
netlify deploy --prod --dir=public# Install Vercel CLI
npm install -g vercel
# Deploy
npm run deploy:vercel
# Or deploy manually
vercel --prod# Install IPFS deploy tools
npm install -g ipfs-deploy
# Build and deploy to IPFS
npm run deploy:ipfs
# Pin to IPFS for permanence
ipfs pin add <your-deployment-hash># Build the application
npm run build
# Serve static files
npm run serve
# Or use any static hosting service:
# - GitHub Pages
# - AWS S3 + CloudFront
# - Firebase Hosting
# - Surge.shcurl http://localhost:3001/healthcurl http://localhost:3001/api/v1/ens/resolve/vitalik.ethcurl -X POST http://localhost:3001/api/v1/ens/availability \
-H "Content-Type: application/json" \
-d '{"name": "mynewname"}'curl http://localhost:3001/api/v1/ens/text/example.eth/email# Run unit tests
npm run test:unit
# Run with coverage
npm run test:unit -- --coverage
# Run specific test file
npm run test:unit -- tests/unit/services/ens.test.js# Run integration tests
npm run test:integration# Run e2e tests
npm run test:e2e# Generate coverage report
npm run test:unit
# View coverage report
open coverage/lcov-report/index.htmlGET /health- Basic health checkGET /health/detailed- Detailed system informationGET /health/ready- Readiness probe for orchestrationGET /health/live- Liveness probe for orchestration
All requests are logged with the following information:
- Request ID for tracking
- Response time and status
- IP address and user agent
- Error details with stack traces
- Request/response metrics
- Error rates and patterns
- Performance monitoring
- Database query metrics
- Helmet.js: Security headers and XSS protection
- Rate Limiting: Configurable request limits per IP
- Input Validation: Comprehensive validation with express-validator
- CORS: Configurable cross-origin resource sharing
- Data Sanitization: Automatic XSS and injection prevention
- JWT Authentication: Secure token-based authentication (future)
// Security settings in config
const securityConfig = {
rateLimit: {
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100 // limit each IP to 100 requests per windowMs
},
cors: {
origin: process.env.CORS_ORIGIN || 'http://localhost:3000',
credentials: true
},
jwt: {
secret: process.env.JWT_SECRET,
expiresIn: '24h'
}
};Complete API documentation is available at:
- Swagger UI:
http://localhost:3001/api/docs - OpenAPI Spec:
/docs/api/README.md - Postman Collection:
/docs/api/postman_collection.json
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /api/v1/ens/resolve/:name |
Resolve ENS name |
| GET | /api/v1/ens/owner/:name |
Get name owner |
| POST | /api/v1/ens/availability |
Check availability |
| GET | /api/v1/ens/expiry/:name |
Get expiry date |
| GET | /api/v1/ens/text/:name/:key |
Get text record |
npm run dev# Build and deploy
npm run build
npm start
# Or using Docker
docker-compose -f docker-compose.prod.yml up -d# Deploy to Kubernetes
kubectl apply -f k8s/
# Check deployment status
kubectl get pods -n ens-tools- IPFS: Permanent, decentralized hosting
- Filecoin: Long-term storage with incentives
- Arweave: Permanent data storage
See Web3 Deployment section above for detailed instructions.
ens-tools/
├── src/
│ ├── controllers/ # Route handlers
│ ├── middleware/ # Express middleware
│ ├── services/ # Business logic
│ ├── models/ # Data models
│ ├── utils/ # Utility functions
│ ├── validators/ # Input validation
│ ├── config/ # Configuration management
│ └── app.js # Application setup
├── tests/
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── e2e/ # End-to-end tests
├── docs/
│ ├── api/ # API documentation
│ ├── deployment/ # Deployment guides
│ └── architecture/ # Architecture docs
├── public/ # Static assets
├── scripts/ # Build and deployment scripts
├── docker-compose.yml # Docker orchestration
├── Dockerfile # Container definition
└── package.json # Dependencies and scripts
# Linting
npm run lint
# Code formatting
npm run format
# Type checking (future)
npm run type-check
# Security audit
npm run securityPre-commit hooks are configured to:
- Run linting
- Run tests
- Check code formatting
- Prevent commits with security issues
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the contributing guide
- Write tests for new features
- Update documentation
- Follow the existing code style
- Use conventional commits
This project is licensed under the MIT License - see the LICENSE file for details.
- Ethereum Name Service for the ENS protocol
- Infura for Ethereum infrastructure
- viem for Ethereum interactions
- Express.js for the web framework
- Documentation: docs.ens-tools.com
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@ens-tools.com
- Basic ENS operations
- RESTful API
- Static deployment
- Comprehensive testing
- Web3 security
- User authentication and authorization
- Advanced analytics dashboard
- WebSocket real-time updates
- Multi-chain support
- Advanced caching strategies
- ENS name management interface
- Bulk operations
- Integration APIs
- Mobile SDKs
- Advanced monitoring and alerting
ENS Tools - Making Ethereum Name Service management enterprise-ready.