Skip to content

aerospike-examples/graph-fraud-demo

Repository files navigation

Fraud Detection Application

A comprehensive fraud detection system built with FastAPI backend and Next.js frontend, utilizing Aerospike Graph for real-time graph-based fraud detection.

🚀 Quick Start

New to this project? Check out our detailed Setup Instructions for complete installation and configuration guidance.

Already set up? Run the application:

./run_app.sh

Access the application:

🏗️ Architecture

Backend (Python + FastAPI)

  • Framework: FastAPI with async support
  • Graph Database: Aerospike Graph Service (AGS) via Gremlin queries
  • Features:
    • RESTful API endpoints for fraud detection
    • Real-time Gremlin query execution
    • Sample data seeding
    • User and transaction management
    • Fraud pattern detection algorithms

Frontend (Next.js + TailwindCSS)

  • Framework: Next.js 14 with App Router
  • Styling: TailwindCSS with dark/light theme support
  • Features:
    • Modern, responsive dashboard
    • Real-time data visualization
    • User and transaction exploration
    • Fraud pattern analysis
    • Interactive graph visualization (Phase 2)

🕵️ Fraud Detection System

The system implements real-time fraud detection using graph-based analysis:

RT1 - Flagged Account Detection

  • Purpose: Detects transactions involving previously flagged accounts
  • Method: 1-hop graph lookup for immediate threat detection
  • Risk Level: High
  • Use Cases: Known fraudster connections, blacklisted accounts

RT2 - Flagged Device Connection

  • Purpose: Detects transactions involving accounts connected to flagged devices
  • Method: Network analysis through transaction history
  • Risk Level: High
  • Use Cases: Device-based fraud networks, shared device abuse

RT3 - Supernode Detection (Future)

  • Purpose: Identifies accounts with unusually high connectivity
  • Method: Graph centrality analysis
  • Risk Level: Medium-High
  • Use Cases: Money laundering hubs, distribution networks

📚 Documentation

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Aerospike Graph demo to illustrate fraud detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •