ENTERPRISE SYSTEM ARCHITECTURE

FinCRM Architecture & End-to-End Deployment

Automated Channel Partner Ingestion, Lender Portal Integration & Brokerage Settlement Gateway

Live on Port 4008
Executive Summary: Architecture & Deployment (Five Lines)
Line 1 • INGESTION
Multi-Channel Inbound Gateway: Inbound leads from customer web portals, field DSA agents, and external APIs ingest securely via Nginx TLS 1.3 reverse proxy into the RupeeQ core and FinCRM ingress queues.
Line 2 • CORE ENGINE
Microservice Core & Storage: FinCRM operates as an asynchronous multi-threaded Python engine (ms_fincrm.py, Port 4008) backed by an atomic SQLite WAL database managing leads, applications, disbursals, and payouts.
Line 3 • LENDER BRIDGE
Multi-Channel Lender Integration: Specialized protocol adapters bridge top lending portals (Bajaj Finserv, Tata Capital, HDBFS, In-House) via API OAuth2, SSO credential sessions, and mobile OTP 2FA verification.
Line 4 • PAYOUT LEDGER
Lifecycle & Brokerage Settlement: The platform synchronizes lead progression through Bureau validation, sanction issuance, disbursal UTR generation, and automated brokerage payout ledger calculation with TDS deductions.
Line 5 • DEPLOYMENT
Cloud Infrastructure & Telemetry: Production is hosted on Google Cloud Platform (Debian 12 VM) as an auto-restarting systemd daemon (rupeeq-ms-fincrm.service) with automated health watchdogs, Let's Encrypt SSL, and inter-service RPC.
FinCRM Tiered System Architecture Blueprint

Pictorial vector schematic detailing traffic ingress, microservices coordination, and lender partner gateways.

HIGH FIDELITY VECTOR SPECIFICATION
TIER 1 • MULTI-CHANNEL INGESTION CLIENTS 🌐 RupeeQ Direct Web HTTPS Portal 💼 FinCRM Agent Portal fincrm.online 📱 Mobile Field DSA App Android / PWA 🔌 Partner B2B REST JSON API TIER 2 • NGINX HIGH-PERFORMANCE REVERSE PROXY & SSL TERMINATION (PORT 80 / 443) 🔒 Let's Encrypt TLS 1.3 / Strict SNI ⚡ fincrm.digitalharyana.online & rupeeq Host Routing 🛡️ Rate Limiter & DPDP Header Sanitizer FINCRM CORE MICROSERVICE (PORT 4008) ms_fincrm.py (Python 3.11) 📥 Ingestion & Intake Engine POST /api/fincrm/leads (201 Created) 📑 Application Tracker Sanctions, Rejections, Lifecycle 💸 Disbursal & UTR Manager Bank Account No & Disbursed Amount 💰 Brokerage Payout Ledger Gross Slab %, TDS (5%), Net Payable 🗄️ PERSISTENCE TIER • SQLite 3 WAL ENGINE (/data/ms_fincrm.db) • fincrm_leads (Borrower profiles, CIBIL, Loan products) • fincrm_applications (Multi-lender submissions, stages, ROI) • fincrm_payouts (Settlement UTR, broker slabs 1.75%–2.50%) • fincrm_sync_audit (Session health & sync timestamps) RPC RUPEEQ PLATFORM MESH SERVICES Core Engine Integration 📊 LMS Lead Core (:4003) 7 Data Zones & Lead Ingestion 🛡️ Identity & DPDP (:4001) CRIF/Experian & Consent Ledger 🏦 Lending Studios (:4002) 21+ Bank Product Policy Rules 📞 Vicidial Dialer (:4006) Telecalling & Customer Verification 🔄 CROSS-SERVICE RPC COORDINATION • Auto-syncs FinCRM intake leads into LMS Zone 1 (RAW_INCOMING) • Ingests bureau pull scores directly into underwriting matrix • Triggers outbound call alerts upon lead stage transitions • Synchronizes lead allocations with DSA territory managers TIER 4 • LENDER PORTAL INTEGRATION ADAPTERS & REVERSE BRIDGE Bajaj Finserv Ltd Code: BAJAJ_FINSERV Auth: OTP_2FA_MOBILE_BRIDGE Slab: 1.75% to 2.25% partners.bajajfinserv.in Tata Capital Ltd Code: TATA_CAPITAL Auth: SSO_PARTNER_CREDENTIALS Slab: 1.80% Flat channel.tatacapital.com HDB Financial Services Code: HDB_FINANCIAL Auth: API_OAUTH2_REST Slab: 2.00% Flat hdbfs.com/partners RupeeQ Speed Core Code: RUPEEQ_INHOUSE Auth: INTERNAL_RPC_DISPATCH Slab: 2.50% Premium rupeeq.digitalharyana.online
End-to-End Application Lifecycle Sequence Flow

