Skip to content

FraudGuard is a comprehensive real-time fraud detection system that combines machine learning with interactive visualizations. The system provides real-time monitoring, transaction analysis, and risk assessment capabilities through a modern web interface.

License

Notifications You must be signed in to change notification settings

Arindam-GitH/Fraud-Detection-Website

Repository files navigation

FraudGuard - Real-time Fraud Detection System

A comprehensive fraud detection system with real-time monitoring, machine learning-based predictions, and interactive visualizations.

Features

  • Real-time fraud detection using machine learning
  • Interactive dashboard with multiple visualizations
  • Transaction monitoring and analysis
  • Risk assessment and scoring
  • User authentication and role-based access
  • API endpoints for integration

Tech Stack

Frontend

  • React.js
  • Material-UI
  • Recharts for visualizations
  • Axios for API calls

Backend

  • FastAPI
  • Python
  • Scikit-learn
  • Pandas
  • NumPy

Project Structure

fraud_detection/
├── backend/
│   ├── app/
│   │   ├── router.py
│   │   └── models/
│   ├── utils/
│   ├── config.py
│   └── main.py
├── frontend/
│   ├── src/
│   │   ├── components/
│   │   ├── pages/
│   │   ├── services/
│   │   └── utils/
│   └── public/
└── README.md

Getting Started

Prerequisites

  • Python 3.8+
  • Node.js 14+
  • npm or yarn

Backend Setup

  1. Create a virtual environment:

    cd backend
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  2. Install dependencies:

    pip install -r requirements.txt
  3. Start the backend server:

    python -m uvicorn main:app --host 0.0.0.0 --port 8000 --reload

Frontend Setup

  1. Install dependencies:

    cd frontend
    npm install
  2. Start the development server:

    npm start

The application will be available at:

API Endpoints

  • GET /api/v1/status - API status check
  • POST /api/v1/predict - Fraud prediction endpoint
  • GET /api/v1/dashboard/summary - Dashboard summary data
  • GET /api/v1/dashboard/fraud-distribution - Fraud distribution data
  • GET /api/v1/dashboard/model-performance - Model performance metrics

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

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

Acknowledgments

  • Material-UI for the component library
  • Recharts for the visualization library
  • FastAPI for the backend framework

🚀 Features

  • Dataset Generation: 50,000 synthetic transactions with 10 relevant features
  • Multiple ML Models: Implementation of 4 powerful algorithms
    • Random Forest
    • XGBoost
    • LightGBM
    • CatBoost
  • Advanced Visualizations: 8 different types of data visualizations
  • Class Imbalance Handling: SMOTE technique implementation
  • Comprehensive Evaluation: Multiple performance metrics

📊 Project Structure

fraud_detection/
├── data/               # Dataset directory
├── docs/              # Documentation and visualizations
├── models/            # Trained models
├── notebooks/         # Jupyter notebooks
├── src/              # Source code
└── tests/            # Unit tests

🛠️ Technical Stack

  • Languages: Python 3.x
  • ML Libraries:
    • Scikit-learn
    • XGBoost
    • LightGBM
    • CatBoost
  • Data Processing:
    • Pandas
    • NumPy
  • Visualization:
    • Matplotlib
    • Seaborn
    • Plotly
  • Development:
    • Jupyter Notebooks
    • Git

🚀 Getting Started

  1. Clone the repository
git clone https://github.com/Arindam-GitH/Payment-Fraud-Detection-.git
cd Payment-Fraud-Detection-
  1. Set up virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Run the analysis
python src/main.py

📈 Model Performance

Each model is evaluated using:

  • Accuracy
  • Precision
  • Recall
  • F1-Score
  • ROC-AUC Score

📊 Visualizations

The project includes 8 different types of visualizations:

  1. Transaction Amount Distribution
  2. Fraud vs Non-Fraud Distribution
  3. Correlation Heatmap
  4. Transaction Time Analysis
  5. Amount vs Fraud Box Plot
  6. Customer Age Distribution
  7. Device Type Distribution
  8. Geographic Distribution

🤝 Contributing

Feel free to submit issues and enhancement requests!

📝 License

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

👤 Author

Arindam Guha


⭐️ From Arindam-GitH

About

FraudGuard is a comprehensive real-time fraud detection system that combines machine learning with interactive visualizations. The system provides real-time monitoring, transaction analysis, and risk assessment capabilities through a modern web interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published