About
Brain Bot 🧠
A Web3-powered educational platform where users can exchange ETH for Braincells (platform credits) and interact with an AI agent to learn new concepts.
Features
- 🔄 ETH to Braincells Exchange System
- 🤖 AI-powered Learning Assistant
- 💳 Web3 Wallet Integration (MetaMask)
- 💾 Chat History Storage
- 💫 Modern, Responsive UI
Architecture
Frontend
- Vanilla JavaScript with Vite
- Web3 Integration using Viem
- Base Sepolia Test Network for transactions
- Supabase for chat history storage
Backend Services
- Web3 Backend API (https://outskill-cline.onrender.com)
- Handles ETH to Braincells conversion
- Manages user balances
- Verifies blockchain transactions
- AI Agent API
- Endpoint: https://priaansh-flowise.hf.space
- Provides educational responses and explanations
Setup
- Install dependencies:
npm install
- Configure environment:
- Ensure you have MetaMask installed with Base Sepolia Test Network configured
- Get some test ETH from Base Sepolia faucet
- Start development server:
npm run dev
Usage
-
Connect Wallet
- Click "Connect Wallet" button
- Approve MetaMask connection
-
Exchange ETH for Braincells
- Click "Exchange ETH" button
- Enter desired ETH amount
- Confirm transaction in MetaMask
- Exchange rate: 1 ETH = 30,000 Braincells
-
Start Learning
- Click "Start Solving" to enter chat interface
- Each message costs 100 Braincells
- Ask questions to learn new concepts
- Chat history is saved automatically
Technical Details
API Endpoints
Web3 Backend (Base URL: https://outskill-cline.onrender.com)
GET /health: Check API statusGET /balance/:walletAddress: Get user's Braincells balancePOST /exchange: Convert ETH to Braincells{ "walletAddress": "0x...", "ethAmount": 1.0, "transactionHash": "0x..." }
Architecture Components
web3.js: Handles wallet connection and ETH transac
Projects
Interests & skills
BrainBoteducationalplatformwhereusersexchangeETHBraincellsinteractagentBase Sepolia testnetViemNode.js/Express.jslangchainSupabase