How saanvi2005/ai-powered-loan-automation-system works
NexusBank is a loan application system: a customer chats with an assistant to provide application details, receives an underwriting decision, and—if eligible—uploads identity and salary documents for verification. The frontend also tracks progress and presents an approval-style completion state; the README describes final approval, while the sampled frontend simulates it locally. Edges reflect visible calls and documented frontend behavior; unsampled subsystems are not inferred.
Main entry points: sales_routes.py Sales message API · main.py App and static serving · index.html Application UI · script.js Chat and status
Components 13
Customer interface
- Application UI
frontend/index.html - Chat and status
frontend/script.js - Document upload
frontend/script.js
FastAPI routes
- Sales message API
backend/api/sales_routes.py - Underwriting API
backend/api/underwriter_router.py - Document verification API
backend/api/document_router.py - App and static serving
backend/main.py
Loan processing
- Information collection
backend/agents/sales_agent.py - Eligibility analysis
backend/agents/underwriter.py - OCR verification
backend/agents/doc_verify.py
Models and session state
- Session memory
backend/memory.py - Local LLM wrapper
backend/models/ollama_model.py
Other components
- Applicant
Connections 18
- Applicant → Application UI: provides application details
README.md - Application UI → Chat and status: opens chat
frontend/script.js - Chat and status → Sales message API: posts messages
frontend/script.js - Sales message API → Session memory: reads and updates
backend/api/sales_routes.py - Sales message API → Information collection: requests response
backend/api/sales_routes.py - Sales message API → Eligibility analysis: submits collected data
backend/api/sales_routes.py - Information collection → Local LLM wrapper: invokes model
backend/agents/sales_agent.py - Eligibility analysis → Local LLM wrapper: invokes model
backend/agents/underwriter.py - Chat and status → Underwriting API: posts analysis
- Underwriting API → Eligibility analysis: runs analysis
backend/api/underwriter_router.py - Applicant → Document upload: uploads documents
README.md - Document upload → Document verification API: posts files
frontend/script.js - Document verification API → OCR verification: verifies document
backend/api/document_router.py - Application UI → Chat and status: shows progress and outcomes
frontend/script.js - App and static serving → Sales message API: registers route
backend/main.py - App and static serving → Underwriting API: registers route
backend/main.py - App and static serving → Document verification API: registers route
backend/main.py - App and static serving → Application UI: serves frontend
backend/main.py