A comprehensive Web3 application for token detection, authorization, and transfer management across multiple blockchain networks.
Drain_app/
├── Client/ # Frontend application
├── Server/ # Backend API server
├── Contract/ # Smart contracts
├── scripts/ # Utility scripts
├── tasks/ # Task management
└── docker-compose.yml
- Node.js >= 18.0.0
- npm >= 9.0.0
- Docker (optional)
# Install all dependencies
npm run install:all
# Or install individually
npm run install:client
npm run install:server
npm run install:contracts# Start all services
npm start
# Start individual services
npm run start:server # Backend on port 3000
npm run start:client # Frontend on port 8080
npm run start:contracts # Local blockchain on port 8545# Build all
npm run build
# Build individually
npm run build:client
npm run build:contracts- Technology: Vanilla JS, Web3Modal, Ethers.js
- Features: Wallet connection, token detection UI, transfer authorization
- Port: 8080
- Technology: Node.js, Express.js, Ethers.js
- Features: API endpoints, wallet authentication, transaction management
- Port: 3000
- Technology: Solidity, Hardhat, OpenZeppelin
- Features: Utility contracts, batch operations, gas optimization
Create .env files in each directory:
Server/.env
PORT=3000
ETHEREUM_RPC_URL=your_ethereum_rpc_url
SEPOLIA_RPC_URL=your_sepolia_rpc_url
PRIVATE_KEY=your_private_key
Contract/.env
PRIVATE_KEY=your_private_key
ETHERSCAN_API_KEY=your_etherscan_api_key
SEPOLIA_RPC_URL=your_sepolia_rpc_url
ETHEREUM_RPC_URL=your_ethereum_rpc_url
# Test all
npm test
# Test individually
npm run test:server
npm run test:client
npm run test:contractsnpm run deploy:localnpm run deploy:sepolianpm run docker:build
npm run docker:upGET /api/status- API status and health checkGET /api/blockchain/networks- Available networksPOST /api/wallet/connect- Wallet connectionGET /api/tokens/scan/:address- Token scanningPOST /api/transfer/prepare- Transfer preparation
- Rate limiting
- Input validation
- CSRF protection
- Secure session management
- Audit logging
- Task Management: Taskmaster-AI
- Linting: ESLint
- Testing: Jest
- Building: Webpack, Hardhat
- Containerization: Docker
MIT License
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For support and questions, please open an issue in the repository.