← All projects
🏦
CompletedIO2i Outsourcing Pvt. Ltd. · 2026

B2B Financial Institution Portal

Multi-tenant ODR dashboard for banks and NBFCs

Python 3FastAPIPydanticHTTPXRustLeptosWebAssemblyDockerNginxPrometheusHMAC SHA-256

B2C → B2B migration

Architecture

0 case records

Local storage

Cryptographic per-tenant

Isolation

Docker + Nginx + Prometheus

Deployment

Where Resolution Desk serves borrowers, this portal serves the other side — the banks, NBFCs, and clients who initiate and manage arbitration proceedings. A fully multi-tenant B2B gateway: institutional users manage large case portfolios with cryptographic data isolation between tenants. One Docker deployment serves all institutions via host-based routing and Nginx.

Initial Thought

Multiple financial institutions needed to manage their arbitration portfolios through IO2i's platform — but running separate deployments per institution was operationally unsustainable. A single codebase needed to securely serve N institutions with complete data isolation and no shared state between tenants.

Turning Point

A dynamic multi-tenant architecture where the application resolves the institution from the incoming host header, loads that institution's credentials from a cryptographically-verified registry, and uses those credentials exclusively for all upstream data calls. Each institution sees only their own data — not because of database-level row filtering, but because the API keys injected into every outbound request are strictly bound to that institution.

Architecture

The Dynamic Tenant Registry (tenant_registry.py) periodically contacts a Central Authority using HMAC SHA-256 timestamped signatures and receives an encrypted payload of all active tenant credentials. FastAPI middleware reads X-Tenant-Host on every request and loads the matching TenantConfig into a Python ContextVar. The lwt_api_client pulls from this context to sign all outbound HTTPX requests to upstream Frappe servers. Prometheus metrics and JSON-structured logs (observability.py) capture every request with a UUID trace ID.

Outcome

Multiple financial institutions now run on the same codebase with cryptographic isolation. The B2C-to-B2B migration preserved the entire borrower-facing Resolution Desk while adding the full institutional layer on top. The observability layer gives full request tracing and real-time Prometheus dashboards in production.