01
FluxusforgeLive in Production

Building India's NBFC Infrastructure from Scratch

How I architected 500+ APIs, 15 dashboards, and achieved 99.99% uptime for a regulated financial platform.

Duration

18 months

Team

1 Architect (me) + 3 Engineers

Role

Sole Technical Architect & Lead Developer

500+
APIs Built
RESTful endpoints covering every NBFC operation
99.99%
Uptime
Measured over 12 months in production
<200ms
Response Time
P95 API response time under load
15
Dashboards
CRM, LOS, LMS, HR, Admin, Customer portals
8
Integrations
Payment, KYC, Credit Bureau, Communication
10K+
Daily Transactions
Loan applications, payments, collections

Overview

Fluxusforge is the complete technology backbone for modern NBFCs in India. I designed and built every layer — from database schemas to deployment pipelines. The platform handles loan origination, credit decisioning, collections, compliance reporting, and payment processing for thousands of daily transactions.

The Challenge

Indian NBFCs operate under strict RBI regulations with zero tolerance for downtime or data loss. The existing solutions were either too expensive ($50K+/month) or too rigid to customize. We needed a platform that could handle 10,000+ concurrent loan applications, integrate with 8+ third-party services (credit bureaus, payment gateways, KYC providers), and maintain audit trails for every single transaction — all while being built from day one to handle regulatory changes.

The Solution

I designed a microservices-inspired monolith (pragmatic architecture) using Node.js + Express with MongoDB (AWS DocumentDB) as the primary store. The key insight was building an event-driven audit system that logs every state change, making compliance reporting trivial. I created a modular integration layer that abstracts away third-party APIs behind unified interfaces, so switching from one credit bureau to another takes hours, not weeks.

Impact

Reduced NBFC technology costs by 70% compared to off-the-shelf solutions
Processing 10,000+ loan applications daily with <200ms API response times
Zero critical security incidents since launch
Automated 85% of compliance reporting that was previously manual
Cut loan disbursement time from 48 hours to 15 minutes

System Architecture

A pragmatic microservices-inspired monolith designed for regulated financial services.

1
Client Layer
Next.js 15 (Landing)React 19 + Vite (CRM)WebView (Mobile)
2
CDN & Edge
CloudFrontS3 Static HostingRoute 53
3
API Gateway
Express.jsJWT AuthRate LimitingCORS
4
Business Logic
50+ ControllersCredit EngineRisk ScoringEMI Calculator
5
Integration Layer
RazorpayCRIFSurePass KYCMSG91WhatsApp
6
Data Layer
MongoDB (DocumentDB)Redis (BullMQ)S3 Documents
7
Infrastructure
AWS ECSDockerGitHub Actions CI/CDTerraform

Tech Stack

Backend

Node.js 20Express.jsES ModulesBull Queue

Database

AWS DocumentDB (MongoDB)RedisS3

Frontend

Next.js 15React 19ViteTailwind CSS

Infrastructure

AWS ECSECRCloudFrontDockerTerraform

Integrations

RazorpayCRIF/EquifaxSurePassMSG91Evolution API

DevOps

GitHub ActionsPM2Docker ComposeCloudWatch

Development Timeline

Phase 1: Foundation

Months 1-3

Core architecture, auth system, database design

Phase 2: Loan Engine

Months 4-7

Complete loan origination and management system

Phase 3: Integrations

Months 8-11

Third-party services and payment infrastructure

Phase 4: Scale & Optimize

Months 12-18

Performance optimization, compliance, and dashboards

Code Highlights

Event-Driven Audit System

Every state change is captured automatically for RBI compliance

javascript
1// Middleware that captures every mutation for audit
2const auditMiddleware = (modelName) => {
3  return function(next) {
4    const original = this.toObject();
5    this.$locals.auditTrail = {
6      model: modelName,
7      action: this.isNew ? 'CREATE' : 'UPDATE',
8      before: original,
9      timestamp: new Date(),
10      userId: this.$locals.currentUser,
11      ip: this.$locals.clientIP,
12    };
13    next();
14  };
15};
16
17// Applied to every model automatically
18const models = ['Loan', 'Payment', 'Customer', 'Application'];
19models.forEach(m => {
20  mongoose.model(m).schema.pre('save', auditMiddleware(m));
21});

Unified Integration Layer

Abstract third-party APIs behind consistent interfaces

javascript
1class IntegrationLayer {
2  constructor() {
3    this.providers = {
4      kyc: new SurePassProvider(),
5      credit: new CreditBureauProvider(), // CRIF or Equifax
6      payment: new RazorpayProvider(),
7      sms: new MSG91Provider(),
8    };
9  }
10
11  async verifyIdentity(type, data) {
12    const provider = this.providers.kyc;
13    const result = await provider.verify(type, data);
14
15    // Log every verification for compliance
16    await AuditLog.create({
17      type: 'KYC_VERIFICATION',
18      provider: provider.name,
19      status: result.verified ? 'SUCCESS' : 'FAILED',
20      metadata: { type, timestamp: new Date() },
21    });
22
23    return result;
24  }
25}

Credit Decisioning Pipeline

Multi-stage credit assessment with configurable rules

javascript
1async function creditDecision(application) {
2  const pipeline = [
3    // Stage 1: Identity verification
4    async (app) => {
5      const kyc = await verifyKYC(app.pan, app.aadhaar);
6      return { ...app, kycScore: kyc.score, kycVerified: kyc.verified };
7    },
8    // Stage 2: Bureau pull
9    async (app) => {
10      const bureau = await pullCreditReport(app.pan);
11      return { ...app, creditScore: bureau.score, tradelines: bureau.tradelines };
12    },
13    // Stage 3: Risk scoring
14    async (app) => {
15      const risk = calculateRiskScore(app);
16      return { ...app, riskScore: risk, riskCategory: categorize(risk) };
17    },
18    // Stage 4: Auto-decision
19    async (app) => {
20      const decision = app.riskScore > 700 ? 'APPROVED' :
21                       app.riskScore > 500 ? 'MANUAL_REVIEW' : 'REJECTED';
22      return { ...app, decision, decidedAt: new Date() };
23    },
24  ];
25
26  return pipeline.reduce(
27    (promise, stage) => promise.then(stage),
28    Promise.resolve(application)
29  );
30}

Continue Exploring