Skip to content

About

for Hack with Stack

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 

Repository files navigation

hack_with_stack

Chain_Talk

Chain_Talk Banner Ethereum React Solidity

Decentralized Knowledge, Powered by AI & Blockchain ๐Ÿš€

Built by Team Kabaadi ๐Ÿ› ๏ธ


๐ŸŒŸ What is Chain_Talk?

site link[https://hack-with-stack-phi.vercel.app/]

Chain_Talk is a revolutionary Web3-powered AI chatbot that bridges the gap between traditional web scraping and decentralized compensation. We solve a critical problem: content creators aren't fairly compensated when their data is scraped.

Our platform leverages:

  • ๐Ÿ”— Ethereum Smart Contracts for transparent, immutable payment records
  • ๐Ÿค– Groq AI (LLaMA 3.3 70B) for intelligent query processing
  • ๐Ÿ’ฐ Automatic Micro-Payments to registered content creators
  • ๐Ÿ“Š On-Chain History of all data fetches and payments

๐ŸŽฏ Problem Statement

In today's internet:

  • Content creators lose revenue when AI bots scrape their websites
  • No transparent record of who uses what data
  • Zero compensation for valuable information extraction
  • Trust issues between data consumers and providers

Chain_Talk solves this with blockchain-verified payments and complete transparency.


โœจ Features

๐Ÿ” Secure Site Registration

  • Register any website URL on the Ethereum blockchain
  • Set your wallet address to receive scraping payments
  • Immutable ownership records

๐Ÿค– AI-Powered Chatbot

  • Ask questions about registered sites (currently supports Wikipedia)
  • Get instant, intelligent responses using Groq's LLaMA 3.3 70B model
  • Automatic payment processing when data is fetched

๐Ÿ’Ž Smart Payment System

  • Dynamic fee calculation: dataSize * 0.0001 ETH (minimum 0.001 ETH)
  • Instant payments to content creators
  • All transactions recorded on-chain

๐Ÿ“œ Complete Transaction History

  • View all past queries and payments
  • Track data volume scraped
  • Transparent blockchain verification
  • Beautiful, animated UI cards for each record

๐ŸŽจ Stunning UI/UX

  • Glassmorphism design with backdrop blur effects
  • Smooth animations and transitions
  • Gradient color schemes
  • Responsive mobile-first design
  • Dark mode optimized

๐Ÿ› ๏ธ Tech Stack

Frontend Smart Contracts AI/APIs Tools
React 18 Solidity ^0.8.20 Groq AI Vite
TailwindCSS Ethers.js v6 LLaMA 3.3 70B MetaMask
React Router Hardhat/Remix - Git

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         User Interface                       โ”‚
โ”‚  (React + TailwindCSS + Glassmorphism Design)               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    WalletContext Provider                    โ”‚
โ”‚         (MetaMask Connection + Contract Instance)           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                                   โ”‚
         โ–ผ                                   โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Ethereum Blockchainโ”‚          โ”‚      Groq AI API         โ”‚
โ”‚   (Smart Contract)   โ”‚          โ”‚   (LLaMA 3.3 70B)       โ”‚
โ”‚                      โ”‚          โ”‚                          โ”‚
โ”‚ โ€ข registerSite()     โ”‚          โ”‚ โ€ข Query Processing       โ”‚
โ”‚ โ€ข fetchInfo()        โ”‚          โ”‚ โ€ข Natural Language       โ”‚
โ”‚ โ€ข getFetchHistory()  โ”‚          โ”‚ โ€ข Wikipedia Search       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‹ Smart Contract Functions

registerSite(string _url)

Register a website to receive payments when data is scraped.

fetchInfo(string _siteUrl, string _topic, uint256 dataScraped)

Called when chatbot fetches data. Automatically pays the site owner.

getFetchHistory(string _siteUrl)

Retrieve complete transaction history for a registered site.


๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18+)
  • MetaMask browser extension
  • Ethereum testnet ETH (Sepolia/Goerli)

Installation

  1. Clone the repository
