TruthShield AI — Fake News Detector
TruthShield AI (Stylistic News Attribution Model + Web UI Dashboard)
About the Project
TruthShield AI is a complete, interactive, and visually stunning web application that detects the credibility of news articles. Rather than relying on simple database lookups, the system uses a debiased machine learning model running entirely client-side in the browser to analyze the writing signature, styling, sensationalism, and vocabulary of any news article in real-time.
Inference Pipeline & Debiasing
Traditional models trained on news datasets learn to look for publisher signatures (like 'Reuters') rather than actual linguistic style. TruthShield AI corrects this through a debiased NLP training pipeline and local execution:
User Input
News Article Text
Pre-processing
Clean & Lowercase
TF-IDF Math
L2-Normalized Vector
Inference
Logistic Regression
Dashboard
LIME Words Highlight
Key Features
The web dashboard contains advanced diagnostic panels running entirely in the browser:
Client-Side ML Inference: Real-time predictions in the browser with 0ms server latency and no backend costs.
Explainability Panel (LIME-style): A visual breakdown that highlights the exact words in the text that influenced the model's decision.
Clickbait Index: Heuristic analytics checking for outrageous claims, capital letters, and punctuation markers.
Sensationalism Index: Analyzes the density of outrage-trigger words (e.g., slam, panicked, shocking).
Tech Stack & Algorithm
Built using Next.js 16 and Python Scikit-Learn for training and browser execution:
Frontend: Next.js 16, React 19, Tailwind CSS v4, TypeScript
Model Training: Python 3.8+, Scikit-Learn (TF-IDF Vectorizer + Logistic Regression)
Inference Engine: Custom TypeScript TF-IDF and Sigmoid Math
UI styling: Obsidian charcoal dark mode (#0b0c10) with emerald-green glow effects
Project Demo
Project Note
🔌 Chrome Extension Support TruthShield AI also includes a Chrome Extension for real-time news analysis. To use it: • Download the `chrome-extension` folder from GitHub • Load it via chrome://extensions → Load Unpacked • Paste the deployed TruthShield AI project link in extension settings You can then scan news articles directly from your browser in real-time.