How clive0707/banking-fraud-analytics works
This is a banking-transaction analytics product: transaction data is cleaned and aggregated, then used for supervised fraud modeling, customer segmentation, and anomaly detection; Flask serves those results to a dashboard and accepts live prediction requests. The sampled source supports the preprocessing, segmentation, anomaly, API, and prediction links shown. Several dashboard and API capabilities are documented but their internal wiring was not fully sampled, so they are represented at the documented subsystem level.
Main entry points: processed Processed data and metrics · data_service.py Data service · app.py Flask application · app.js Analytics dashboard
Components 15
Data processing
- Clean and aggregate
src/preprocessing/preprocess.py - Processed data and metrics
data/processed
Risk and customer models
- Fraud model training
src/fraud_detection/train_models.py - Fraud models
models - Customer segmentation
src/customer_segmentation/clustering.py - Cluster profiles
data/processed/customer_clusters.json - Anomaly detection
src/anomaly_detection/anomaly.py - Anomaly results
data/processed/anomalies_summary.json
API and serving
- Flask application
backend/app.py - Analytics routes
backend/routes/analytics_routes.py - Prediction route
backend/routes/prediction_routes.py - Data service
backend/services/data_service.py
Dashboard
- Analytics dashboard
frontend/js/app.js
Other components
- Analyst
- Transaction data
Connections 19
- Transaction data → Clean and aggregate: loads and transforms
- Clean and aggregate → Processed data and metrics: writes aggregates and sample
- Processed data and metrics → Fraud model training: provides training sample
- Fraud model training → Fraud models: saves models and metrics
- Processed data and metrics → Customer segmentation: provides customer profiles
- Customer segmentation → Cluster profiles: writes cluster profiles
- Processed data and metrics → Anomaly detection: provides transaction sample
- Anomaly detection → Anomaly results: writes anomaly summary
- Analyst → Analytics dashboard: uses
- Analytics dashboard → Flask application: requests dashboard
- Flask application → Analytics routes: registers routes
- Flask application → Prediction route: registers routes
- Flask application → Data service: initializes
- Analytics routes → Data service: requests analytics
- Prediction route → Data service: requests prediction
- Data service → Processed data and metrics: reads metrics and transactions
- Data service → Fraud models: loads models for inference
- Analytics dashboard → Analytics routes: fetches analytics
- Analytics dashboard → Prediction route: submits predictions