Inspiration
Every 30 seconds, a piece of misinformation is shared on social media. According to an MIT study, false news spreads six times faster than true news on platforms like Twitter and Facebook. In Pakistan alone, the Digital Rights Foundation reported a surge in misinformation during elections, health crises, and civil unrest — with ordinary citizens bearing the consequences of decisions made on false information. Our team of four witnessed this firsthand. We saw how a single fabricated headline could shift public opinion overnight, how AI-generated deepfakes were being used to damage reputations, and how the average person had no practical tool to verify what they were seeing before hitting "share." Existing fact-checking websites are slow, manual, and require users to already suspect something is false. Most people never visit them. We asked ourselves: what if verification happened where the content is — not somewhere else? That question became TruthLens.
What it does
TruthLens is an AI-powered civic misinformation detection platform that analyzes digital content and returns a transparent Trust Score (0–100) — not just a "fake or real" label, but an evidence-based explanation of why content is credible or suspicious. Currently working in our web app prototype, users can submit:
News headlines and claims URLs for source credibility analysis Images for manipulation detection
TruthLens then delivers:
Fake news detection — NLP-based veracity classification using a DistilBERT model fine-tuned on the LIAR dataset (~12,800 labeled political statements) Manipulated image detection — JPEG Error Level Analysis (ELA) to identify edited or AI-generated images Source credibility scoring — domain reliability ratings based on Media Bias/Fact Check and Ad Fontes Media indices Live fact-check lookup — real-time cross-referencing via the Google Fact Check Tools API Explainable Trust Score — a 0–100 composite score with a plain-language explanation of the reasoning Multilingual support — language detection and translation for Urdu, Arabic, French, and Spanish before analysis
Our ultimate goal — and what we are actively building toward — is a browser extension that brings all of these capabilities directly into the user's browsing experience. Instead of requiring users to visit a separate platform, TruthLens will work silently in the background on social media feeds, news sites, and messaging platforms, flagging suspicious content in real time at the moment of consumption. This is the version that truly solves the civic problem at scale.
How we built it
We built TruthLens as a full-stack web application with a modular AI pipeline designed from the ground up to be extension-ready. Frontend
Plain HTML, CSS, and JavaScript (single-page app) Trust Score visualized with color-coded indicators (red / yellow / green) Demo claim buttons for live judge demonstrations Feedback buttons (👍/👎) for user trust voting
Backend
Python 3.11 + FastAPI + Uvicorn SQLite database storing analyzed claims, source reputation table, and user feedback log In-memory MD5 dictionary cache (Redis-ready interface) for instant repeat query responses REST API endpoints: /analyze, /analyze-image, /feedback, /history, /health AI Components
Text Veracity Classifier (3-tier fallback)
Primary: DistilBERT fine-tuned on the LIAR dataset (binary: credible vs. misleading) Fallback 1: Zero-shot classification via facebook/bart-large-mnli Fallback 2: Regex heuristics (sensationalism patterns, caps ratio, absolute assertions)
Image Forensics
Pillow-based ELA: resaves image at 90% JPEG quality, computes pixel-level difference variance to detect compression splices indicating manipulation
Fact-Check Engine
Live Google Fact Check Tools API as primary source Jaccard-similarity local seed database as automatic fallback
Trust Score Aggregator
Custom weighted formula combining classifier probability, fact-check match rating, domain reputation score, and image forensics signal
Multilingual Pipeline
langdetect for language identification Helsinki-NLP/opus-mt translation models for Urdu, Arabic, French, and Spanish
LLM Explanation Generator
Template-based explanations by default Anthropic Claude (claude-sonnet-4-6) for richer contextual explanations when API key is present
Challenges We Ran Into
Building for real-world use, not just demos
The hardest challenge was designing a system that degrades gracefully. If the ML model fails to load on a low-resource machine, the system must still work — so we built a three-tier classifier fallback that automatically drops to lighter models without crashing. Multi-modal pipeline coordination
Combining text, image, and URL analysis into a single Trust Score required designing a weighted aggregation formula that feels intuitive to users while remaining technically defensible. Explainability over accuracy
It was tempting to optimize purely for classification accuracy, but we realized judges and users care more about understanding a verdict than receiving one. Designing transparent, plain-language explanations for every result was harder than the model itself. Timeline vs. vision gap
Our true goal is a browser extension working across all social media platforms in real time. Building that properly — with content scripts, DOM analysis, and cross-platform compatibility — requires more time and resources than a hackathon allows. We made the deliberate decision to build a solid, working web app prototype first, proving the AI pipeline works, so that the extension has a reliable foundation to be built on.
Accomplishments that we're proud of
A fully working AI pipeline with three-tier fallback — the system never crashes, regardless of available resources A real Trust Score computed from four independent signals, not a single model guess Urdu language support — directly relevant to Pakistani users and largely absent from existing misinformation tools Live Google Fact Check API integration with graceful local fallback — real fact-checking, not just keyword matching ELA image forensics running entirely on CPU with no GPU required A user feedback loop baked into the UI — every verdict can be disputed, building toward community-driven accuracy improvement A clean, civic-portal UI designed to feel trustworthy — not a gimmick, but a tool citizens would actually use .
What we learned
Building TruthLens taught us that fighting misinformation is fundamentally a UX problem as much as an AI problem. The most accurate model in the world fails if users don't trust it or don't encounter it at the right moment. We learned to build for graceful degradation — systems that keep working even when components fail. We gained hands-on experience with NLP fine-tuning, image forensics, multilingual NLP pipelines, and API orchestration. Most importantly, we learned that transparency beats confidence — users respond better to an honest explanation of uncertainty than to a confident label with no reasoning.
What's next for TruthLens (an AI-powered verification application)
Our web app is the foundation. Here is our roadmap: Phase 2 — Browser Extension (primary goal)
A lightweight Chrome and Firefox extension that passively scans content as users browse social media (X, Facebook, Instagram, YouTube, WhatsApp Web) and overlays Trust Score indicators directly on posts and headlines — no extra steps required from the user. Phase 3 — Platform Expansion
Mobile application (Android-first for Pakistan market) Expanded multilingual support (NLLB-200 for broader language coverage) Community fact-checking boards with user trust reputation scores
Try it out
Built With
- bash-scripting-(run.sh)
- css
- css-(clean-minimal-ui)-javascript-(interactive-dashboard-for-analysis
- distilbert
- fastapi-style
- html
- hugging-face-transformers
- javascript
- python
- scikit-learn
- scoring
- server
- sqlite
- transformer

Log in or sign up for Devpost to join the conversation.