A Complete Strategic & Technical Engineering Specification for TrustScan AI.
┌─────────────────────────────────────────┐
│ THE INDIAN FRAUD EPIDEMIC │
│ 1. Fake Internship & Job Offer Letters │
│ 2. Forged Aadhaar / PAN Identity Cards │
│ 3. Fake UPI Transaction Screenshots │
│ 4. Unregistered MCA Shell Companies │
└────────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ TRUSTSCAN AI │
│ Multi-Modal Verification Engine │
└────────────────────┬────────────────────┘
│
┌──────────────────┬──────────────────┴──────────────────┬──────────────────┐
▼ ▼ ▼ ▼
┌──────────────────┐┌──────────────────┐ ┌──────────────────┐┌──────────────────┐
│ 🏢 COMPANY & CIN ││ 🏛️ GOVT ID AUDIT │ │ 💼 CAREER DOCS ││ 💳 UPI & BANKING │
│ MCA Master Data, ││ Aadhaar Verhoeff,│ │ CTC Math Check, ││ 12-Digit UTR, │
│ GSTIN State Map ││ PAN Entity Type │ │ HR Domain Check ││ Fake APK Splicing│
└──────────────────┘└──────────────────┘ └──────────────────┘└──────────────────┘
India faces a digital forgery and financial fraud epidemic:
- Fake Job & Internship Scams: Unregistered shell agencies send forged offer letters demanding "training fees" or "laptop security deposits".
- Identity Forgery: Altered Aadhaar cards and PAN cards used for unauthorized SIM cards, loan scams, and KYC fraud.
- Fake UPI Payment Generators: Android APKs that generate pixel-perfect fake Google Pay, PhonePe, and Paytm success screens to dupe merchants.
- Corporate Impersonation: Legitimate brand names misused by unregistered entities without MCA (Ministry of Corporate Affairs) or GSTIN registrations.
Analysis of 19,339 live scans from real users on trustscanai.in:
- 💬 Text / WhatsApp Messages: 11,790 scans (61.0%)
- 💳 Payment & Bank Receipts: 7,261 scans (37.5%) — Massive organic merchant demand!
- 📄 Offer Letters & Documents: 154 scans (0.8%)
- 📧 Emails & URLs: 129 scans (0.7%)
- 🏢 Company Verification: 5 scans (0.0%)
Instead of a generic scanner, TrustScan provides 4 dedicated verification gateways:
- 🏢 Company & CIN Verification: Real-time MCA registry lookup & GSTIN verification.
- 🏛️ Government ID Verifier: Cryptographic checksum audit for Aadhaar (Verhoeff
$D_5$ ) and PAN syntax. - 💼 Offer Letters & Credentials: CTC arithmetic balance, recruiter domain audit, and tampering traces.
- 💳 UPI & Payment Receipts: 12-digit UTR validation, IFSC branch resolver, and fake APK font analysis.
- Zero PII Retention: Aadhaar, PAN, and banking documents are processed strictly in-memory and wiped immediately after inference.
- UIDAI Compliance: All displayed Aadhaar references are masked (
XXXX XXXX 1234).
flowchart TD
A[User Document Upload: PDF / Image / Text] --> B[Stage 1: Ingestion & Adaptive PyMuPDF Preprocessing]
B --> C[Stage 2: 23-Language Indic OCR via Sarvam Vision 3B]
C --> D[Stage 3: Deterministic Mathematical Rules & Checksums]
B --> E[Stage 3.5: OpenCV / PIL Deep Image Forensics - ELA & Noise]
C --> F[Stage 4: 11-Feature Document ML Classifier]
D --> G[Stage 5: Risk-Tiered LLM Reasoning - Sarvam 30B / 105B]
E --> G
F --> G
G --> H[Stage 6: Score Fusion & Deterministic Override]
H --> I[Stage 6.5: Authenticated Ground-Truth Verification Bridge]
I --> J[Stage 7: Domain-Specific Interactive Result Dashboards]
- File:
server/services/processing/documentPipeline.js - Ingests PDFs, PNGs, and JPEGs.
- Converts multi-page PDFs to high-resolution raster images at 2.0x scale via
PyMuPDF (fitz)for crisp character edge detection.
- File:
server/services/analysis/sarvamService.js - Uses Sarvam Vision (3B parameter VLM) fine-tuned on 23 Indian languages.
- Extracts structured Markdown tables, Devanagari Hindi, Tamil, Telugu, and English text with document hierarchy.
Before calling any AI models, deterministic mathematical rules validate the document:
-
Aadhaar Verhoeff Checksum: Uses the Dihedral Group
$D_5$ non-commutative multiplication ($d$ ) and permutation ($p$ ) tables:$$c = \sum_{i=0}^{n-1} p(i \bmod 8, d_i) = 0$$ Catches any single-digit replacement or adjacent transposition. -
PAN 10-Character Structural Syntax:
- Characters 1–3: Alphabetic series (
AAAtoZZZ) -
Character 4 (Entity Type):
P(Individual),C(Company),H(HUF),F(Firm),A(AOP),T(Trust) - Character 5: First letter of Holder's Last Name
- Characters 6–9: Sequential 4-digit number (
0001to9999) - Character 10: Alphabetic check digit
- Characters 1–3: Alphabetic series (
-
GSTIN 15-Digit Tax Code:
- Characters 1–2: State Code (
27= Maharashtra,07= Delhi,29= Karnataka) - Characters 3–12: 10-digit PAN of the entity
- Character 13: Entity number of the same PAN holder
- Character 14: Default
Z - Character 15: Modulo 36 checksum character
- Characters 1–2: State Code (
-
MCA 21-Digit CIN Structure: $$\underbrace{\text{L}}{\text{Listing Status}} \underbrace{\text{72200}}{\text{Industry Code}} \underbrace{\text{MH}}{\text{State}} \underbrace{\text{2020}}{\text{Year}} \underbrace{\text{PTC}}{\text{Class}} \underbrace{\text{123456}}{\text{Registration}}$$
-
CTC & Salary Arithmetic Balance:
$$\text{Gross Salary} = \text{Basic} + \text{HRA} + \text{Special Allowances} - \text{Deductions (PF + PT)}$$
-
File:
server/scripts/image_forensics.py+imageForensicsService.js -
Error Level Analysis (ELA): Recompresses the image at 90% JPEG quality and calculates the absolute difference:
$$\Delta_{\text{ELA}} = |I_{\text{original}} - I_{\text{recompressed}}| \times 10$$ Tampered numbers or spliced text exhibit significantly higher compression error variance. -
Noise Inconsistency: Computes local Laplacian variance across
$32 \times 32$ patches. - EXIF Metadata Signature Scan: Scans file streams for software tampering signatures (Photoshop, Canva, GIMP, Acrobat).
- File:
server/scripts/train_document_rules.py - Trained Logistic Regression model evaluating 11 document signals:
[hasCin, hasGst, mathBalanceValid, officialDomain, softwareSignatures, highUrgencyVelocity, registrationFee, genericTemplate, tamperScore, validPan, verhoeffValid] - Achieves 100% fraud recall on adversarial benchmark datasets.
-
File:
server/services/analysis/sarvamService.js - Dynamic inference routing:
- 🟢 Low Risk (
$p < 0.3$ )$\rightarrow$ sarvam-30b(Fast, cost-effective structured entity extraction). - 🔴 High Risk (
$p \ge 0.3$ or Checksum Failure)$\rightarrow$ sarvam-105b(Deep multi-step forensic reasoning).
- 🟢 Low Risk (
- File:
server/services/verification/verificationBridge.js - Connects to ground-truth public databases:
- MCA API: Official Ministry of Corporate Affairs Master Data.
- GST Portal: Active taxpayer status.
- Razorpay IFSC API: Resolves Bank Name, Branch, City, and State.
- Files:
GovIdVerificationCard.tsx— Aadhaar/PAN Checksum, Roboflow Landmarks & ELA Card.PaymentReceiptCard.tsx— UPI UTR Ref & Fake APK Splicing Card.CareerDocumentCard.tsx— CTC Math & MCA Registration Card.BusinessVerificationCard.tsx— MCA 21-digit CIN & GSTIN Registry Card.
| Database | Technology | Purpose |
|---|---|---|
| Document Store | MongoDB Atlas | Stores unstructured scan payloads, multi-lingual OCR extractions, and ELA forensic heatmaps. |
| Relational Data | PostgreSQL | User accounts, authentication, scan audit history, and billing records. |
- ⚡ Processing Latency: Reduced from 90 seconds down to <15 seconds (85% optimization via asynchronous Python worker pool).
- 🌐 Google Search Console Ranking: Average Position #5.1 on Page 1 of Google (
8,260+impressions,617organic clicks,7.5%CTR). - 📦 Next.js Production Build: Clean Turbopack builds across 25 static & dynamic routes in
~1.2s.
© 2026 TrustScan AI. All Rights Reserved. Engineered with ❤️ by Shubham Dubey.