Cosmic Module
O
Qubits of DPK
March 23, 2026
Core Open Source
What This Module Is (Big Picture)
The document module manages files uploaded into the banking system.
Financial institutions often require supporting documents for operations such as:
- loan applications
- client verification
- identity validation
- collateral documentation
This module allows the system to:
- upload documents
- store document metadata
- attach documents to entities
- retrieve or delete documents
Entities that may have documents include:
- clients
- loans
- groups
- offices
- accounts
Layman Example
A customer applies for a loan.
The bank requires the following documents:
- ID proof
- address proof
- income statement
The documents are uploaded into the system and attached to the loan or client record.
The fineract-document module manages this file storage and linking.
Where the Code Lives
Key Package
org.apache.fineract.infrastructure.document
Responsibilities include:
- uploading files
- storing document metadata
- linking documents to entities
- retrieving and deleting documents
Core Domain Entity:
Document.java
Path
fineract-document/src/main/java/org/apache/fineract/infrastructure/document/domain/Document.java
This entity represents a document stored in the system.
Key fields on
Document
Document Storage Model
Documents consist of two parts:
- #File storage
- #Document metadata
Example
This separation allows the system to manage documents efficiently.
Example Document Upload Code
plain text
QUBITS OF DPK
This method creates a document record and links it to an entity.
Linking Documents to Entities
Documents can be attached to multiple entity types.
Examples
This is handled through:
entityType
entityId
API Layer
Main controller
DocumentsApiResource
Example endpoints
plain text
QUBITS OF DPK
These APIs allow administrators to:
- upload documents
- retrieve documents
- delete documents
- list documents linked to entities
Read Services
Read services retrieve document information.
Examples include:
- retrieving documents for an entity
- retrieving document metadata
- retrieving document file paths
These services are used when users view document attachments.
Write Services
Write services manage document uploads and updates.
Responsibilities include:
- uploading documents
- attaching documents to entities
- deleting documents
- updating document metadata
Repository Layer
Exceptions
These ensure document operations remain valid.
How It All Connects (Full Flow)
Example: Uploading a client document
plain text
QUBITS OF DPK
Why This Module Matters
The document module helps financial institutions:
- maintain compliance records
- store customer verification documents
- manage loan paperwork
- keep audit trails
Document management is critical for KYC (Know Your Customer) and regulatory compliance.
One-Sentence Summary
fineract-document manages file uploads and document attachments for entities such as clients, loans, and accounts within the system.