git clone https://github.com/your-team/chain_talk.git
cd chain_talk
  1. Install dependencies
npm install
  1. Set up environment variables
# Create .env file
VITE_GROQ_API_KEY=your_groq_api_key_here
  1. Update contract address
// src/contract.js
export const CONTRACT_ADDRESS = "0xYourDeployedContractAddress";
export const CONTRACT_ABI = [...]; // Your ABI here
  1. Run the development server
npm run dev
  1. Open your browser
http://localhost:5173

๐ŸŽฎ Usage Guide

Step 1: Connect Your Wallet

Click the "Connect Wallet" button in the header to connect MetaMask.

Step 2: Register a Site

  1. Navigate to "Register Site"
  2. Enter the site URL (e.g., wikipedia.org)
  3. Click "Register Site" and confirm the transaction
  4. Wait for blockchain confirmation โœ…

Step 3: Use the Chatbot

  1. Go to "Chatbot" page
  2. Ask any question (e.g., "Tell me about quantum computing")
  3. The AI will search Wikipedia and automatically:
    • Process your query
    • Fetch relevant data
    • Pay the site owner
    • Display results with transaction hash

Step 4: View History

Check the "History" page to see all past transactions, payments, and data volumes.


๐Ÿ’ก Use Cases

  • ๐Ÿ“š Academic Research: Pay researchers directly when citing their work
  • ๐Ÿ“ฐ News Aggregation: Compensate journalists for content extraction
  • ๐Ÿ›’ E-commerce: Reward product database owners for price comparisons
  • ๐ŸŽ“ Educational Platforms: Fair payment for course material usage
  • ๐Ÿ”ฌ Scientific Databases: Transparent attribution and compensation

๐ŸŒˆ UI Highlights

Dynamic Animations

  • โœจ Floating particles background
  • ๐ŸŒŠ Flowing wave lines
  • ๐Ÿ’ซ Glow effects on interactive elements
  • ๐ŸŽญ Smooth card hover transitions

Glassmorphism Design

background: rgba(17, 24, 39, 0.6);
backdrop-filter: blur(20px);
border: 1px solid rgba(59, 130, 246, 0.2);

Color Palette

  • Primary: Blue (#3B82F6)
  • Secondary: Purple (#8B5CF6)
  • Accent: Pink (#EC4899)
  • Dark: Black with gradient overlays

๐Ÿ† Team Kabaadi

Member Role GitHub
Member 1 Frontend + Smart Contracts @justwasif
Member 2 UI/UX + Integration @ayushi8463-lgtm
Member 3 AI + Backend Logic @Ibrahim2750mi

๐Ÿ”ฎ Future Roadmap

  • Multi-chain support (Polygon, Arbitrum, Optimism)
  • AI model fine-tuning for better responses
  • Mobile app (React Native)
  • Content creator analytics dashboard
  • NFT certificates for data contributions
  • DAO governance for platform decisions
  • Integration with IPFS for decentralized storage

๐Ÿค Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Hack with Stack for organizing this amazing hackathon
  • Groq for providing cutting-edge AI inference
  • Ethereum Foundation for the robust blockchain infrastructure
  • OpenZeppelin for secure smart contract libraries
  • The open-source community for incredible tools and support

๐Ÿ“ž Contact & Support


โญ Star us on GitHub โ€” it helps!

Made with ๐Ÿ’œ by Team Kabaadi

Hack with Stack Hackathon 2025


๐Ÿ”ง Troubleshooting

MetaMask not connecting?

  • Make sure you're on the correct network (Sepolia/Goerli)
  • Try refreshing the page
  • Clear browser cache

Transactions failing?

  • Ensure you have enough ETH for gas fees
  • Check if the site is registered
  • Verify contract address is correct

AI not responding?

  • Check if GROQ_API_KEY is set correctly
  • Verify API rate limits
  • Check console for errors

๐Ÿš€ Built on Ethereum | ๐Ÿค– Powered by Groq AI | ๐Ÿ’Ž Crafted with React

About

for Hack with Stack

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages