PROJECT 08 • DAY 18 OF 90 • NLP & THREAT FORENSICS

TEXTVIGIL
SMS SAFETY AI.

A privacy-first mobile safety assistant and NLP threat scanner running inside a realistic iPhone 18 Pro frame — pairing dual-model TF-IDF classification with screenshot OCR, UPI/QR payment forensics, Indian TRAI DLT sender verification, and direct Sanchar Saathi government reporting.

React 19TypeScriptFastAPITesseract OCRScikit-Learn30/30 Pytest
TextVigil Preview
THREAT INTENTS
10 Scam Detectors
PYTEST & TS
30/30 Passed (89%)
8 Categories
Targeted Threat Tiers
Zero-Network
UPI & QR Payment Forensics
1-Tap Report
Sanchar Saathi & 1930
30 / 30
Automated Pytest Passed
01 / Overview

ACTIONABLE THREAT VERIFICATION BEFORE USERS TAP OR PAY.

Generic spam filters output a bare spam label without explaining why a message is risky or which phrase is deceptive. TextVigil exposes exact token weights, de-obfuscates raw links, decodes TRAI headers, and protects against outgoing UPI fraud.

01

iPhone 18 Pro Mobile Preview

Figma-style iPhone 18 Pro titanium hardware frame (390×844) with seamless desktop full-screen toggle and zero-clutter mobile responsiveness.

02

Three-Mode Message Scanner

Supports clipboard text paste (2,000 char max), local OpenCV + Tesseract v5 screenshot OCR with editable confirmation, and 1,000-row batch CSV scanning.

03

8-Category Threat Classification

Logistic Regression + Naive Bayes over scam-aware TF-IDF unigram/bigrams categorizing Financial Scam, Phishing, Fake Reward, Impersonation, and Credential Theft.

04

UPI / QR Payment Forensics

Local OpenCV QRCodeDetector + deep-link parser decodes payee VPA and amount, warning users that QR scans initiate outgoing debits, never deposits.

05

TRAI DLT Sender & Unicode Audit

Decodes Indian DLT telemarketer headers, flags 10-digit mobile impersonations, and detects zero-width evasion characters and Cyrillic/Greek homoglyph domain spoofs.

06

Sanchar Saathi & Golden-Hour Triage

One-tap clipboard copy formatted for Sanchar Saathi (Chakshu) and cybercrime.gov.in plus 1930 recovery checklists and defanged 'Warn Family' summaries.

02 / Architecture

HOW IT WORKS.

Pasted text or screenshot OCR feeds into rule-based context guards, TF-IDF Scikit-Learn models, URL/homoglyph analyzers, and QR payment inspectors over local FastAPI.

STAGE 01

Capture

Paste, screenshot OCR, or CSV batch.

→
STAGE 02

Sanitize & NLP

Unicode de-spoof & TF-IDF vectorization.

→
STAGE 03

Rule Guard

10 India scam detectors & DLT headers.

→
STAGE 04

QR / URL Audit

Decode UPI VPA & defang phishing links.

→
STAGE 05

Report & Triage

Sanchar Saathi draft & 1930 action.

03 / Screenshots

APPLICATION SCREENSHOTS.

Live screens captured from the running application. Click any image to view full size, or follow setup instructions in the GitHub repository.

04 / Technical Details

DETECTION CAPABILITIES & FORENSIC SAFETY RULES.

Key modules, rules, safety checks, and automated test results documented in the repository.

Forensic Module Engine / Methodology Safety Output
Scam Classification Logistic Regression + Multinomial NB over TF-IDF 8 calibrated threat tiers + token attribution
Payment Forensics OpenCV cv2.QRCodeDetector + upi://pay parser Exposes payee VPA before money transfer
Sender Verification TRAI DLT entity lookup + 10-digit mobile filter Catches fake bank and DISCOM SMS headers
Automated Tests pytest suite covering OCR, rules & NLP 30 / 30 Passed (89% code coverage)
05 / Tech Stack

CORE TECHNOLOGIES.

Frameworks, databases, visualization tools, and testing libraries used in TextVigil.

FRONTEND UI
React 19 • TypeScript • Tailwind CSS
BACKEND API
FastAPI • Pydantic v2 • Uvicorn
MACHINE LEARNING
Scikit-Learn (TF-IDF, LogReg, Naive Bayes)
VISION & OCR
OpenCV • Tesseract v5
STORAGE & SAFETY
SQLite3 • Formula-Safe CSV
VERIFICATION
30/30 Pytest Passed (89% Coverage)
06 / Next Steps

FUTURE ENHANCEMENTS.

Upcoming improvements planned for TextVigil.

Offline ONNX mobile neural embedding model for zero-server mobile runtime.
Multi-lingual Indic BERT support for Tamil, Hindi, and Telugu SMS text.
Android Accessibility Service integration for real-time incoming SMS overlays.
Crowdsourced hash-based scam campaign database synchronization.
Automatic detection of APK dropper links inside WhatsApp forwarded messages.
Interactive voice-scam call simulator for senior citizen cyber-defense training.
OPEN-SOURCE PROJECT • GITHUB.COM/RAGURAMRRP

EXPLORE SOURCE & DOCS.

View the complete codebase, sample datasets, quick-launch scripts, and automated test suites on GitHub.