-
-
Either copy paste your scam message or upload your pdf or screenshot. For demonstration you can try out the demo examples given there
-
It will showcase the risk(High or Low) and which type of scam
-
will tell which words flagged it (you can share this and also can hear it)
-
Tells us about the necessary steps to take
Inspiration
Scam notices that impersonate law enforcement, tax authorities, and judiciary bodies—such as bogus digital arrest warrants, electricity disconnection threats, and fake departmental summons—rely on manufactured urgency and intimidation. They are engineered to force panic before a victim can pause or ask for advice.
We built RedFlagged to reclaim that critical window of time. Instead of relying on a freeform chatbot that might hallucinate legal interpretations, RedFlagged provides a fast, grounded verification workflow: paste raw text, drop a screenshot, or upload a notice PDF to immediately see why an alert is suspicious, backed by transparent evidence, before any money or data is compromised.
What it does
RedFlagged transforms suspicious notices into structured, actionable risk breakdowns:
Multimodal Text Ingestion: Extracts text from noisy mobile screenshots, skewed scans, and PDFs using Gemini Flash Vision and pypdf, backed by an editable text preview so users can review the transcript before analysis. Deterministic Link & Heuristic Engine: Algorithmically evaluates URLs for subdomain brand traps, typosquatting (Levenshtein distance), high-abuse TLDs, raw IP hosts, and anonymizing shorteners without external server-side binaries. Calibrated Saturation Scoring: Aggregates heuristic rule weights through an exponential saturation curve , preventing score inflation while keeping numeric scores and risk classifications logically aligned. Grounded Institutional Explanations: Cross-references message attributes against verified institutional communication protocols (e.g., how courts actually serve notices, why police never conduct digital arrests over video calls). Actionable Safety Guidance: Generates official verification routes (such as e-Courts and cybercrime reporting portals) rather than issuing a binary "real/fake" verdict. Practical Sharing & Accessibility: Features one-click formatted warning exports for family members on messaging apps and browser-native speech synthesis for read-aloud support.
How we built it
Frontend: React, Vite, and Tailwind CSS with Lucide icons, hosted on Vercel. Backend: Python 3.11 with FastAPI and Uvicorn, hosted on Render. Vision & Document Parsing: Google Gemini Flash Vision API for resilient image transcription, paired with pypdf for native PDF parsing. Heuristic Engine (rules.py): Pure-Python algorithmic engine executing pattern scans for coercion, unverified payment handles (UPI/GPay/PhonePe), and deceptive link layouts. Institutional Knowledge Base (knowledge.py): Curated repository detailing legitimate departmental procedures and authorized dispute channels. Reasoning Layer: Google Gemini API configured with strict JSON response schemas (google-genai), providing predictable JSON structures for frontend rendering. AI Tooling Disclosure: AI coding assistants (Claude / ChatGPT / Cursor) were used for boilerplate generation, regex optimization, and deployment debugging.
Challenges we ran into
Silent Deployment Crashes Masked as CORS Errors: A missing system-level binary (tesseract-ocr) on our container runtime caused internal unhandled crashes during image uploads. Because the backend terminated abruptly, no response headers were sent, prompting the browser to report false net::ERR_FAILED / CORS errors. We resolved this by migrating image transcription to Gemini Flash Vision, eliminating native OS dependencies and improving OCR accuracy on low-light or skewed mobile screenshots. CORS Across Ephemeral Environments: Vercel assigns unique hashes to preview deployments. We fixed origin rejection by binding CORS middleware explicitly to our canonical production domain with regex fallbacks for staging previews. Heuristic & AI Alignment via Mathematical Saturation: Linear summation of rule weights previously caused scores to spike erratically relative to the AI's contextual reading. Implementing a saturating exponential curve smoothly compressed compound flags into a stable 0–100 scale. Eliminating False Positives in Benign Messages: Early keyword matching tripped on statements like "there is no urgent deadline." We added negation-aware proximity parsing and structured constraints preventing the model from assuming reputable domains were fraudulent without independent indicators.
Accomplishments that we're proud of
A True Hybrid Verification Pipeline: Deterministic heuristics and curated protocols handle objective validation, allowing the LLM to focus strictly on semantic context and accessible explanations. Resilient Multimodal Parsing: Reliable extraction from text, mobile screenshots, and multi-page PDFs that degrades gracefully with full user editing access. Safety-First Framing: The app deliberately guides users toward institutional channels rather than presenting itself as an automated legal authority. Generalization Beyond Presets: Successfully flags and classifies real-world scam patterns outside pre-configured UI examples without hallucinating false correlations.
What we learned
Structuring reliable AI applications often depends on what you delegate to deterministic code—grounding verification in rule sets drastically reduces hallucination risks. Native JSON schema enforcement is vastly superior to prompting models to "respond only with valid JSON." Graceful degradation in multi-cloud hosting (Vercel + Render) requires explicit exception mapping to preserve informative HTTP status codes.
What's next for RedFlagged
Native multilingual output (Hindi, Gujarati, and Tamil) for regional accessibility. Interactive counterfactual score previews allowing users to test how individual flags affect the risk rating. An expanded institutional directory covering utilities, logistics, and employment screening. Community-driven reporting pipelines to benchmark newly observed social engineering scripts.
Log in or sign up for Devpost to join the conversation.