The Financial API Project is a Django-based web application designed to manage and analyze financial transactions. It provides six endpoints for monitoring suspicious activity, tracking spending patterns, and generating merchant-specific reports.
The API includes the following main endpoints:
- Transaction History - Retrieves detailed transaction records for specific accounts
- Suspicious Activity Monitoring - Flags and monitors potentially suspicious transactions
- Merchant Transaction Summary - Provides transaction analysis grouped by merchants
- Transaction Management - Handles creation of new transaction records
- Spending Analytics - Generates insights and patterns from transaction data
- High-Frequency Account Detection - Identifies accounts with high frequancy transaction
The project serves as a comprehensive financial transaction analysis system, offering both monitoring and analytical capabilities through its RESTful API interface, built with Django REST Framework and fully documented using Swagger.
Mid-term-project/
┗ financial_api/
┣ data_set/
┣ financial_api/
┣ transactions_app/
┣ Dockerfile
┣ Readme.md
┣ docker-compose.yml
┣ manage.py
┗ requirements.txt
- Python 3.12 or higher installed
- pip (Python package manager) installed
- Docker installed
- Docker Compose installed
-
Extract the Project Files:
- Extract the file to your local machine.
-
Navigate to the Project Directory (The directory that contains the manage.py file):
cd financial_api -
Create a Virtual Environment:
python3 -m venv venv source venv/bin/activate # For macOS/Linux venv\Scripts\activate # For Windows
-
Install Dependencies:
pip install -r requirements.txt
-
Run Database Migrations:
python manage.py migrate
-
Seed the Database:
python manage.py populate_db
-
Run the Server:
python manage.py runserver
-
Access the Application: Open your browser and navigate to http://127.0.0.1:8000.
-
Extract the Project Files:
- Extract the file to your local machine.
-
Navigate to the Project Directory (The directory that contains the manage.py file):
cd financial_api -
Build and Start the Docker Containers:
docker-compose up --build
-
Access the Application: Open your browser and navigate to http://127.0.0.1:8000.
The populate_db management command automatically seeds the database using data from data_set/bank_transactions_data.csv.
To stop the Docker containers, run:
docker-compose downTo run the unit tests:
python manage.py testVittorio Babino
