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)

  1. Clone the repository:
git clone https://huggingface.co/chainr-ai/CHAINR
cd CHAINR
  1. Set up environment variables:
cp .env.example .env
# Add your API keys and configuration
  1. Start with Docker Compose:
docker-compose up -d
  1. Access the application:

Manual Installation

  1. Install dependencies:
# Backend
cd backend
npm install

# Frontend
cd ../frontend
npm install

# Smart contracts
cd ../contracts
npm install
  1. Start MongoDB and Redis:
docker run -d -p 27017:27017 mongo
docker run -d -p 6379:6379 redis
  1. 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

  1. Chat with AI: Describe your DApp idea in natural language
  2. Review Architecture: AI generates project structure and tech recommendations
  3. Smart Contracts: Auto-generated Solidity contracts based on requirements
  4. Frontend Creation: React components with Web3 integration
  5. Testing: Automated test suite generation
  6. 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

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. 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

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support