Architect Solution for Loan Origination System
Hi, mediumers! I'm very excited to share with you guys solution architect of Load Origination System
Use Case
Make Load Origination app that can be used in multiplatform which means for mobile and web (no desktop need)
What is Load Origination?
Before we carry this, we have to get mind in the same page, so
Loan origination is the process by which a borrower applies for a new loan, and a lender processes that application. Origination generally includes all the steps from taking a loan application up to disbursal of funds (or declining the the application)
I think you all know it now, so let's deep dive to make a solution for this
because I’m human, if you have any thoughts please lemme know by comment this article
also if you like it, please applause as much as you can ok? hahaha
Architect Goals
The goals of this architect
- Achieve business goals
- Easy to be scaled as needed (Codebase and Infra)
- Cost Efficient (Team and Infra)
- DX is priority
Architecture Overview
let’s see how we implement this solution
(I think layers need to be updated however this is still relevant, I will update soon!)
Architecture Layers
We need to explain all layers including the reason
User Interface (UI) Layer
for efficiency, we develop cross-platform applications only in a single codebase but will make the cross-platform output
- Web Application:
Developed a responsive, interactive user experience. - Mobile Application:
Carryout Web App Project to develop with Web Application
Application Layer
Frontend
- VueJS
base framework to provide the platform
see https://vuejs.org/ - NuxtJS
Vuejs Framework and Standard Design Pattern to make sure all developers easy to follow and development
see https://nuxt.com/docs/getting-started/introduction - CapacitorJS
Mobile App Container for Web Development ( also supports any kinda native interactive like Bluetooth when needed )
see https://capacitorjs.com/ - Pinia
For state management to make a reusable state that makes development faster
see https://pinia.vuejs.org/introduction.html - Vuetify
For UI standards, UI patterns, ready components, and blueprints standards to make sure all developers easy to follow and develop and easy implementation
see https://vuetifyjs.com/en/introduction/why-vuetify/ - OpenAPI to Typescript
To make it easy to interact with the backend, this output will be SDK generated by open API JSON format
see https://www.npmjs.com/package/swagger-typescript-api
Backend:
- NestJS
For creating a scalable and maintainable API with TypeScript.
see https://docs.nestjs.com/ - Open API
For API documentation make sure frontend understand every API and response result
see https://docs.nestjs.com/openapi/introduction
Business Logic Layer
- Loan Processing Engine
Handles the core loan origination logic. - Workflow Automation
Orchestrates various steps like application submission, document verification, credit scoring, and approval. - Rule Engine
Manages business rules for loan eligibility, risk assessment, and compliance.
Integration Layer
- Microservices
Implemented with Docker containers, managed by Kubernetes for scalability. - API Gateway
Using nginx to balance request load using the default balancer strategy which is robbin - Credit Bureaus:
to get a borrower credit score
see: https://cbclik.com/id/about-us/ - Payment Gateways:
to receive payment from the borrower on the browser or mobile
see: https://www.xendit.co/id/products/metode-pembayaran/ - Document Verification Services:
For KYC (Know Your Customer) compliance to manage documents of borrower
see: https://digisign.id/idn-tandatangan-elektronik.html
Data Layer
- MySQL
Primary relational database with replication for high availability. - Redis
For caching frequently accessed data to improve performance.
Security Layer
- Authentication
Using OAuth2 and JWT for secure user authentication. - Authorization
Role-based access control (RBAC) to manage user permissions. (ex: user:read, user:delete) - Data Encryption
Encrypting sensitive data at rest and in transit using SSL/TLS.
DevOps Layer
- CI/CD Pipeline
GitHub Actions for continuous integration and delivery. - Infrastructure as Code
AWS CloudFormation for managing infrastructure, and we can commit YMAL file on git if needed - Logstash
transform any log from service to elastic search within structured data, also log stash is supported by many protocols
see https://www.elastic.co/logstash - Elastic Agent
to get all logs from K8s to Elasticsearch
see https://www.elastic.co/elastic-agent - Elasticsearch
Semi-structured and document-oriented database for fast and complex logging finder many Log visualization can support it like Kibana, Gravana and more so when we have done with Kibana because some reason, we can change it - Kibana
for log visualization, Kibana is “priority support” that makes sure Kibana can give us the best performance and is easy to start with, my recommendation is to use this when wanna get started without any requirements like: “Our businessman wanna see log dashboard”
Architecture Service
for this solution we use AWS Cloud as our cloud service, here’s a list of products that we use for this case
- VPS with EC2
For hosting application servers. - Cloud Storage with S3
For storing documents, media, and even log backup - Database with RDS
Managed MySQL database service
see https://aws.amazon.com/rds/ - Worker with AWS Lambda
For serverless functions handling specific tasks.
see https://aws.amazon.com/pm/lambda/ - Elasticsearch and Kabana with AWS OpenSearch Service
For a scalable and cost-effective solution
see https://aws.amazon.com/opensearch-service/
Conclusion
(in progress)
Please give applause if you like it and comment to let me know if this article is useful for you also we can discuss it!