A blockchain-powered content verification platform that combines on-chain content registration with AI-powered fact-checking to combat misinformation.
Fake News Verifier allows publishers to register their content on the Ethereum blockchain (Sepolia testnet), creating an immutable record of authenticity. Users can verify any news article, claim, or image against this registry and receive AI-powered analysis using multiple verification sources.
- Blockchain Content Registration: Publishers can register articles, images, and videos on-chain with metadata stored on IPFS
- AI-Powered Verification: Uses Gemini AI and Perplexity for comprehensive fact-checking and source verification
- Image/Screenshot Analysis: Upload screenshots of news articles for AI analysis and blockchain verification
- Public Ledger: Browse all registered content with filtering and search capabilities
- MetaMask Integration: Connect your wallet to register content and interact with the blockchain
- Real-time News Feed: View verified news from trusted sources registered on the platform
- React 18 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- Framer Motion for animations
- ethers.js for blockchain interaction
- Node.js with ES modules
- NewsAPI integration for fetching headlines
- Automated content registration via cron jobs
- Solidity smart contracts
- Hardhat development environment
- Deployed on Sepolia testnet
- IPFS via Pinata for metadata storage
- Node.js 18+
- MetaMask browser extension
- Sepolia testnet ETH (get from faucets like sepolia.dev or sepoliafaucet.com)
Fake-News-Verifier/
├── contracts/ # Solidity smart contracts
├── scripts/ # Deployment and utility scripts
├── test/ # Contract tests
├── frontend/ # React frontend application
│ └── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ └── utils/ # Utility functions
├── backend/ # Node.js backend service
│ └── src/
│ ├── services/ # Business logic
│ └── config/ # Configuration files
└── hardhat.config.js # Hardhat configuration
git clone https://github.com/yourusername/Fake-News-Verifier.git
cd Fake-News-Verifier# Root dependencies (Hardhat)
npm install
# Frontend dependencies
cd frontend
npm install
# Backend dependencies
cd ../backend
npm installCopy the example environment files and fill in your API keys:
# Root .env (for Hardhat)
cp .env.example .env
# Frontend .env
cp frontend/.env.example frontend/.env
# Backend .env
cp backend/.env.example backend/.env| Service | Purpose | Get it from |
|---|---|---|
| Infura | Ethereum node access | https://infura.io |
| Pinata | IPFS storage | https://app.pinata.cloud |
| Gemini | AI fact-checking | https://makersuite.google.com/app/apikey |
| Perplexity | Web search verification | https://www.perplexity.ai/settings/api |
| NewsAPI | News headlines (backend) | https://newsapi.org |
| Etherscan | Contract verification | https://etherscan.io/apis |
cd frontend
npm run devThe application will be available at http://localhost:3000
The backend service automatically fetches and registers news from trusted sources:
cd backend
npm startTo deploy your own instance of the contract:
# Compile contracts
npx hardhat compile
# Deploy to Sepolia
npx hardhat run scripts/deploy.js --network sepolia
# Verify on Etherscan
npx hardhat run scripts/verify.js --network sepoliaThe ContentVerification contract is deployed on Sepolia testnet:
Contract Address: 0x0cEA3E7DeF8A5E31C4ec747Ec25b998deCA48629
registerContent(bytes32 contentHash, string contentType, string ipfsMetadata)- Register new contentverifyContent(bytes32 contentHash)- Check if content exists and get detailsgetPublisherContent(address publisher)- Get all content hashes for a publishersearchByPartialHash(string partialHash)- Search content by partial hash match
- Connect your MetaMask wallet
- Navigate to the Publish page
- Enter your content (text or upload file)
- Submit to register on the blockchain
- Pay the gas fee in Sepolia ETH
- Navigate to the Verify page
- Paste the news content or upload a screenshot
- The system will:
- Check the blockchain registry for matches
- Analyze content using AI models
- Search for related fact-checks
- Provide a verification score and detailed analysis
# Run contract tests
npx hardhat test
# Run with coverage
npx hardhat coverage- Never commit your
.envfiles or expose private keys - The contract owner has limited admin functions (pause/unpause only)
- All content hashes are stored on-chain and cannot be modified
- IPFS metadata provides additional context but the hash is the source of truth
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License