CHAINR AI
An intelligent AI assistant that specializes in building decentralized applications (DApps) for Web3. This platform combines conversational AI with automated smart contract deployment, frontend generation, and blockchain integration.
Features
- ๐ค AI-powered DApp architecture and code generation
- โ๏ธ Multi-blockchain support (Ethereum, Polygon, BSC, Arbitrum)
- ๐ Smart contract creation and deployment
- ๐จ Automated frontend generation with Web3 integration
- ๐ฌ Real-time chat interface for development guidance
- ๐ Wallet connection and authentication
- ๐๏ธ IPFS integration for decentralized storage
- ๐ Gas optimization and cost estimation
- ๐ Contract verification and security auditing
- โก One-click deployment pipeline
- ๐งช Automated testing suite generation
- ๐ฑ Mobile-responsive DApp interfaces
Tech Stack
Backend
- Node.js with Express
- MongoDB with Mongoose
- Socket.IO for real-time communication
- OpenAI API integration
- Web3.js/Ethers.js for blockchain interaction
- Hardhat for smart contract development
- IPFS client for decentralized storage
- Docker containerization
Frontend
- React 18 with hooks
- Next.js for SSR and optimization
- Web3Modal for wallet connections
- Wagmi for React Web3 hooks
- React Query for state management
- Tailwind CSS for styling
- Chart.js for analytics dashboards
Blockchain
- Solidity for smart contracts
- Hardhat development environment
- OpenZeppelin contract libraries
- Chainlink oracles integration
- The Graph for indexing
- MetaMask and WalletConnect support
Quick Start
Using Docker (Recommended)
- Clone the repository:
git clone https://huggingface.co/chainr-ai/CHAINR
cd CHAINR
- Set up environment variables:
cp .env.example .env
# Add your API keys and configuration
- Start with Docker Compose:
docker-compose up -d
- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Documentation: http://localhost:3000/docs
Manual Installation
- Install dependencies:
# Backend
cd backend
npm install
# Frontend
cd ../frontend
npm install
# Smart contracts
cd ../contracts
npm install
- Start MongoDB and Redis:
docker run -d -p 27017:27017 mongo
docker run -d -p 6379:6379 redis
- Run the development servers:
# Backend (Terminal 1)
cd backend
npm run dev
# Frontend (Terminal 2)
cd frontend
npm run dev
# Hardhat node (Terminal 3)
cd contracts
npx hardhat node
Environment Variables
# API Keys
OPENAI_API_KEY=your_openai_api_key
INFURA_PROJECT_ID=your_infura_project_id
ETHERSCAN_API_KEY=your_etherscan_api_key
PINATA_API_KEY=your_pinata_api_key
# Database
MONGODB_URI=mongodb://localhost:27017/chainr-ai
REDIS_URL=redis://localhost:6379
# Blockchain
PRIVATE_KEY=your_deployment_private_key
NETWORK=hardhat
# Application
JWT_SECRET=your_jwt_secret
FRONTEND_URL=http://localhost:3000
Usage
Creating a DApp
- Chat with AI: Describe your DApp idea in natural language
- Review Architecture: AI generates project structure and tech recommendations
- Smart Contracts: Auto-generated Solidity contracts based on requirements
- Frontend Creation: React components with Web3 integration
- Testing: Automated test suite generation
- Deployment: One-click deployment to chosen blockchain
Example Conversation
User: "Create a NFT marketplace with royalties and auction features"
CHAINR AI: "I'll help you build an NFT marketplace DApp. Let me break this down:
๐ Smart Contracts Needed:
- ERC721 NFT contract with royalty support (EIP-2981)
- Marketplace contract with auction functionality
- Payment splitter for royalty distribution
๐จ Frontend Components:
- NFT gallery and detail pages
- Auction bidding interface
- Artist dashboard
- Wallet integration
Would you like me to start with the smart contracts?"
API Endpoints
DApp Generation
POST /api/dapp/generate
POST /api/dapp/deploy
GET /api/dapp/:id/status
Smart Contracts
POST /api/contracts/compile
POST /api/contracts/deploy
GET /api/contracts/:address/verify
IPFS Integration
POST /api/ipfs/upload
GET /api/ipfs/:hash
Supported DApp Types
- ๐จ NFT Marketplaces: Trading, minting, royalties
- ๐ฆ DeFi Protocols: DEX, lending, staking
- ๐ฎ GameFi: Play-to-earn, NFT games
- ๐ณ๏ธ DAOs: Governance, voting, treasury
- ๐ช E-commerce: Decentralized marketplaces
- ๐ Education: Certificate verification, courses
- ๐ฅ Healthcare: Medical records, insurance
- ๐ฑ Carbon Credits: Environmental tracking
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
Security
- Smart contracts audited by OpenZeppelin
- Rate limiting and DDoS protection
- Input sanitization and validation
- Secure wallet connection handling
- Private key encryption at rest
Support
- ๐ง Email: [email protected]
- ๐ Website: chainrai.xyz
- ๐ Issues: GitHub Issues
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support