This project is an AI data intensive fraud detection application that relies on the power of DNNs to classify transactions as fraudulent or non-fraudulent based on the transactions features. The trained DNN model is availabe for use via a web application developed using the Django framework. The dockeried web application is also deployed on the Google Cloud platform using kubernetes. The ML pipeline is described in the ML_pipeline_documentaion file.
The project is structured as follows:
README.md
- This fileML_pipeline_documentaion.md
- Describes the ML pipelinemanagement.md
- Describes the project management processassets
- Contains images and other assetsfraud_detection
- Contains the Django projectdb_setup
- Contains the database setup. This was initially used for setting up the database on the VPS. However, everything is now handled by the Django app.prototypes
- Contains the ML prototypes. This was initially used for training the AI and reaching the metrics desired..gitignore
- Contains files that should be ignored by git.gitlab-ci.yml
- Contains the CI/CD pipeline.gitlab
- Contains the gitlab templates for merge requests and issuesenvironment.yml
- Contains the packages required for the projectjupyter_requirements.txt
- Contains the packages required for running jupyter notebookdeployment.yml
- Contains the kubernetes deployment filegx
- Contains the Great Expectation files used for data validation.style.yapf
- Contains the yapf configuration file for auto formatting of the code
The Django project is structured as follows:
fraud_detection
- Contains the Django project setupcore
- Contains the core applicationdetection
- Contains the detection application. the ML pipeline is in this applicationDashboard
- Contains the dashboard application used to manage the ML models by staffdb_importer
- Contains the db_importer application used to import data (in form ofcsv
) into the databasedockerfile
- Contains the dockerfile for building the docker imagerun.sh
- Contains the script for running the Django application both in development and production modesmanage.py
- The main entry to our application
We make use of a client/server architecture since we have a web application. Since we are using Django templates. We render HTML
files. As a result we have server_side rendering and not a single page application. Here is a visual representation of the architecture in the form of a component diagram:
To get a full viw on the ML_pipeline, please refer to the ML_pipeline_documentaion.md
The deployment structure is as follows:
To get started with the project, you need to do the following steps:
- You need to first fix the environment, to be able to run the application. You need to install
anaconda
orminiconda
on your system. Please refer to this website for more information. - After you have installed
anaconda
orminiconda
, you need to run the following command:
# Make sure you are in the root directory of the project
conda env create -f environment.yml
- Now you can run the application using the following command:
conda activate prj
cd fraud_detection
python3 manage.py runserver # For linux/mac
python manage.py runserver # For windows