How dharanitharan27/the-loan-eligibility-engine works
The Loan Eligibility Engine takes borrower CSVs through upload and batch ingestion, discovers loan products, ranks eligible offers, generates borrower-specific advice, and sends notifications. The graph includes the dashboard/API surface, the documented n8n workflows, and the Python pipeline’s substantive stages and persistence layer. Several runtime files, including the API and ingestion worker, were not excerpted; their placement and links rely on README statements, so uncertain implementation-level connections are omitted.
Main entry points: run_pipeline.py CLI pipeline runner · database.py Loan engine database · ingest_lambda.py CSV stream worker · matcher.py Eligibility matcher
Components 17
Borrower Dashboard
- Web dashboard
frontend/app.js - FastAPI service
backend/app.py - CLI pipeline runner
backend/run_pipeline.py
Upload and Ingestion
- Upload URL handler
backend/presign_lambda.py - S3 upload bucket
- CSV stream worker
backend/ingest_lambda.py
Discovery and Matching
- Product discovery
backend/crawler.py - n8n discovery
n8n/workflow_a_discovery.json - Eligibility matcher
backend/matcher.py - n8n matching
n8n/workflow_b_matching.json - AI advice
backend/llm_advisor.py
Persistence and Delivery
- Loan engine database
backend/database.py - Email notification service
backend/email_service.py - n8n notifications
n8n/workflow_c_notification.json - AWS SES
Other components
- Borrower / operator
- Gemini API
Connections 23
- Borrower / operator → Web dashboard: uses
README.md - Web dashboard → FastAPI service: calls API
frontend/app.js - Web dashboard → S3 upload bucket: uploads CSV
README.md - FastAPI service → Upload URL handler: requests upload URL
- Upload URL handler → S3 upload bucket: creates upload URL
backend/presign_lambda.py - Upload URL handler → Loan engine database: registers batch
backend/presign_lambda.py - S3 upload bucket → CSV stream worker: triggers worker
README.md - CSV stream worker → Loan engine database: stores borrowers
README.md - CSV stream worker → n8n matching: signals completion
README.md - n8n discovery → Product discovery: runs discovery
- Product discovery → Loan engine database: upserts products
backend/crawler.py - n8n matching → Eligibility matcher: runs matching
- Eligibility matcher → Loan engine database: reads and saves matches
backend/matcher.py - Eligibility matcher → AI advice: requests advice
backend/matcher.py - AI advice → Gemini API: requests generation
backend/llm_advisor.py - n8n notifications → Email notification service: runs notifications
- Email notification service → Loan engine database: loads and marks matches
backend/email_service.py - Email notification service → AWS SES: sends email
README.md - CLI pipeline runner → Loan engine database: initializes database
backend/run_pipeline.py - CLI pipeline runner → Product discovery: calls discovery
backend/run_pipeline.py - CLI pipeline runner → CSV stream worker: calls ingestion
backend/run_pipeline.py - CLI pipeline runner → Eligibility matcher: calls matching
backend/run_pipeline.py - CLI pipeline runner → Email notification service: dispatches notifications
backend/run_pipeline.py