Inspiration
Across Bangladesh and South Asia, parents, grandparents, and first-time mobile-money users are frequent targets of social-engineering phone scams—callers pretending to be support agents, threatening account closure, or rushing victims into reading out a PIN or OTP. Awareness posters are easy to forget when someone is shouting "10 minutes left!" on a real call. We wanted a calm, bilingual (Bangla and English) rehearsal space—THAMUN (থামুন, "Stop")—where families can practise pressure calls safely before a real scammer calls.
What it does
- Safe Call Rehearsal (
/practice/takapay-support): Users answer a simulated incoming call from TakaPay (a 100% fictional wallet—no real brands or numbers) under a persistentPRACTICEbanner. - Instant Coaching & Debrief: Each reply is classified (
safe,risky, orcompromised), the manipulation tactic is named (urgency, otp_harvest, secrecy), and the call ends with a clear debrief and one concrete next step. - Pause & Check (
/pause): For someone on a suspicious call right now, a 3-question check (Are they rushing you? Asking for a code or PIN? Asking for secrecy?) pairs with a local-only trusted-contacttel:button. - THAMUN Helper Chatbot: A bilingual (
EN/বাংলা/ Banglish) assistant answers questions about scam tactics, how practice works, and privacy. - Zero-Transcript Privacy: Client-side and server-side guards block anything resembling a PIN, OTP, phone number (including Bangla digits
০–৯), or card number before submission, and transcripts are never stored.
How we built it
- Frontend: Next.js 15 (App Router), TypeScript, Tailwind CSS, and Framer Motion, styled in a high-contrast civic-poster palette (
#F4EFE6paper,#17201Dink,#0F5C4Agreen,#E4492Fvermilion,#F2B134marigold) withFrauncesandHind Siliguri,48px+ touch targets,prefers-reduced-motionsupport, dark mode, print stylesheet, and full legal/SEO pages (/privacy,/terms,/cookies,sitemap.xml,robots.txt,llms.txt). - Backend: FastAPI, Pydantic, and SQLite (WAL mode) with per-IP rate limiting, strict CORS allowlist, a fixed reviewed JSON script tree (
scripts.json), a deterministic bilingualRuleClassifier, and a curated safety-KB chatbot (POST /api/chat). - Safety by Design: Caller lines come strictly from a reviewed script tree—never generated dynamically—and
inputGuard.ts+contains_sensitive_patternenforce defense-in-depth blocking of sensitive numbers.
Challenges we ran into
- Bangla + English + Banglish matching: Users mix Bangla script (
কেন বন্ধ হবে?), English, and romanized Banglish (ekhon call kore otp cacche) in the same conversation, requiring careful normalization (including Bangla numerals০–৯) and pattern ordering so 13-digit+8801...phone numbers aren't misclassified as card numbers. - Designing for low-stress readability: Avoiding generic dark-glass UI patterns while keeping
18px+ body text, WCAG AA contrast in both light and dark modes, and an always-visible End call button on small mobile screens.
Accomplishments that we're proud of
- End-to-end vertical slice live: Deployed the frontend to Vercel (
frontend-teal-nine-uu9z7wkv98.vercel.app) and pushed the full codebase to GitHub (Safin313-REBORN/Thamun). - Verified safety & test coverage: 29 backend
pytesttests (API, sensitive-pattern blocking, rule classifier, and 15 bilingual chatbot intent/injection tests) and 5 frontendvitesttests passing, with zero transcript persistence.
What we learned
- A small, deterministic, well-tested safety core beats an over-scoped AI prototype—especially when designing for elderly and first-time mobile-money users.
- Separating the fixed scam script tree from reply classification keeps the experience predictable and safe while still giving personalized coaching.
What's next for THAMUN
- Gemini AI Classifier + Fallback: Add the Gemini provider behind our
ClassifierProviderinterface with strict Pydantic JSON + state-transition validation, automatic fallback toRuleClassifier, and a 60-item EN/BN/Banglish accuracy benchmark. - All 4 Scenarios & Offline PWA: Add the remaining TakaPay scenarios (prize call, "money sent by mistake", job offer fee), browser speech input, and offline service-worker caching for
/pause. - Public Backend Deployment & Android Testing: Host the FastAPI backend publicly, connect
NEXT_PUBLIC_API_BASE_URLon Vercel, and verify end-to-end on low-cost Android devices.
