This project is a Django-based fraud detection system that leverages real-time data processing to identify potentially fraudulent transactions. The system integrates with Fluvio for real-time data streaming, and a machine learning model is used to predict fraud.
- Features
- Demo Video
- Technologies Used
- Installation
- Usage
- Project Structure
- Fluvio Integration
- Data Visualization
- Contributing
- License
- Acknowledgments
Fruad.dectation.mp4
- Real-time Fraud Detection: Integrates with Fluvio to process and analyze transaction data in real-time.
- Django Web Interface: Provides a web interface for creating and viewing transactions.
- Fraud Alerts: Flags and notifies about potentially fraudulent transactions.
- Data Visualization: Visualizes transaction statistics and fraud detection results.
- Python
- Django
- Fluvio
- PostgreSQL
- Rust compiler (for building Fluvio)
- Other Python packages:
pandas
,joblib
,matplotlib
,psycopg2
, etc.
-
Clone the Repository:
git clone https://github.com/rupacesigdel/Fraud_Detection_.git cd fraud-detection-system
-
Create a Virtual Environment:
python -m venv myenv source myenv/bin/activate # On Windows: source myenv\Scripts\activate
-
Upgrade pip (if needed):
pip install --upgrade pip
-
Install Dependencies:
pip install -r requirements.txt
-
Install Fluvio:
- If you encounter issues with Fluvio installation, ensure you have Rust installed. Follow the steps below if needed:
-
Install Rust using rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Restart your terminal and ensure Rust is in your PATH.
-
Try installing Fluvio again:
pip install fluvio
-
- If you encounter issues with Fluvio installation, ensure you have Rust installed. Follow the steps below if needed:
-
Database Setup:
-
Configure your database settings in
settings.py
. -
Run migrations to set up the database schema:
python manage.py migrate
-
-
Load Initial Data (Optional):
If you have initial data, you can load it using:
python manage.py loaddata initial_data.json
- fraud_detection_project/
- │
- ├── fraud_detection/
- │ ├── init.py
- │ ├── admin.py
- │ ├── apps.py
- │ ├── forms.py
- │ ├── models.py
- │ ├── tests.py
- │ ├── views.py
- │ ├── fraud_detection.py
- │ ├── templates/
- │ │ └── transactions/
- │ │ ├── create_transaction.html
- │ │ ├── transaction_detail.html
- │ │ ├── transaction_list.html
- │ │ ├── statics_view.html
- │ │ └── home.html
- │ │ └── base.html
- │ ├── static/
- │ │ └── transactions/
- │ │ └── styles.css
- │ └── migrations/
- │ └── init.py
- │
- ├── fraud_detection_project/
- │ ├── init.py
- │ ├── asgi.py
- │ ├── settings.py
- │ ├── urls.py
- │ ├── wsgi.py
- │
- ├── manage.py
- ├── model.pkl
- ├── README.md
- └── requirements.txt
-
Start the Development Server:
python manage.py runserver
-
Access the Web Application:
Open your web browser and navigate to
http://127.0.0.1:8000/
to access the application. -
Create Transactions:
- Use the "Create Transaction" page to add new transactions.
- Transactions will be processed in real-time, and potentially fraudulent transactions will be flagged.
-
View Transactions:
- Navigate to the "Transactions" page to view a list of all transactions.
- Click on a transaction to view its details and fraud status.
-
Set Up Fluvio:
- Ensure Fluvio is properly set up and running. Refer to the Fluvio documentation for setup instructions.
-
Start Fluvio Streams:
- Use the Fluvio CLI to create and manage streams. Ensure your Django application is correctly configured to interact with Fluvio.
-
Run Data Visualization Script:
To generate a pie chart or other visualizations, use the provided scripts:
python visualize_data.py
-
Fork the Repository:
- Create a fork of the repository on GitHub.
-
Create a Pull Request:
- Open a pull request from your forked repository to the main repository.
This project is licensed under the MIT License. See the LICENSE file for details.
- Fluvio Team: For providing the powerful real-time streaming platform that enables our fraud detection system to operate efficiently.
- Django Community: For the robust web framework that serves as the foundation of our application.
- OpenAI: For their research and technologies that inspired parts of the fraud detection algorithms and overall approach.
- Stack Overflow and GitHub: For community support and code examples that helped resolve technical challenges during development.
- Rust Community: For their tools and libraries that made it possible to build and integrate Fluvio into our project.
Feel free to customize this README.md
file according to your project's specific details and requirements.