AI-Powered Fake News and Political Bias Detection
A browser extension that analyzes news articles in real-time to detect misinformation, identify political bias, and verify claims against trusted fact-checking sources.
TrueLens is a full-stack application consisting of three components:
- Browser Extension - Chrome extension built with React that extracts article content and displays analysis results
- Node.js Backend - Express server that handles API requests and coordinates between the extension and ML service
- Python ML Service - FastAPI server running machine learning models for text analysis
- Real-time credibility scoring for news articles
- Political bias detection (left, center, right)
- Automatic claim extraction from article text
- Fact-checking against Google Fact Check API
- Privacy-focused design with no data collection
Extension
- React 18
- Vite
- Tailwind CSS
- Chrome Manifest V3
Backend
- Node.js
- Express 5
ML Service
- Python 3.10+
- FastAPI
- spaCy (en_core_web_sm)
- Transformers (RoBERTa, BART-MNLI)
- PyTorch
- Node.js v18+
- Python 3.10+
- Chrome browser
git clone https://github.com/vaijaaaaa/TrueLens.git
cd TrueLenscd backend
npm install
npm run devThe backend runs on http://localhost:5000
cd ml-service
python -m venv venv
venv\Scripts\activate # On Windows
pip install -r requirements.txt
python -m spacy download en_core_web_sm
uvicorn app.main:app --reload --port 8000The ML service runs on http://localhost:8000
cd extension
npm install
npm run buildThen load the extension in Chrome:
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
extension/distfolder
- Start the backend server
- Start the ML service
- Navigate to any news article
- Click the TrueLens extension icon
- View the analysis results including credibility score, bias detection, and fact-checks
TrueLens/
βββ backend/ # Node.js Express server
β βββ src/
β βββ index.js
βββ ml-service/ # Python FastAPI ML service
β βββ app/
β βββ main.py
β βββ models/
βββ extension/ # Chrome extension
β βββ src/
β βββ popup/
β βββ content.js
βββ frontend/ # Landing page website
βββ src/
βββ Components/
Backend
POST /analyze- Analyze article text for fake news and bias
ML Service
POST /ml- Process text through ML modelsGET /health- Health check endpoint
MIT License
Built by vaijaaaaa