How patilyash9172/fraud-detection-system works
This directory contains a fraud-scoring API and a data-loading utility; the README identifies the analyst dashboard as a separate React app in ../frontend. The main scoring path is visible in main.py, but feature engineering, model, risk-scoring, and explainability implementations are referenced rather than present in this file tree, so their internal wiring is shown only where the API calls them.
Main entry points: main.py FastAPI service · load_data.py Data loader · schemas.py Request contracts
Components 13
Scoring API
- FastAPI service
main.py - Request contracts
schemas.py
Scoring internals
- Feature engineering
- Fraud model
- Risk scoring
- SHAP explanations
- Anomaly detection
Operations and data
- Model registry
main.py - Model artifacts
- Data loader
load_data.py - Processed data
- PostgreSQL
Other components
- API client
Connections 11
- API client → FastAPI service: submits transactions
- FastAPI service → Request contracts: validates and responds
- FastAPI service → Model registry: loads artifacts
- Model registry → Model artifacts: reads
- FastAPI service → Feature engineering: engineers features
- FastAPI service → Fraud model: predicts probability
- FastAPI service → Risk scoring: scores risk
- FastAPI service → SHAP explanations: requests explanations
- FastAPI service → Anomaly detection: scores anomalies
- Data loader → Processed data: reads
- Data loader → PostgreSQL: writes records