Skip to content

SubhanShahid55/Fraud-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

AI-Powered Financial Fraud Detection System

This project is a full-stack application that demonstrates how to use AI and machine learning for detecting fraudulent financial transactions. It consists of a React frontend and a Python Flask backend with a machine learning model.

Features

  • Machine learning-based fraud detection
  • Real-time transaction analysis
  • Batch processing of transaction data
  • Training mode for model improvement
  • Interactive dashboard for visualization

Project Structure

  • project/src/ - React frontend application
  • project/backend/ - Python Flask API for ML model

Prerequisites

  • Node.js and npm
  • Python 3.7+
  • Required Python packages: flask, flask-cors, pandas, numpy, scikit-learn, joblib

Setup Instructions

Backend (Flask API)

  1. Install Python dependencies:

    cd project/backend
    pip install -r requirements.txt
  2. Start the Flask server:

    python app.py

    The API server will run on http://localhost:5000

Frontend (React)

  1. Install Node.js dependencies:

    cd project
    npm install
  2. Start the React development server:

    npm run dev

    Or build for production:

    npm run build
  3. For a production build, serve the static files:

    cd dist
    python -m http.server 8000

    The React app will run on http://localhost:8000 (or port 5173 in development mode)

Using the Application

Training Mode

  1. Switch to "Training Mode" in the top right corner
  2. Upload a CSV file containing transaction data with fraud labels
  3. The model will train and display metrics

Prediction Mode

  1. You can analyze transactions in two ways:

    • Individual transaction analysis: Fill out the form with transaction details
    • Batch analysis: Upload a CSV file with multiple transactions
  2. View the results showing fraud probabilities and confidence scores

About the Machine Learning Model

The application uses a Random Forest classifier to detect fraudulent transactions. It analyzes patterns in transaction amounts, account balances, transaction types, and balance discrepancies.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors