Inspiration

In India, scams like "digital arrest" calls, fake KYC messages and OTP theft work because they create panic. Victims are told to act within minutes, to stay on the call and to tell no one, so there is no time to check. Most people have no quick, trustworthy way to ask "is this real?" before they pay or share a code, and no clear guide for what to do if they already have.

Scam Lens is built for that moment. The intended user is an ordinary person, such as a parent or a student, with no cybersecurity knowledge.

What it does

Scam Lens lets someone check suspicious content before acting:

  • Text: paste an SMS, WhatsApp message or email in English, Hindi or Hinglish.
  • Screenshot: upload an image. The text is extracted, and the user reviews it before analysis.
  • Voice: record or upload a call. It is transcribed, and the user reviews the transcript before analysis.
  • Link: a structural URL check, plus a brand-lookalike check for fake bank, payment and government addresses.

The result is not just a label. It gives a risk level, the likely scam category, the exact phrases quoted from the message, the manipulation tactics in order, and safe next steps.

Rescue Mode is for people who may have already acted. The user ticks what happened (money sent, code shared, suspicious app installed, digital-arrest threat) and gets one checklist in order of urgency, including the 1930 cyber fraud helpline and 112 for immediate danger. It uses no AI, so the advice is fixed and reviewable. Steps based on official guidance show their source (I4C/NCTAU, RBI, CERT-In, PIB), and the rest is labelled general safety advice. An incident summary can be prepared and copied entirely in the browser.

Why it fits Frankenstein

Scam Lens stitches a probabilistic LLM to deterministic code that checks it. The model proposes evidence, and plain code decides what the user sees: every quoted phrase must be an exact substring of the original message or it is dropped, and a "Highly Dangerous" verdict with no verifiable evidence is downgraded. File uploads are verified by their real signatures. Link inspection and Rescue Mode are fully AI-free. The result is a system that can't be talked into inventing evidence.

How we built it

  • Stack: Node.js 22 and Express 5, vanilla HTML, CSS and JavaScript. AI through Groq-hosted models (text analysis and screenshot OCR) and Whisper (speech).
  • Privacy: no accounts and no server-side database. Saved reports stay in the user's browser, only when they choose to save. Rescue Mode never sends anything to a server.
  • Security: a Content Security Policy with per-request nonces, AI and user content shown only as text (never as HTML), per-route rate limits, and delimiter neutralisation against prompt injection.
  • Tests: 155 automated tests at last run (98 server, 17 Rescue Mode, 27 accessibility, 5 property-based with a fixed seed, 8 secret-scanner). They run offline with no API key.

How Kiro shaped the project

  • Specs: four spec-driven work packages, each with requirements, design and tasks: stability and security, the brand-lookalike link check, an accessibility pass, and hardening with evidence. The specs are in .kiro/specs/.
  • Steering: five steering files hold the product rules, tech stack, project structure, security and privacy rules, and accessibility rules (the last applies only to files under public/).
  • Hooks: a hook runs the test suite after saves, and a second one scans for secrets. We watched both fire during real sessions.
  • Where Kiro surprised us:
    • While adding the lookalike check, Kiro noticed one of my instructions contradicted an existing test. It changed only that one test address, recorded the exception in the spec and told me.
    • The accessibility spec began with an audit table and found problems I hadn't asked about: the footer inside main, a skipped heading level, and focus outlines that were too faint.
    • It computed real colour-contrast ratios from the CSS and changed only the colours that failed.
    • When a file changed unexpectedly during a session, it stopped and asked instead of overwriting it.
    • It found two mistakes in its own new tests on a full run and fixed them.
  • Built outside Kiro: we used ChatGPT and Claude for review, test and benchmark design, prompt drafting and documentation. Some edits were manual. All code and content was reviewed and run by the author.

Challenges

  • Stopping the AI from inventing evidence. Quote verification fixed this, and we had to decide what to show when evidence fails: downgrade, don't guess.
  • Avoiding false reassurance. "Safe" became "low risk, no obvious indicators", and every result says it isn't proof.
  • Rescue Mode ordering. An early version ordered steps differently per combination, so someone who had paid and installed a remote-access app could be told to report before disconnecting. We replaced it with one urgency order, tested across every combination of situations in every selection order.
  • A false alarm on real banks. Banks in India now use restricted .bank.in addresses, so a naive lookalike rule would flag genuine sites. We added an explicit exemption and tests.
  • Honest accessibility. We improved focus, labels, announcements and contrast, and we claim no compliance because a formal audit hasn't happened.

What we learned

Explaining why something is risky matters more than the label. A deterministic, human-reviewed layer is the right tool where wrong advice could cost someone money. And a spec-first workflow with tests and hooks catches things you did not ask about, which is why the guardrails matter as much as the model.

Honest limitations

  • AI analysis is probabilistic. Results are decision support, not proof of a scam or of safety.
  • Link inspection reads the URL structure only. It does not visit the site or query a reputation database, so a link with no warnings can still be malicious.
  • Voice analysis transcribes speech. It can't detect cloned voices or verify who is calling.
  • Our benchmark is small and synthetic, and we make no accuracy claim.
  • The official-domain list for the lookalike check is short and needs ongoing maintenance.
  • The free host may take up to a minute to wake after idle.
  • Scam Lens is not a replacement for emergency services, a bank or the police.

Responsible demonstration

All demo messages, screenshots and audio are synthetic. Phone numbers are masked, and links are made up. No real victim data was used.

Timeline and credits

Development began on 10 November 2026, inside the submission period, as a new project. The only pre-existing parts are third-party libraries: Express, the OpenAI SDK, dotenv and fast-check (dev only). Runtime services are Groq-hosted models and Whisper.

What's next

A larger, independently labelled benchmark in English, Hindi and Hinglish, an opt-in live URL reputation check with a privacy review, and a manual screen-reader audit.

Live demo: https://scam-lens-d41l.onrender.com Source code: https://github.com/Lakshya250506/Scam-Lens

Built With

Share this project:

Updates

Submission history