Cosmic Module
O
Qubits of DPK
March 23, 2026
Core Open Source
Connection to Your PRs
PR #5668 (LoanWithdrawnByApplicantIntegrationTest) tests the withdrawal state transition in this module. PR #5670 (ClientLoanAccountLockIntegrationTest) tests the COB lock mechanism in this module.
What This Module Is (Big Picture)
The loan module is the heart of the banking system.
Most financial institutions using Fineract primarily operate as lenders. This module manages the entire lifecycle of loans.
That lifecycle includes:
- loan application
- loan approval
- loan disbursement
- repayment schedule generation
- installment tracking
- interest calculation
- delinquency handling
- loan closure
Layman:
Imagine a bank employee processing a loan.
Steps:
- #Customer applies for a loan
- #Bank approves the loan
- #Money is disbursed
- #Customer repays monthly installments
- #System tracks payments and interest
The loan module automates all of this.
Where the Code Lives
Loan functionality spans multiple modules.
Layman:
- fineract-loan = loan department
- fineract-core = financial tools and rules
- fineract-provider = staff executing loan operations
- fineract-accounting = ledger system recording transactions
Key Package 1:
org.apache.fineract.portfolio.loanaccount
This package manages loan accounts.
The Main Entity:
Loan.java
Path
plain text
QUBITS OF DPK
This is the central domain entity representing a loan account.
Layman — JPA Entity:
Each Loan object represents one
Key fields on
Loan
Key methods inside
Loan.java
java
QUBITS OF DPK
Layman Explanation
These methods represent the real actions performed during the loan lifecycle.
Example:
- approve() → bank approves the loan
- disburse() → money is sent to borrower
- makeRepayment() → borrower pays installment
- generateSchedule() → system calculates payment schedule
The Important Idea: Loan Lifecycle
Loans follow a state machine.
java
QUBITS OF DPK
Layman:
Just like a real bank, the loan moves through stages from application to final repayment.
DTO Layer:
LoanData.java
Path
java
QUBITS OF DPK
This DTO represents loan information sent to APIs or UI.
Layman:
This is the
Key fields in
LoanData
java
QUBITS OF DPK
This object allows the UI to show:
- loan details
- repayment schedule
- outstanding balance
Key Package 2: API Layer
LoansApiResource.java
Path
java
QUBITS OF DPK
This is the REST controller for loan operations.
Layman:
This class receives requests from mobile apps, web dashboards, or integrations asking to create or manage loans.
Key endpoints
java
QUBITS OF DPK
Layman:
These endpoints allow the system to:
- create loans
- approve loans
- disburse funds
- record repayments
- close loans
Key Package 3: Read Services
LoanReadPlatformService
Paths
java
QUBITS OF DPK
This service handles loan queries.
Key read operations
java
QUBITS OF DPK
Layman:
This service retrieves loan data from the database so the system can display loan details.
Key Package 4: Write Services
LoanWritePlatformService
Paths
java
QUBITS OF DPK
Handles loan modifications.
Key write operations
java
QUBITS OF DPK
Layman:
These methods represent real banking operations.
For example:
- create loan record
- approve application
- send funds
- track repayments
Repayment Schedule Generation
One of the most important parts of the loan module is generating the repayment schedule.
Example simplified schedule logic:
java
QUBITS OF DPK
Technical Explanation
This method:
- #Calculates monthly interest
- #Calculates installment amount
- #Creates installment objects
- #Generates the repayment schedule
Layman Explanation
If someone borrows:
- ₹10,000
- for 10 months
The system calculates:
- monthly payment
- interest portion
- principal portion
Then builds the payment schedule.
Command Handlers
Path
java
QUBITS OF DPK
Key handlers include:
java
QUBITS OF DPK
Layman:
Each loan action has its own handler to keep the system modular.
Repository and Data Access Layer
Exceptions
Layman:
These errors prevent invalid loan operations.
How It All Connects (Full Flow)
Example: Customer applies for a loan.
java
QUBITS OF DPK
Layman:
The system validates the loan request, creates the loan account, generates the repayment schedule, stores it, and returns the loan ID.
Why This Module Matters to the Rest of Fineract
Many modules interact with the loan module.
Examples:
- fineract-portfolio → links loans to clients
- fineract-group → supports group loans
- fineract-accounting → records loan transactions in GL
- fineract-reporting → generates loan performance reports
Layman:
The loan module is the
One-Sentence Layman Summary
fineract-loan manages the entire lifecycle of loans — from application and approval to disbursement, repayment tracking, and final closure.