Skip to content

Truth-lens-New/Truth-Lens-Mini-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

76 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” TruthLens - Multi-Modal Misinformation Detection Platform

TruthLens Banner Version Status

Analyze images, videos, and articles with forensic-grade AI. Detect deepfakes, manipulations, and misinformation instantly.

Important

Dec 2025 - Frontend Restructured! The frontend moved from src/ to client/. Run: cd client && npm install


πŸ‘₯ Team

Name Role Branch
Shivam Yadav Developer shivam
Harsh Rupreja Developer harsh
Uday Dewani Developer uday

πŸš€ Features

βœ… MVP Complete (v1.0.0)

  • πŸ” User Authentication - Secure login/register with JWT tokens
  • πŸ“ Article/Claim Analysis - Extract and verify claims from text or URLs
  • 🌐 Domain Trust Scoring - Evaluate source credibility (0-100 score)
  • βœ“ Fact-Check Integration - Google Fact Check API integration
  • πŸ“° Evidence Retrieval - GNews API for corroborating sources
  • πŸ€– Stance Classification - AI-powered stance detection
  • βš–οΈ Verdict Aggregation - Intelligent verdict synthesis
  • πŸ’¬ LLM Explanations - Human-readable analysis explanations
  • πŸ“Š Analysis History - View past verification results
  • 🎨 Modern UI - Dark theme with glassmorphism design

πŸ› οΈ Tech Stack

Frontend

  • React 18 + TypeScript
  • Vite - Build tool
  • Tailwind CSS - Styling
  • Lucide Icons - UI icons

Backend

  • FastAPI - Python API framework
  • SQLAlchemy - ORM
  • PostgreSQL - Database
  • Google Gemini - LLM integration

Infrastructure

  • Docker - Containerization
  • Docker Compose - Multi-container orchestration

πŸ“ Project Structure

TruthLens/
β”œβ”€β”€ client/                       # Frontend (React + Vite)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ LandingPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleVerification.tsx
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ lib/                 # Utilities (api.ts)
β”‚   β”‚   └── types/               # TypeScript definitions
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.ts
β”‚
β”œβ”€β”€ backend/                     # Backend (FastAPI)
β”‚   └── app/
β”‚       β”œβ”€β”€ api/v1/              # API endpoints
β”‚       β”‚   β”œβ”€β”€ auth.py          # Authentication
β”‚       β”‚   β”œβ”€β”€ analyze.py       # Analysis pipeline
β”‚       β”‚   └── history.py       # History management
β”‚       β”œβ”€β”€ models/              # Database models
β”‚       β”œβ”€β”€ services/            # Business logic
β”‚       β”‚   β”œβ”€β”€ domain_trust.py  # Domain scoring
β”‚       β”‚   β”œβ”€β”€ factcheck.py     # Fact-check API
β”‚       β”‚   β”œβ”€β”€ evidence.py      # News retrieval
β”‚       β”‚   β”œβ”€β”€ stance.py        # Stance classification
β”‚       β”‚   └── explanation.py   # LLM explanations
β”‚       └── core/                # Config & database
β”‚
β”œβ”€β”€ data/                        # Seed data
β”œβ”€β”€ docker-compose.yml           # Docker configuration
β”œβ”€β”€ CONTRIBUTING.md              # Collaboration guide
└── README.md                    # This file

πŸƒ Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.10+
  • Docker & Docker Compose
  • API Keys (Gemini, Google Fact Check, GNews)

1. Clone the Repository

git clone https://github.com/2025harshrupreja/Truth-Lens-Mini-Project.git
cd Truth-Lens-Mini-Project

2. Setup Environment

Create a .env file in the root directory:

# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/truthlens

# API Keys
GEMINI_API_KEY=your_gemini_api_key
GOOGLE_FACTCHECK_API_KEY=your_google_factcheck_key
GNEWS_API_KEY=your_gnews_api_key

# JWT
JWT_SECRET=your_jwt_secret_key

3. Start Backend (Docker)

docker-compose up -d

4. Install Frontend Dependencies

cd client
npm install

5. Start Development Server

npm run dev

6. Access the Application


🌿 Git Workflow

We use a 3-tier branching strategy:

main (production-ready, demo-ready)
  β”‚
  └── dev (integration & testing)
        β”‚
        β”œβ”€β”€ shivam
        β”œβ”€β”€ harsh
        └── uday

Flow: personal branch β†’ dev β†’ main

πŸ“– See CONTRIBUTING.md for detailed guidelines.


πŸ€– AI Collaboration

This project uses AI-assisted development. Each team member should use the AI prompt in CONTRIBUTING.md to ensure safe, merge-friendly code changes.


πŸ“Έ Screenshots

Landing Page Analysis Results
Dark theme with modern UI Detailed verification breakdown

πŸ“„ License

This project is developed as part of an academic mini-project.


Built with ❀️ by Team TruthLens

Shivam β€’ Harsh β€’ Uday

About

This project will fact check , check for fake news , ai generated images , ai generated videos

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors