A lightweight, multilingual scam detection bot for Telegram. Built for India, powered by AI.
Users can forward suspicious texts or screenshots, and get a verdict (“Scam,” “Maybe,” or “Safe”) with reasons and advice in their own language.
- ✅ Rule-based heuristics detect UPI IDs, urgent phrases, scam links, and more.
- 🤖 Gemini LLM analyzes the tone, language, and subtle cues across Indian languages.
- 🗣️ Final output is translated into the user’s preferred language.
Built for the AI in Action Hackathon (GitLab x Google Cloud). This repo is the GitHub mirror for ongoing development.
- 🗣️ Supports 9+ Indian languages: Hindi, Bengali, Tamil, Telugu, Urdu, Kannada, Malayalam, Marathi, Gujarati, English
- 🧩 Handles screenshots using Google OCR
- ☁️ Runs on Google Cloud Functions (fully serverless)
- 📦 Modular codebase using TypeScript and pnpm
- 🔁 GitLab CI/CD pipelines
- 📲 Try the Telegram Bot
apps/functions/ → Cloud Functions: fraud-analysis, telegram, whatsapp
lib/ → Shared modules (LLM, Firestore, logging)
types/ → TypeScript types and enums
.gitlab/ci/ → CI/CD pipeline definitions
- You send a message or screenshot to the bot
- It runs heuristics to find obvious scam indicators
- Then it calls Gemini LLM with examples + context
- The system blends both scores for a final verdict
- Response is localized with reasoning + suggestion
git clone https://github.com/your-org/indiclang-fraud-shield.git
cd indiclang-fraud-shield
pnpm installTo build the project:
pnpm -r run buildTo run locally (all functions):
pnpm run startLinting and formatting:
pnpm lint
pnpm formatpnpm --filter fraud-analysis run build
gcloud functions deploy fraudAnalysis \
--gen2 \
--entry-point=defaultHandler \
--runtime=nodejs20 \
--trigger-http \
--source=apps/functions/fraud-analysis/dist \
--allow-unauthenticated
--set-env-vars {ENVS}Full CI pipeline configs in
.gitlab/ci/*.yml
- Uses
.envor Secret Manager for credentials, tokens, etc. - See
.gitignorefor excluded sensitive files
🔧 Devs Welcome: Fork, clone, or raise issues. Contributions and feedback are appreciated!