Skip to content

A-Justice-League/ai-powered-fact-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ” AI-Powered Fact Checker

Gemini 3 Hackathon Project - Fighting misinformation with AI-powered claim verification and real-time web grounding.

License: MIT Python React FastAPI


πŸ“– Overview

The AI-Powered Fact Checker is a full-stack web application that leverages Gemini 3 with Google Search Grounding to automatically verify factual claims from text or image inputs. Users receive instant credibility scores, detailed verdicts (TRUE/FALSE/UNSURE), and cited sourcesβ€”all powered by cutting-edge AI.

🎯 Key Features

  • βœ… Text Analysis: Paste articles, social media posts, or any text for instant fact-checking
  • βœ… Image Analysis: Upload screenshots or images containing claims
  • βœ… Gemini 3 Integration: Powered by gemini-3-flash-preview for state-of-the-art analysis
  • βœ… Google Search Grounding: Real-time web verification with cited sources
  • βœ… Search Query Transparency: View the exact Google Search queries Gemini used
  • βœ… Credibility Scoring: Algorithmic truthfulness score (0-100%)
  • βœ… Premium UI: Modern, responsive design with smooth animations
  • βœ… Structured Output: JSON-formatted claims with verdicts and evidence

🌍 Social Impact

Misinformation is a global crisis affecting elections, public health, and social cohesion. Our tool empowers users to:

  • Verify claims before sharing on social media
  • Educate themselves with evidence-based explanations
  • Combat the spread of false information

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   React Frontend (Vite + TypeScript) β”‚
β”‚   - Premium UI with Tailwind CSS     β”‚
β”‚   - Framer Motion animations         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚ HTTP/JSON
                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   FastAPI Backend (Python 3.12+)    β”‚
β”‚   - Modular architecture             β”‚
β”‚   - Pydantic validation              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚
                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Gemini 3 API (gemini-3-flash-preview)β”‚
β”‚   + Google Search Grounding          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For detailed architecture documentation, see ARCHITECTURE.md


πŸš€ Quick Start

Prerequisites

  • Python 3.12+
  • Node.js 18+
  • Gemini API Key (get one at ai.google.dev)

1. Clone the Repository

git clone https://github.com/your-org/ai-powered-fact-checker.git
cd ai-powered-fact-checker

2. Setup Backend

cd backend
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

Create a .env file:

cp .env.example .env

Edit .env and add your Gemini API key:

GEMINI_API_KEY=your_api_key_here

Start the backend:

uvicorn app.main:app --reload

The API will run at http://localhost:8000

3. Setup Frontend

cd frontend
npm install

Create a .env file:

cp .env.example .env

Edit .env:

VITE_API_URL=http://localhost:8000

Start the frontend:

npm run dev

The app will open at http://localhost:5173


πŸ“š Documentation


🎬 Demo

Text Analysis

  1. Paste an article or social media post
  2. Click "Analyze"
  3. View credibility score, claim verdicts, and sources

Image Analysis

  1. Upload a screenshot containing claims
  2. Gemini extracts text and identifies claims
  3. Google Search verifies each claim
  4. View results with cited sources

πŸ“Ή Watch the full demo video β†’ (Coming soon)


πŸ› οΈ Technology Stack

Backend

  • FastAPI - High-performance Python web framework
  • Gemini 3 API - gemini-3-flash-preview for claim extraction and verification
  • Google Search Grounding - Real-time web verification
  • Pydantic - Data validation and settings management
  • Python 3.12+ - Modern Python with type hints

Frontend

  • React 18 - Component-based UI library
  • Vite - Next-generation build tool
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first styling
  • Framer Motion - Smooth animations
  • Radix UI - Accessible component primitives

πŸ§ͺ Testing

Backend Tests

cd backend
pytest tests/ --cov=app

Frontend Tests

cd frontend
npm run test

E2E Tests (Coming Soon)

npm run test:e2e

πŸ“¦ Deployment

Backend Deployment (Railway/Render)

  1. Connect your GitHub repository
  2. Set environment variables:
    • GEMINI_API_KEY
    • DEBUG=False
  3. Deploy!

Frontend Deployment (Vercel)

  1. Connect GitHub repository to Vercel
  2. Set VITE_API_URL to your production backend URL
  3. Deploy!

Live Demo: Coming soon after deployment


🀝 Contributing

We welcome contributions! Please read our Contributing Guidelines before submitting PRs.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature-name
  3. Make your changes
  4. Write tests
  5. Submit a pull request

Code Standards

  • Backend: Black formatting, type hints, docstrings
  • Frontend: ESLint + Prettier, TypeScript strict mode
  • Commits: Conventional Commits format

πŸ“ License

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


πŸ‘₯ Team

A-Justice-League - Gemini 3 Hackathon Participants

  • [Team Member 1] - Backend Development
  • [Team Member 2] - Frontend Development
  • [Team Member 3] - AI/ML Engineering
  • [Your Name] - Full Stack & Project Lead

πŸ™ Acknowledgments

  • Google for the Gemini API and hackathon opportunity
  • FastAPI and React communities for excellent documentation
  • All open-source contributors whose libraries made this possible

πŸ“ž Contact


🌟 Star this repo if you find it useful!

Like what you see? Give us a ⭐ on GitHub to show your support!


Made with ❀️ for the Gemini 3 Global Hackathon

About

An AI Powered Checker, for the Gemini 3 Global Hackathon (DevPost)

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors