A comprehensive Flask-based web application for NBCFDC (National Backward Classes Finance & Development Corporation) that implements AI/ML-based credit scoring with income verification for direct digital lending to backward class beneficiaries.
Challenge: Develop an AI/ML-based credit scoring model that:
- Uses historical repayment behavior, loan utilization patterns, and repeat borrowing data
- Integrates income level assessment using consumption-based metrics
- Produces a Composite Beneficiary Credit Score
- Enables Direct Digital Lending for low-risk, eligible beneficiaries
Goals:
- Ensure loans reach genuine, low-income beneficiaries with good repayment behavior
- Reduce processing time for repeat borrowers by 50% or more
- Enable same-day sanction for high-score beneficiaries
- Composite Credit Score (300-850 scale)
- Repayment Behavior Score (weighted 60%)
- Consumption Profile Score (weighted 40%)
- 4-Band Risk Classification:
- Low Risk - High Need (Green): Priority beneficiaries
- Low Risk - Low Need (Blue): Eligible with standard terms
- High Risk - High Need (Orange): Requires careful assessment
- High Risk - Low Need (Red): Higher monitoring needed
- Pre-populated loan application for returning borrowers
- Instant AI-powered approval (< 45 seconds)
- 50% faster than traditional process
- Zero processing fees for excellent repayment history
- Transparent credit decision explanation
- Animated visualization showing:
- Repayment Behavior Score
- Consumption Profile Score
- Composite Score
- One-line AI-generated explanation
- Upload consumption data:
- Electricity bills
- Mobile recharge records
- Utility payment history
- AI analysis of consumption patterns
- Score improvement up to +50 points
- Real-time lending metrics
- Risk band distribution visualization
- Disbursement trend charts
- Beneficiary management interface
- Backend: Flask (Python 3.8+)
- Frontend: HTML5, CSS3, JavaScript
- Charts: Chart.js
- Styling: Custom CSS with modern design principles
- Session Management: Flask Sessions
- Data Storage: In-memory (static demo)
- Python 3.8 or higher
- pip (Python package manager)
# If using git
git clone <repository-url>
cd nbcfdc-lending-platform
# Or download and extract the ZIP filepip install flaskEnsure your project has the following structure:
nbcfdc-lending-platform/
│
├── app.py # Main Flask application
├── templates/ # HTML templates folder
│ ├── base.html # Base template with navbar
│ ├── login.html # Login page
│ ├── dashboard.html # Main dashboard
│ ├── credit_score.html # Credit score analysis
│ ├── new_loan.html # New loan application
│ ├── loan_status.html # Loan tracking
│ ├── income_verification.html # Income verification
│ └── admin_analytics.html # Admin analytics
└── README.md # This file
python app.pyThe application will start on http://localhost:5000
- Username:
beneficiary - Password:
demo123 - Features: Credit score, loan application, status tracking, income verification
- Username:
admin - Password:
admin123 - Features: Analytics dashboard, beneficiary management, system overview
- Navigate to
http://localhost:5000 - Enter beneficiary credentials
- View personalized dashboard
- Click "Credit Score Analysis"
- View composite score (782/850)
- See "Why I Was Approved" card with:
- Repayment Behavior: 85%
- Consumption Profile: 78%
- Composite Score: 82%
- Read AI explanation of approval
Option A: Regular Application
- Fill loan application form
- Submit for instant AI approval
- Receive approval in < 60 seconds
Option B: 2-Click Repeat Loan
- Click "Approve & Disburse Instantly"
- Pre-filled with previous loan details
- Instant approval (50% faster)
- Modal shows loan approval details
- View active loans with progress bars
- Check completed loan history
- See repayment schedules
- Make payments or download statements
- Upload consumption documents
- Electricity bills, mobile recharges, utility bills
- Improve credit score by up to 50 points
- See privacy and security information
- Use admin credentials
- Access admin-specific dashboard
- Total beneficiaries: 1,247
- Approved loans: 892
- Total disbursed: ₹45.2 Cr
- Repayment rate: 94.5%
- Low Risk - High Need: 487 (39.1%)
- Low Risk - Low Need: 356 (28.5%)
- High Risk - High Need: 278 (22.3%)
- High Risk - Low Need: 126 (10.1%)
- View monthly disbursement chart
- Analyze growth patterns
- Track seasonal variations
- Search and filter beneficiaries
- View individual credit scores
- Check risk band classifications
- Access detailed profiles
| Requirement | Implementation | Status |
|---|---|---|
| Repayment behavior analysis | Historical loan tracking with 100% on-time record | ✅ Complete |
| Income verification layer | Consumption data upload (electricity, mobile, utilities) | ✅ Complete |
| Composite credit score | 3-component score (Repayment 60% + Consumption 40%) | ✅ Complete |
| Risk band classification | 4-band system (Low/High Risk × High/Low Need) | ✅ Complete |
| Direct digital lending | 2-click repeat loan with instant approval | ✅ Complete |
| Missing data handling | Score calculated with available data | ✅ Complete |
| Transparent scoring | "Why I Was Approved" explainer card | ✅ Complete |
| Processing time reduction | 50%+ faster for repeat borrowers (45s vs 90s+) | ✅ Complete |
| Same-day sanction | Instant approval for low-risk beneficiaries | ✅ Complete |
For your SIH presentation, capture these key flows:
- Login → Show dashboard (0:30)
- Credit Score → Highlight "Why Approved" card with animations (0:45)
- 2-Click Repeat Loan → Show speed (instant approval) (0:45)
- Regular Loan → Full application flow (1:00)
- Loan Status → Progress bars and history (0:30)
- Login → Admin dashboard (0:30)
- Analytics → Risk band distribution (0:45)
- Charts → Disbursement trends (0:30)
- Beneficiary Table → Search and filter (0:45)
- ✨ Smooth animations and transitions
- 🎯 "Why I Was Approved" card explanation
- ⚡ 2-click loan speed (< 45 seconds)
- 📊 4-band risk classification
- 📈 Real-time analytics
- 🔒 Privacy in income verification
- Primary Purple:
#7E7ED7- Main brand color - Dark Navy:
#0C0C11- Background elements - Accent Mint:
#68FCC6- Highlights and CTAs - Bright Blue:
#2929FF- Secondary actions - White:
#FFFFFF- Text and cards
- Glassmorphism effects (backdrop blur)
- Gradient animations
- Smooth transitions
- Responsive design
- Modern card-based layouts
- Animated progress bars
- Floating background elements
Edit app.py → USERS dictionary:
USERS = {
'beneficiary': {
'credit_score': 782, # Change score
'risk_band': 'Low Risk - High Need', # Change band
# ... other fields
}
}Edit app.py → BENEFICIARIES list:
BENEFICIARIES.append({
'id': 'NBCFDC-2024-XXXX',
'name': 'New Beneficiary',
'score': 750,
'band': 'Low Risk - High Need',
'status': 'Active'
})Edit any template file → <style> section → :root variables
The application uses realistic mock data:
- Beneficiary Profile: Rajesh Kumar (ID: NBCFDC-2024-1847)
- Credit Score: 782/850 (Excellent)
- Active Loans: 1 (₹1,50,000)
- Completed Loans: 1 (₹1,00,000)
- Repayment Rate: 100% on-time
- Total Borrowed: ₹2,50,000
For production deployment:
- Replace mock data with actual database
- Implement real AI/ML model for scoring
- Add proper authentication & authorization
- Enable HTTPS
- Add logging and monitoring
- Implement actual payment gateway
- Add document verification APIs
- Create backup systems
This is a prototype developed for Smart India Hackathon 2024.
For issues or questions:
- Review this README
- Check code comments in
app.py - Inspect browser console for errors
- Ensure Flask is properly installed
Your application successfully demonstrates:
✅ AI-powered credit scoring
✅ 4-band risk classification
✅ Income verification layer
✅ 2-click repeat loan (50% faster)
✅ Transparent approval explanation
✅ Same-day digital lending
✅ Admin analytics dashboard
✅ Modern, professional UI/UX
Ready for SIH presentation! 🏆