A comprehensive financial security system that provides real-time transaction monitoring, fraud detection, and credit risk assessment capabilities.
The system consists of several microservices working together to provide a complete financial security solution:
-
Backend API Service
- RESTful API service built with FastAPI
- Handles core business logic and service orchestration
- Runs on port 8000
-
Transaction Anomaly Detection
- Real-time transaction monitoring and anomaly detection
- Uses machine learning to identify suspicious patterns
- Integrates with Kafka for event streaming
-
Fraud Network Detection
- Network analysis for fraud detection
- Uses graph database (Neo4j) for relationship analysis
- Identifies complex fraud patterns and networks
-
Credit Risk Scoring
- Credit risk assessment and scoring
- Real-time risk evaluation
- Historical data analysis
-
Data Visualization (Apache Superset)
- Interactive dashboards and visualizations
- Real-time monitoring of system metrics
- Accessible at port 8088
- Message Broker: Apache Kafka
- Databases:
- PostgreSQL (Main database)
- Neo4j (Graph database for fraud network analysis)
- ClickHouse (Analytics database)
- Data Visualization: Apache Superset
- Container Orchestration: Docker Compose
- API Framework: FastAPI
- Development Tools:
- Black (Code formatting)
- Pre-commit hooks
- Flake8 (Linting)
- Docker and Docker Compose
- Pyenv with Python 3.10.x, 3.12.x and 3.13.x
- Git
-
Clone the repository:
git clone https://github.com/Financial-Fraud-Detection-System/financial-security-system.git cd financial-security-system -
Start the services:
docker-compose up -d
-
Access the services:
- Backend API: http://localhost:8000
- Superset Dashboard: http://localhost:8088
- Neo4j Browser: http://localhost:7474
-
Synchronise virtual environment across all directories (from the root directory):
./scripts/sync_venv.sh # On Windows: ./scripts/Sync_Venv.ps1 -
Install pre-commit hooks (From the root directory activate the virtual environment and run):
pre-commit install
-
To run tests:
./scripts/run_all_tests.sh # On Windows: ./scripts/run_all_tests.ps1
financial-security-system/
├── backend/ # FastAPI backend service
├── transaction_anomaly_detection/ # Transaction monitoring service
├── fraud_network_detection/ # Fraud detection service
├── credit_risk_scoring/ # Credit risk assessment service
├── superset/ # Data visualization configuration
├── libs/ # Shared libraries
├── scripts/ # Utility scripts
└── docker-compose.yaml # Service orchestration
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This system handles sensitive financial data. Please ensure proper security measures are in place before deployment to production.