https://github.com/colddsam/truth-guardian
An advanced AI-powered fake news detection system that verifies text, images, and social media posts using Gemini AI, FastAPI, and Next.js. Includes a modern web interface, a lightweight Streamlit app, and a Chrome extension for real-time fake content detection. Built to combat misinformation with explainable AI results and contextual source links.
https://github.com/colddsam/truth-guardian
ai-news-verification ai-verification chrome-extension fake-news-detection fastapi-backend gemini-api image-authentication machine-learning misinformation-detection news-fact-checking nextjs-api nextjs-app nlp nlp-news-detection social-media-analysis streamlit streamlit-app truth-score
Last synced: 4 months ago
JSON representation
An advanced AI-powered fake news detection system that verifies text, images, and social media posts using Gemini AI, FastAPI, and Next.js. Includes a modern web interface, a lightweight Streamlit app, and a Chrome extension for real-time fake content detection. Built to combat misinformation with explainable AI results and contextual source links.
- Host: GitHub
- URL: https://github.com/colddsam/truth-guardian
- Owner: colddsam
- License: apache-2.0
- Created: 2025-05-15T03:54:38.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-21T16:31:15.000Z (5 months ago)
- Last Synced: 2025-05-21T16:34:09.074Z (5 months ago)
- Topics: ai-news-verification, ai-verification, chrome-extension, fake-news-detection, fastapi-backend, gemini-api, image-authentication, machine-learning, misinformation-detection, news-fact-checking, nextjs-api, nextjs-app, nlp, nlp-news-detection, social-media-analysis, streamlit, streamlit-app, truth-score
- Language: TypeScript
- Homepage: https://truthguardian.vercel.app
- Size: 3.36 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ก๏ธ Truth Guardian AI - Fake News Detection

