Skip to content
HarshMishra2803Public

About

AI-powered cybersecurity & anti-fraud platform — scans URLs, UPI IDs & messages via Google Gemini AI. Real-time scam heatmap with Firestore + Leaflet.js. Firebase Auth, JWT, Emergency SOS with AI-generated legal drafts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🛡️ Kavach — AI Cybersecurity & Anti-Fraud Platform

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.

🌐 Live Demo

Kavach — Live Application


⚡ Why Kavach?

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.


✨ Key Features

🧠 AI Scam Analysis

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.


🗺️ Live Scam Heatmap

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

📊 Protection Dashboard

Users can monitor their cybersecurity activity through a personalized dashboard containing:

  • Scan history
  • Recent threats
  • Protection score
  • Scam trends
  • Report activity

🚨 Emergency SOS

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.


🤖 Security Chatbot

An AI-powered cybersecurity assistant helps users with questions related to:

  • Online scams
  • Phishing
  • UPI fraud
  • Account security
  • Safe browsing
  • Digital safety practices

🌐 Community Scam Reporting

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.


🔐 Secure Authentication

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.


🌓 Responsive Interface

The application is designed for desktop and mobile experiences with:

  • Dark / Light mode
  • Responsive layouts
  • Smooth animations
  • Mobile-first UI
  • Interactive components

🏗️ Architecture

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

Why Serverless?

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.


🛠️ Tech Stack

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
Email EmailJS Emergency/report communication
Hosting Render Static site deployment

🔒 Security

Security is a core part of Kavach's architecture.

Firebase Authentication

Users authenticate through Firebase Authentication using Google OAuth.

Firestore Security Rules

Firestore rules restrict access to user-owned data and prevent unauthorized reads and writes.

API Credential Protection

Gemini credentials are configured through environment variables and application restrictions are used to reduce unauthorized usage.

Client-Side Data Protection

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.


📁 Project Structure

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.


🔄 Scam Analysis Flow

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.


🗺️ Scam Reporting Flow

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.


🚀 Getting Started

Prerequisites

Make sure you have:

  • Node.js 18+
  • npm
  • Firebase project
  • Google Gemini API access

Installation

git clone https://github.com/HarshMishra2803/Kavach.git

cd Kavach

npm install

Create your environment file:

cp .env.example .env

Configure the required environment variables.

Then start the development server:

npm run dev

The application will be available at:

http://localhost:5173

🔑 Environment Variables

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_key

Firebase configuration should be configured according to the Firebase setup used by the application.

Never commit private API keys, secrets, or production credentials to GitHub.


🏗️ Production Build

Create an optimized production build:

npm run build

Preview the production build locally:

npm run preview

🌍 Deployment

Kavach is deployed as a static web application on Render.

Build command

npm install && npm run build

Publish directory

dist

For SPA routing, configure the appropriate rewrite:

/* → /index.html

📌 Current Capabilities

  • ✅ 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

🗺️ Roadmap

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

👨‍💻 Author

Harsh Mishra

B.Tech CSE — Babu Banarasi Das University, Lucknow


📄 License

MIT License

Copyright © 2026 Harsh Mishra

About

AI-powered cybersecurity & anti-fraud platform — scans URLs, UPI IDs & messages via Google Gemini AI. Real-time scam heatmap with Firestore + Leaflet.js. Firebase Auth, JWT, Emergency SOS with AI-generated legal drafts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages