Skip to content

An AI-powered fraud detection system that uses machine learning to detect suspicious financial transactions in real time. Features include interactive dashboards, secure authentication, and comprehensive reporting for fintech risk analysis.

License

Notifications You must be signed in to change notification settings

Adithya17-star/AI-Powered-Fraud-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Enabled Fraud Detection System

An advanced machine learning-powered system for detecting fraudulent financial transactions. Features interactive dashboards, real-time analysis, and secure user authentication.

🌐 Live Demo

Python Flask License: MIT GitHub Pages

🔍 Features

  • Machine Learning Detection: Detects suspicious activity using Random Forest and Isolation Forest algorithms
  • Interactive Dashboard: Real-time statistics and visualization of transaction data
  • CSV Upload & Analysis: Upload transaction data and analyze with custom sensitivity
  • Comprehensive Reports: Generate detailed fraud analysis reports with visualizations
  • Transaction Deep Dive: View risk factors and breakdowns for each transaction
  • User Authentication: Secure registration, login, and session management

🛠️ Technology Stack

  • Backend: Flask, SQLAlchemy, PostgreSQL
  • Machine Learning: scikit-learn, pandas, NumPy
  • Frontend: Bootstrap, Chart.js, JavaScript
  • Authentication: Flask-Login

📋 Requirements

  • Python 3.10+
  • PostgreSQL database
  • Modern web browser

🚀 Installation

  1. Clone the repository
git clone https://github.com/Adithya17-star/AI-Enabled-Fraud-Detection.git
cd AI-Enabled-Fraud-Detection
  1. Install dependencies
pip install -r requirements.txt
  1. Configure environment variables
DATABASE_URL=postgresql://username:password@localhost:5432/fraud_detection
SESSION_SECRET=your-secure-secret-key
  1. Initialize the database
python -c "from app import db; db.create_all()"
  1. Run the application
python main.py
  1. Open your browser and navigate to http://localhost:5000

📊 Usage Guide

Registration & Login

  1. Create a new account via the Registration page
  2. Log in using your credentials

Uploading Transactions

  1. Navigate to the Upload page
  2. Upload a CSV file with transaction data (see format below)
  3. Preview the data and start analysis

Transaction CSV Format

Your CSV file should include the following columns:

  • transaction_id: Unique identifier
  • amount: Transaction amount
  • timestamp: Date and time (YYYY-MM-DD HH:MM:SS)
  • merchant: Merchant name
  • merchant_category: Category of merchant (optional)
  • description: Transaction description (optional)
  • location: Transaction location (optional)
  • ip_address: IP address (optional)
  • device_id: Device identifier (optional)

Analyzing Transactions

  1. Select detection model (Random Forest or Isolation Forest)
  2. Adjust detection sensitivity
  3. Start analysis to identify fraudulent transactions

Dashboard

  • View key metrics including total transactions, fraud count, and amounts
  • Analyze transaction trends over time
  • Examine fraud distribution by merchant category

Reports

  1. Create a new report by specifying date range and title
  2. View detailed fraud patterns and statistics
  3. Export reports for record-keeping

📝 Project Structure

AI-Enabled-Fraud-Detection/
├── static/                     # Static assets
│   ├── css/                    # CSS stylesheets
│   └── js/                     # JavaScript files
├── templates/                  # HTML templates
├── app.py                      # Flask application setup
├── main.py                     # Application entry point
├── models.py                   # Database models
├── routes.py                   # Application routes
├── fraud_detection.py          # Fraud detection algorithms
├── data_preprocessing.py       # Data preprocessing utilities
└── utils.py                    # Helper functions

🔒 Security Considerations

  • All passwords are securely hashed using werkzeug's security functions
  • PostgreSQL database with secure connection
  • Input validation on all form submissions
  • Session management via Flask-Login

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  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.

👥 Authors

🙏 Acknowledgements


This project is part of an ongoing effort to improve fraud detection systems using artificial intelligence and machine learning techniques.

About

An AI-powered fraud detection system that uses machine learning to detect suspicious financial transactions in real time. Features include interactive dashboards, secure authentication, and comprehensive reporting for fintech risk analysis.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published