Step-by-step chronological message exchange from Lead Intake to Commission Payout Settlement.

ZERO MERMAID • NATIVE VECTOR RENDERING
👤 Borrower / DSA 🌐 Nginx SSL (:443) ⚙️ FinCRM (:4008) 📊 LMS Core (:4003) 🔌 Partner Adapter 🏦 Lender Portal 1. POST /api/fincrm/leads (JSON Payload) 2. Proxy pass to 127.0.0.1:4008 Save DB 3. HTTP 201 Created (lead_id: L-BAJAJ-101) 4. POST /api/lms/leads (Sync Lead to Zone 1) Bureau Check CRIF: 768 5. Bureau Score & Lender Match (Bajaj / Tata) 6. Trigger QDE Lead Submission (Lender Code: BAJAJ) 7. Session Auth (OTP/2FA / Token Exchange) 8. Ingestion Success: lender_app_ref: BAJ-PL-882910 9. Webhook: SANCTIONED (Amt: ₹6,00,000, ROI: 12.25%) 10. Update stage: SANCTIONED in fincrm_applications 11. Disbursal Alert: LAN: BAJ-LA-90219 | UTR: CMS882910283 | Net: ₹5,88,000 Automated Payout Calc Gross: ₹12,000 | TDS: ₹600 | Net: ₹11,400 13. Settlement Ready: Brokerage Payout Voucher Generated
Deployment Infrastructure Stack
Cloud Provider & VM Google Cloud Platform (GCP Compute Engine)
Instance / Hostname digital-haryana-rupeeq (Debian GNU/Linux 12)
Public Static IP 34.63.201.248
Domain & SSL fincrm.digitalharyana.online (Let's Encrypt TLS 1.3)
Service Daemon rupeeq-ms-fincrm.service (Systemd Managed)
Runtime Environment Python 3.11 ThreadingHTTPServer (Port 4008)
Storage & Journal SQLite 3 with Write-Ahead Logging (WAL mode)
Web Document Root /home/sadahaqtrustrohtak3/rupeeq_platform/web
Systemd Unit Specification
[Unit]
Description=RupeeQ PAN-India Microservice (fincrm) - Port 4008
After=network.target

[Service]
Type=simple
User=sadahaqtrustrohtak3
WorkingDirectory=/home/sadahaqtrustrohtak3/rupeeq_platform
ExecStart=/usr/bin/python3 /home/sadahaqtrustrohtak3/rupeeq_platform/microservices/ms_fincrm.py
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
Status: Active (Running) Auto-Restart: Enabled RestartSec: 5s
FinCRM REST API Endpoint Catalog (:4008)
Method Endpoint Description Payload / Params Response
GET /api/fincrm/health Service health check and database connection status None {"status": "healthy", "service": "ms_fincrm"}
GET /api/fincrm/dashboard Aggregated metrics: leads, active apps, disbursals, brokerage None KPI summary & lender partner status list
GET /api/fincrm/leads Retrieve all ingested leads with CIBIL score & loan product None Array of FinCRM lead records
POST /api/fincrm/leads Intake new borrower lead and trigger LMS auto-sync {full_name, mobile, pan, loan_product, amount} {"success": true, "lead_id": "L-..."}
GET /api/fincrm/applications List multi-lender loan applications with sanction details None Array of application stages and ROIs
GET /api/fincrm/disbursals List executed loan disbursals with UTR & account numbers None Array of disbursal records
GET /api/fincrm/payouts List calculated brokerage payouts and settlement vouchers None Payout ledger: Gross, TDS, Net Payable
POST /api/fincrm/sync/trigger Manually trigger partner portal scraping / API sync cycle {"lender_code": "BAJAJ_FINSERV"} {"success": true, "records_fetched": 4}