Your first line of defense against digital scams.
Kavach is an AI-powered cybersecurity and anti-fraud platform designed to help users identify suspicious URLs, UPI IDs, and scam messages before they click, pay, or respond.
It combines Google Gemini AI, Firebase Authentication, Firestore, and real-time geospatial data to provide instant threat analysis, community-driven scam reporting, live scam visualization, and emergency assistance.
Digital scams such as phishing links, fraudulent UPI IDs, fake payment requests, and scam messages affect users every day.
Kavach provides a simple workflow:
Suspicious Link / UPI ID / Message
↓
Kavach Analysis
↓
Gemini AI Analysis
↓
Risk & Safety Verdict
↓
Take the appropriate action
Instead of requiring users to understand technical security indicators, Kavach presents the analysis in a simple, user-friendly format.
Analyze potentially suspicious:
- URLs
- UPI IDs
- Scam messages
Google Gemini AI evaluates the submitted information and provides a risk-oriented safety analysis in plain language.
Kavach provides a community-driven geographical view of reported scam incidents across Indian cities.
The heatmap uses:
- Firebase Firestore
onSnapshot()real-time listeners- React Leaflet
New reports can appear without requiring manual page refreshes or polling.
User Report
↓
Firestore
↓
onSnapshot()
↓
React Application
↓
Live Heatmap
Users can monitor their cybersecurity activity through a personalized dashboard containing:
- Scan history
- Recent threats
- Protection score
- Scam trends
- Report activity
The emergency module provides quick access to cybercrime assistance, including the 1930 cybercrime helpline.
Kavach can also generate an AI-assisted draft complaint that users can use as a starting point when reporting a cybercrime incident.
The generated content is an assistance tool and should be reviewed by the user before submission.
An AI-powered cybersecurity assistant helps users with questions related to:
- Online scams
- Phishing
- UPI fraud
- Account security
- Safe browsing
- Digital safety practices
Users can report suspicious incidents to help build a shared threat database.
Community reports contribute to the scam visualization system and help users understand potential threats occurring in different locations.
Kavach uses Firebase Authentication with Google OAuth.
User-specific data is protected using Firestore Security Rules, ensuring that authenticated users can only access the data they are authorized to access.
The application is designed for desktop and mobile experiences with:
- Dark / Light mode
- Responsive layouts
- Smooth animations
- Mobile-first UI
- Interactive components
Kavach follows a serverless client-driven architecture.
There is no custom Express/Node.js backend server. Firebase provides the backend infrastructure required for authentication, data storage, and real-time synchronization.
Kavach
│
React 19 + TypeScript
│
┌──────────────┼──────────────┐
│ │ │
▼ ▼ ▼
Gemini AI Firebase React Leaflet
│ │ │
│ ┌─────┴─────┐ │
│ │ │ │
│ Auth Firestore │
│ │ │ │
│ │ ┌────┴────┐ │
│ │ │ │ │
│ │ Scans Reports
│ │ │ │
│ │ └────┬────┘
│ │ │
│ │ onSnapshot()
│ │ │
└────────┴───────────┴──────► React UI
Kavach relies on Firestore's real-time capabilities instead of maintaining a custom backend server.
For a real-time application where users frequently read and report incidents, Firestore's listeners allow the application to receive updates without implementing a separate polling or WebSocket infrastructure.
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 19 | User interface |
| Language | TypeScript | Type-safe development |
| Build Tool | Vite | Development and production builds |
| Styling | Tailwind CSS | Responsive UI |
| Animations | Framer Motion | UI animations |
| Smooth Scrolling | Lenis | Enhanced interactions |
| Authentication | Firebase Auth | Google OAuth |
| Database | Firebase Firestore | User data, scans & reports |
| AI | Google Gemini | Scam analysis & AI assistance |
| Maps | React Leaflet | Interactive scam heatmap |
| Charts | Recharts | Dashboard analytics |
| EmailJS | Emergency/report communication | |
| Hosting | Render | Static site deployment |
Security is a core part of Kavach's architecture.
Users authenticate through Firebase Authentication using Google OAuth.
Firestore rules restrict access to user-owned data and prevent unauthorized reads and writes.
Gemini credentials are configured through environment variables and application restrictions are used to reduce unauthorized usage.
Sensitive application data is not intentionally stored in plaintext in browser storage.
Security controls should always be configured according to the production environment and reviewed as the application evolves.
Kavach/
│
├── public/
│
├── src/
│ ├── components/
│ ├── pages/
│ ├── hooks/
│ ├── services/
│ ├── utils/
│ ├── firebase/
│ ├── types/
│ │
│ ├── App.tsx
│ ├── main.tsx
│ └── ...
│
├── .env.example
├── package.json
├── tsconfig.json
├── vite.config.ts
└── README.md
Project structure may evolve as new features are added.
User enters suspicious content
↓
React Interface
↓
Gemini AI Request
↓
Threat Analysis
↓
Risk / Safety Explanation
↓
Result displayed
↓
User decides next action
Kavach is designed to assist users in identifying potential threats. AI-generated results should not be treated as a guaranteed determination of whether a transaction or link is safe.
User identifies a scam
↓
Submit incident
↓
Firestore
↓
Real-time listener
↓
Community data
↓
Live Heatmap
This allows reported incidents to become visible to the application without requiring users to manually refresh the page.
Make sure you have:
- Node.js 18+
- npm
- Firebase project
- Google Gemini API access
git clone https://github.com/HarshMishra2803/Kavach.git
cd Kavach
npm installCreate your environment file:
cp .env.example .envConfigure the required environment variables.
Then start the development server:
npm run devThe application will be available at:
http://localhost:5173
Example configuration:
GEMINI_API_KEY=your_gemini_api_key
VITE_EMAILJS_SERVICE_ID=your_service_id
VITE_EMAILJS_TEMPLATE_ID=your_template_id
VITE_EMAILJS_PUBLIC_KEY=your_public_keyFirebase configuration should be configured according to the Firebase setup used by the application.
Never commit private API keys, secrets, or production credentials to GitHub.
Create an optimized production build:
npm run buildPreview the production build locally:
npm run previewKavach is deployed as a static web application on Render.
npm install && npm run builddist
For SPA routing, configure the appropriate rewrite:
/* → /index.html
- ✅ AI-powered URL analysis
- ✅ UPI ID analysis
- ✅ Scam message analysis
- ✅ Gemini AI integration
- ✅ Firebase Google Authentication
- ✅ Firestore database
- ✅ Firestore Security Rules
- ✅ Real-time scam reporting
- ✅ Real-time scam heatmap
- ✅ React Leaflet integration
- ✅ Protection dashboard
- ✅ Scam history
- ✅ Community reporting
- ✅ Security chatbot
- ✅ Emergency SOS
- ✅ AI-assisted complaint drafting
- ✅ Responsive UI
- ✅ Dark / Light themes
Future improvements may include:
- Hindi and regional language support
- Browser extension for one-click scanning
- WhatsApp / SMS scam scanning bot
- Public API for third-party integrations
- Advanced heatmap analytics
- Improved threat intelligence sources
- Automated security testing
- Expanded scam detection models
Harsh Mishra
B.Tech CSE — Babu Banarasi Das University, Lucknow
- GitHub: https://github.com/HarshMishra2803
- LinkedIn: https://linkedin.com/in/harshmishra2803cse
MIT License
Copyright © 2026 Harsh Mishra