_Advanced AI-powered tool to detect fake news from **Text**, **Social Media**, and **Images** in real-time._[](https://fake-news-detection-inky.vercel.app/)
[](#-browser-extension)
[](#-streamlit-app)
[](https://github.com/colddsam/Fake-News-Detection/issues)
[](https://github.com/colddsam/Fake-News-Detection/network/members)
[](https://github.com/colddsam/Fake-News-Detection/stargazers)
[](https://github.com/colddsam/Fake-News-Detection/blob/main/LICENSE)
[](https://github.com/colddsam/Fake-News-Detection/archive/refs/heads/main.zip)---
## ๐ธ Preview

---
## ๐ Table of Contents
- [๐ก๏ธ Truth Guardian AI - Fake News Detection](#๏ธ-truth-guardian-ai---fake-news-detection)
- [๐ธ Preview](#-preview)
- [๐ Table of Contents](#-table-of-contents)
- [โ Features](#-features)
- [๐ง How it Works](#-how-it-works)
- [๐งฐ Tech Stack](#-tech-stack)
- [๐ ๏ธ Next Website Setup](#๏ธ-next-website-setup)
- [โ๏ธ Create `.env.local`](#๏ธ-create-envlocal)
- [๐ Streamlit App](#-streamlit-app)
- [๐ Run Streamlit Locally](#-run-streamlit-locally)
- [โจ Features](#-features-1)
- [๐ FastAPI Backend](#-fastapi-backend)
- [๐งฉ Browser Extension](#-browser-extension)
- [๐ง Installation](#-installation)
- [๐งพ SEO Configuration](#-seo-configuration)
- [๐ Folder Structure](#-folder-structure)
- [๐ค Contributing](#-contributing)
- [๐ License](#-license)
- [โจ Author](#-author)---
## โ Features
| Category | Description |
| ---------------- | ------------------------------------------------------------------------ |
| ๐ Text Checker | Detects manipulated or misleading text using NLP and ML |
| ๐ผ๏ธ Image Checker | Uses Gemini AI to analyze image authenticity |
| ๐งต Social Checker | Cross-verifies social media claims using real-time search engine results |
| ๐ Browser Ext. | Chrome Extension to detect fake news directly on websites and posts |
| ๐ Streamlit App | Lightweight Python-based app interface for simple testing and analysis |
| ๐ Python API | FastAPI backend for serving fake news detection APIs (text/image/social) |
| ๐ Realtime Data | Live AI scoring system with contextual feedback |
| โ๏ธ SEO Optimized | Auto-generated sitemap, robots.txt, meta description |---
## ๐ง How it Works
```mermaid
graph TD;
A[Input News] --> B{Choose Type};
B -->|Text| C[Analyze Text];
B -->|Image| D[Analyze Image with Gemini AI];
B -->|Social Link| E[Fetch Context & Analyze];
C --> F[Score + Verdict];
D --> F;
E --> F;
F --> G[Result with Sources];
```---
## ๐งฐ Tech Stack
| Layer | Technology |
| ----------- | ------------------------------------ |
| ๐ป Frontend | React.js, Next.js, TailwindCSS |
| ๐ Streamlit | Python Streamlit for UI + testing |
| โ๏ธ Backend | Next.js API Routes, FastAPI (Python) |
| ๐ง AI | Google Gemini API |
| ๐ Extension | Chrome Extension (Manifest V3) |
| โ๏ธ Hosting | Vercel (Frontend), Render (Backend) |---
## ๐ ๏ธ Next Website Setup
```bash
git clone https://github.com/colddsam/Fake-News-Detection.git
cd Fake-News-Detection/website
npm install
npm run dev
```Visit: `http://localhost:3000`
### โ๏ธ Create `.env.local`
```env
GEMINI_API_KEY=your_gemini_api_key
ALLOWED_EXTENSION_ORIGIN=chrome-extension://your-extension-id
NEXT_PUBLIC_BASE_URL=https://yourappdomain.com
```---
## ๐ Streamlit App
The Streamlit app is a minimal interface built for testing and rapid prototyping. Located in the `frontend/` directory.
### ๐ Run Streamlit Locally
```bash
cd Fake-News-Detection/frontend
pip install -r requirements.txt
streamlit run app.py
```Open in browser: `http://localhost:8501`
### โจ Features
* Simple UI to test text, image, and social media inputs
* Sends requests to the FastAPI backend
* Displays AI-based scoring and verdicts
* Lightweight and easy to modify---
## ๐ FastAPI Backend
```bash
cd Fake-News-Detection/backend
python3 -m venv venv
source venv/bin/activate # on Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload
```> Backend will run at `http://localhost:8000`
---
## ๐งฉ Browser Extension
### ๐ง Installation
1. Visit `chrome://extensions/`
2. Enable **Developer Mode**
3. Click **Load Unpacked**
4. Select the `extension/` folder---
## ๐งพ SEO Configuration
Defined inside `layout.tsx` (Next.js):
```ts
export const metadata = {
title: "Truth Guardian AI - Fake News Detection",
description: "Advanced AI tool to detect fake news from text, social media, and images",
};
```Other SEO tools:
* `next-sitemap` for sitemap & robots
* Optimized metadata & OG tags---
## ๐ Folder Structure
```
Fake-News-Detection
โโโ backend/ # FastAPI Backend
โ โโโ main.py
โ โโโ search.py
โ โโโ verify.py
โ โโโ utils.py
โ โโโ requirements.txt
โโโ frontend/ # Streamlit App (New)
โ โโโ app.py
โ โโโ requirements.txt
โโโ extension/ # Browser Extension
โ โโโ icons/
โ โโโ config.js
โ โโโ manifest.json
โ โโโ popup.css
โ โโโ popup.html
โ โโโ popup.js
โโโ website/ # Next.js Frontend
โ โโโ app/
โ โ โโโapi/
โ โโโ public/
โ โโโ styles/
โ โโโ next.config.mjs
โ โโโ package.json
โ โโโ ...
โโโ LICENSE
โโโ README.md
โโโ content.png
โโโ preview.png
```---
## ๐ค Contributing
We welcome contributions! To get started:
1. **Fork** the repository
2. Create a new branch: `git checkout -b feature/your-feature-name`
3. Commit your changes: `git commit -m "Added something cool"`
4. Push to the branch: `git push origin feature/your-feature-name`
5. Open a **Pull Request**---
## ๐ License
This project is licensed under the [Apache License](https://github.com/colddsam/Fake-News-Detection/blob/main/LICENSE)
---
## โจ Author
**Samrat Kumar Das**
[](https://www.linkedin.com/in/colddsam/)---