Inspiration

Problem Statement

Scam messages, phishing attempts, and misinformation are getting harder to spot, AI-generated text makes them more convincing, and they spread through channels such as SMS, WhatsApp, TikTok etc, most people check them with no quick way to verify what they're looking at. It's not just messages, things like fake ads and cloned websites (a "too good to be true" deal, a fake delivery-tracking page, a lookalike bank login) are also a common scam that is as hard to tell apart from the real thing, especially to people who are not well conversant with techology in the age of AI.

Earlier this year, a scam calling itself Hut 8, also circulating under names like Hut8digital and "Future AI Hub" spread across my country Uganda through TikTok and WhatsApp, promising high returns for "investing" in rented AI equipment. It borrowed the identity of Hut 8 Corp, a real, publicly traded North American company with no operations or investment partners in Uganda at all. Hut 8 Corp had to issue a public warning distancing itself, after reports that hundreds to thousands of Ugandans lost significant money to the false company. It's not the only case, Uganda's police have separately arrested cyber fraud gangs running fake TikTok and WhatsApp accounts impersonating well-known public figures to get money from people seeking financial help. Globally, Statistics show that online fraud causes over $1 trillion in annual losses, with one in four adults worldwide losing money to scams per year.

Existing tools don't help much with any of this. Spam filters silently block or flag messages without explaining why, so users never learn to spot the next one, they just learn to distrust or ignore. Most fraud-awareness content is static ("10 signs of a scam") rather than something people can check their actual message, ad, or website against, in the moment, before money is transferred.

What it does

Solution

TruthLens pairs a trained ML classifier with a reasoning layer that doesn't just output "scam" or "safe", it explains its reasoning in plain language, so the output decision is something a user learns from, not just obeys. It's built to be resilient by design: if the reasoning layer is ever unavailable, TruthLens still returns a full verdict from the Machine Learning classifier alone, so the tool stays usable under real-world conditions rather than showing an ERROR. A companion Fraud Watch hub turns individual checks into ongoing awareness, Upcoming or current common scam patterns so users build intuition over time instead of relying on the tool forever.

Key Features

Analyzer; Here a user pastes a suspicious text, or upload a screenshot of a message, ad, or website, and get back a verdict card: classification, confidence, and a plain-language explanation of what triggered it Fraud Watch hub; a browsable set of common scam and misinformation patterns or schemes for ongoing awareness, beyond any single check Graceful degradation; automatic fallback to classifier-only results if the reasoning layer is unavailable due to system problems in gemini where my API is from that are out of my control, so the app never shows a broken error High accuracy classification; TF-IDF + Logistic Regression trained on a phishing-message dataset, 97.9% validation accuracy

How I built it

Technologies Used

Frontend: React, Tailwind CSS, deployed on Vercel Backend: FastAPI, deployed on Render free tier Machine learning: scikit-learn (TF-IDF + Logistic Regression) Reasoning layer: Gemini API

Target Users

Anyone who uses a smart phone or computer or tablet, basically digital communication tools since they are the same people prone to recieving scam or phishing attempts via SMS, WhatsApp, or TikTok DMs, or comes across suspicious investment ads and cloned websites.

People newer to online investing and mobile money, in markets like Uganda where impersonation scams (e.g. Hut 8)have caused widespread losses.

Communities and individuals wanting an ongoing awareness resource, via Fraud Watch, rather than a one-off check

Challenges I ran into

I ran into Challenges Integrating a fast-moving external API that turned into its own lesson in troubleshooting and being resilient. I got stack at Gemini-sided API issues with the model returning 404s, 503 "high demand" errors, and eventually empty responses. Which i realized was an error from the service providers and not my code. Each fix taught me to treat every external dependency as something that will fail eventually, and to design so failure is handled carefully instead of breaking the entire system.

Accomplishments that I am proud of

Troubleshooting and figuring out the Gemini API issue, A classifier hitting 97.9% validation accuracy A reasoning layer that explains why, not just what Building this solo, alone, under real time pressure, and still shipping a system that stays usable even when a third-party API doesn't work as it is supposed to.

What I learned

Building TruthLens end-to-end taught me a lot about API resilience, that i should be designing from the assumption that an external dependency will fail, so i should always be building with a plan B incase plan A fails, instead of a single point of failure. Working through the phishing dataset also gave me a much closer look at the actual language patterns scammers use, beyond just knowing scams exist.

The bigger lesson was in taking knowledge beyond the classroom. I went through the program's course material first, then had to figure out, on how to turn that knowlegde gained into a real, working, deployed product, which is a very different skill from following a syllabus. learning, building, and shipping a full hackathon project alone helped me to sharpen both my problem-solving and my ability to apply what I'd learned rather than just knowing it.

What's next for TruthLens

The next step is turning TruthLens into a mobile app, for easy accesibility. I also want to add support for more languages, and keep expanding the training data both with more scam categories and with fresh, current examples patterns, so the classifier keeps up to date with ongoing scams and with how scams actually evolve.

Built With

Share this project:

Updates

Submission history