How imposterbharathkumarburugu15-cpu/credit-risk works
CreditRisk-X is a credit-default risk platform with a dashboard and FastAPI service. The main workflow takes customer data through validation and feature engineering, model scoring, and a threshold-based decision, then presents risk and cost analysis. The API also exposes model comparison, threshold optimization, explainability, analytics, and chatbot features; authenticated application workflows support customer accounts, application updates, and email notifications. The tree and README establish both backend variants, but sampled evidence is concentrated in backend/; relationships for unsampled capabilities are limited to documented or indexed references.
Main entry points: routes.py FastAPI routes · database.py Persistence layer · model.py Model artifacts · prediction.py Input and scoring
Components 22
Dashboard and API
- Risk dashboard
frontend/app.js - FastAPI routes
backend/routes.py - API application
backend/main.py - Runtime configuration
backend/config.py
Risk Scoring
- Feature engineering
backend/features.py - Input and scoring
backend/prediction.py - Model artifacts
backend/model.py - Risk decision
backend/decision.py - Model training
backend/train.py
Cost and Insights
- Scoring analysis
backend/service.py - Cost evaluation
backend/costs.py - Policy cost comparison
backend/cost.py - Threshold optimization
backend/optimization.py - Risk analytics
backend/analytics.py - Decision explanations
backend/explainability.py - FAQ chatbot
backend/chatbot.py
Application Operations
- Customer workflows
backend/workflows.py - Persistence layer
backend/database.py - Email notifications
backend/email_service.py
Other components
- Credit analyst
- MySQL
- SMTP service
Connections 31
- Credit analyst → Risk dashboard: uses
- Risk dashboard → FastAPI routes: requests analysis
- API application → FastAPI routes: mounts routes
backend/main.py - API application → Model artifacts: loads artifacts
backend/main.py - API application → Persistence layer: initializes connection
backend/main.py - FastAPI routes → Input and scoring: scores customers
backend/routes.py - FastAPI routes → Risk decision: classifies risk
backend/routes.py - FastAPI routes → Scoring analysis: serves analysis
backend/routes.py - FastAPI routes → Policy cost comparison: compares policy costs
backend/routes.py - FastAPI routes → Threshold optimization: optimizes thresholds
backend/routes.py - FastAPI routes → Risk analytics: serves analytics
backend/routes.py - FastAPI routes → FAQ chatbot: serves chatbot
backend/routes.py - FastAPI routes → Decision explanations: serves explanations
backend/routes.py - FastAPI routes → Customer workflows: routes workflows
backend/routes.py - Input and scoring → Feature engineering: builds features
backend/prediction.py - Input and scoring → Model artifacts: uses model
backend/prediction.py - Scoring analysis → Feature engineering: engineers inputs
backend/service.py - Scoring analysis → Cost evaluation: evaluates thresholds
backend/service.py - Threshold optimization → Model artifacts: uses model
backend/optimization.py - Threshold optimization → Cost evaluation: evaluates costs
backend/optimization.py - Risk analytics → Model artifacts: reads model data
backend/analytics.py - Decision explanations → Model artifacts: uses model
backend/explainability.py - Decision explanations → Input and scoring: uses predictions
backend/explainability.py - Model training → Feature engineering: engineers training data
backend/train.py - Model training → Cost evaluation: evaluates models
backend/train.py - Customer workflows → Persistence layer: reads and writes
backend/workflows.py - Customer workflows → Email notifications: sends notifications
backend/workflows.py - Email notifications → Persistence layer: logs delivery
- Persistence layer → MySQL: persists records
backend/database.py - Email notifications → SMTP service: delivers email
- Runtime configuration → Persistence layer: configures connection
backend/database.py