Skip to content
manny2341Public

About

Advanced Fraud Detection System — AML heuristics, real-time alerts, network graph, React + Node.js + MongoDB

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🛡️ Fraud Eye

Advanced Fraud Detection and Analysis System with Apple-style UI.
Analyse financial transactions in real time, score them with AML heuristics, visualise account networks, and get instant alerts — all in one clean dashboard.

React · Vite · Tailwind CSS · Framer Motion · Node.js · Express · MongoDB · Socket.io


✨ Features

🔍 AML Risk Scoring Engine

Every transaction is scored 0–100 against 8 Anti-Money Laundering rules:

Rule Trigger Score
Large transaction Amount ≥ $10,000 +25
Smurfing pattern $8,000–$9,999 (just-below threshold) +20
High velocity >5 transactions from same account in 1 hour +20
High-risk jurisdiction IR, KP, SY, MM, YE, SO +20
Unusual hours Transactions at 2am–5am +12
Aggregate structuring Multiple small txns totalling ≥$10K in 1 hour +15
Round-number amount Multiples of $1,000 +8
New account Account age < 30 days +10

Risk levels: 🟢 Low (0–29) · 🟡 Medium (30–59) · 🔴 High (60–100)

📊 Dashboard

  • Live stat cards: total transactions, high/medium risk counts, reviewed count
  • 7-day transaction volume area chart
  • High-risk transactions bar chart by day
  • Top 5 flagged accounts by alert count and volume
  • Recent transactions feed

💳 Transaction Management

  • Add individual transactions with full AML analysis on submit
  • Bulk upload via CSV paste — processes hundreds at once
  • Filters: risk level, search by TX ID or account, date range
  • Paginated table with inline AML flag breakdown
  • One-click review action (analyst/admin only)

🕸️ Network Graph

  • Force-directed SVG graph of medium/high risk transaction relationships
  • Nodes = accounts, links = transactions coloured by risk level
  • Pan, zoom, hover tooltips showing account stats

🔔 Real-Time Alerts

  • Socket.io pushes toast notifications instantly when a high/medium risk transaction is submitted
  • Alerts page: dismiss, filter active/dismissed, colour-coded by severity

📥 Reports & Export

  • Export filtered transactions to CSV (by risk level or all)
  • Preview report before downloading
  • Bulk CSV upload with per-row result feedback

🌙 Dark Mode

  • Full dark/light toggle per user account (persisted to database)

🔐 Authentication & Roles

  • JWT-based login/register
  • Three roles: Analyst (can review), Admin, Viewer (read-only)

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB URI (optional — runs with in-memory DB out of the box)

Install & Run

git clone https://github.com/manny2341/fraud-eye.git
cd fraud-eye

# Install all dependencies
npm install
cd backend && npm install && cd ..
cd frontend && npm install && cd ..

# Start both frontend and backend
npm run dev

No MongoDB needed. The app automatically uses an in-memory database if no MONGO_URI is set. Data resets on restart.

To use a real database, add your MongoDB Atlas URI to backend/.env.

Environment Variables

Create backend/.env (copy from backend/.env.example):

PORT=5001
MONGO_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net/fraudeye
JWT_SECRET=your_secret_here
JWT_EXPIRES_IN=7d
CLIENT_URL=http://localhost:5173

🏗️ Project Structure

fraud-eye/
├── backend/
│   └── src/
│       ├── models/          # User, Transaction, Alert
│       ├── controllers/     # Auth, Transaction, Alert logic
│       ├── routes/          # /api/auth, /api/transactions, /api/alerts
│       ├── middleware/       # JWT auth, role check
│       └── utils/           # ApiError, ApiResponse, asyncHandler, AML heuristics
├── frontend/
│   └── src/
│       ├── pages/           # Dashboard, Transactions, Graph, Alerts, Reports
│       ├── components/      # Sidebar, Layout, StatCard, RiskBadge
│       ├── context/         # AuthContext (JWT + theme)
│       ├── hooks/           # useSocket (real-time alerts)
│       └── utils/           # Axios API client
└── package.json             # Runs both with concurrently

🧪 Tech Stack

Layer Technology
Frontend React 18, Vite, Tailwind CSS, Framer Motion, Lucide React
Charts Recharts
Backend Node.js, Express 4, Mongoose
Database MongoDB (or in-memory via mongodb-memory-server)
Auth JWT + bcrypt
Real-time Socket.io
Fraud Engine Custom AML heuristics (8 rules, 0–100 score)

Built by manny2341

About

Advanced Fraud Detection System — AML heuristics, real-time alerts, network graph, React + Node.js + MongoDB

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages