Skip to content

glorin05/Cypher

Repository files navigation

🔐 Cypher

Real-Time UPI Threat Detection System


Overview

Cypher is a full-stack UPI fraud detection system that analyzes payment identifiers in real-time — before a transaction goes through. It flags suspicious UPI QR codes and VPA IDs using a rule-based detection engine, giving users a confidence score and clear risk verdict.

Built to answer one question: Is this UPI ID safe to pay?


✨ Features

Feature Description
🔍 QR Code Analysis Scan and validate UPI QR codes instantly
🆔 VPA Verification Check UPI IDs against known fraud patterns
Real-time Detection Low-latency analysis before payment
📊 Risk Scoring Confidence-based threat score (0–100)
🛡️ Rule Engine Multi-layer pattern-based fraud detection
📱 Mobile App Flutter app for on-the-go scanning

🔍 How Detection Works

Cypher runs every UPI ID through a multi-step rule engine:

Input (VPA / QR Code)
        ↓
1. Format Validation    →  checks VPA structure & syntax
        ↓
2. Pattern Matching     →  flags known fraud signatures
        ↓
3. Behavioral Analysis  →  unusual transaction patterns
        ↓
4. Risk Scoring         →  confidence score 0–100
        ↓
Decision: ✅ SAFE | ⚠️ SUSPICIOUS | 🚨 DANGEROUS

🛠️ Tech Stack

Layer Technology
Frontend Next.js 14, TypeScript, CSS
Mobile Flutter (Dart)
Backend Python (detection engine)
Testing Jest, TypeScript
Deployment Vercel
Auth Middleware-based (middleware.ts)

📁 Project Structure

Cypher/
├── app/                      # Next.js 14 frontend (App Router)
├── backend/                  # Python fraud detection engine
├── flutter_cypher/           # Flutter mobile application
├── cypher_new/lib/           # Updated Flutter library files
├── __tests__/                # Jest test suite
├── public/                   # Static assets
├── middleware.ts             # Authentication middleware
├── next.config.ts            # Next.js configuration
├── jest.config.ts            # Jest configuration
├── vercel.json               # Vercel deployment config
├── .env.example              # Environment variable template
├── DEPLOYMENT.md             # Deployment guide
└── UPI_PAYMENT_TESTING.md    # Testing documentation

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • Python 3.10+
  • Flutter 3.x (for mobile app)

Web App Setup

# Clone the repo
git clone https://github.com/glorin05/Cypher.git
cd Cypher

# Install dependencies
npm install

# Configure environment
cp .env.example .env

# Run development server
npm run dev

Open http://localhost:3000 to view the app.

Backend Setup

cd backend
pip install -r requirements.txt
python main.py

Mobile App Setup

cd flutter_cypher
flutter pub get
flutter run

Run Tests

npm test

🌐 Deployment

The web app is deployed on Vercel. See DEPLOYMENT.md for full deployment instructions.

Deploy with Vercel


📄 License

MIT License — see LICENSE for details.


📜 Built By

Glorin P P — CS Student, KMEA Engineering College, Kerala

LinkedIn GitHub Behance

About

Cypher is a real-time UPI threat detection system designed to identify fraudulent and suspicious transactions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors