Hi everyone,

My name is Eyad Sharkawy, and I am preparing a 350-hour (Large) GSoC 2027
proposal focused on modernizing the codebase and reducing technical debt in
Apache Fineract.

Over the past few months, I have contributed across both the backend and
frontend, including:
- FINERACT-3200 <https://issues.apache.org/jira/browse/FINERACT-3200> (PR
#6849 <https://github.com/apache/fineract/pull/6849>): Decoupling lock-in
period calculation out of SavingsAccount into
SavingsAccountLockPeriodCalculator.
- FINERACT-848 <https://issues.apache.org/jira/browse/FINERACT-848> (PR
#6405 <https://github.com/apache/fineract/pull/6405>) & Mifos WEB-1358
<https://mifosforge.jira.com/browse/WEB-1358> (PR #4169
<https://github.com/openMF/web-app/pull/4169>): Custom interest rate chart
overrides for deposit accounts.
- FINERACT-1283 <https://issues.apache.org/jira/browse/FINERACT-1283> (PR
#6714 <https://github.com/apache/fineract/pull/6714>) & FINERACT-817
<https://issues.apache.org/jira/browse/FINERACT-817> (PR #6365
<https://github.com/apache/fineract/pull/6365>).

BACKGROUND & PROPOSAL SCOPE

As part of the ongoing effort in Apache Fineract to keep JPA entities
focused on persistence and state management by moving complex calculations
and business rules into dedicated domain services/calculators (and
following the pattern validated in  FINERACT-3200
<https://issues.apache.org/jira/browse/FINERACT-3200>), I am looking to
tackle the calculation logic currently concentrated in the savings and
deposit entities.

Currently, SavingsAccount.java (~3,700 lines) mixes persistence state with
daily balance aggregations, compound-interest formulas, overdraft
calculations, and tax withholding. In addition, FixedDepositAccount and
RecurringDepositAccount still hold maturity and pre-closure penalty
calculations inside fineract-provider rather than fineract-savings.

Building on the precedent merged in  FINERACT-3200
<https://issues.apache.org/jira/browse/FINERACT-3200>, my proposed 350h
GSoC project aims to:
1. Decouple Daily Balance, Interest Calculation/Posting, and Overdraft
calculations from SavingsAccount into stateless, isolated domain
calculators with fast JUnit 5 unit tests (and eliminate duplicated
calculation loops between SavingsAccount and
SavingsAccountInterestPostingServiceImpl).
2. Extract maturity and pre-closure penalty calculations from
FixedDepositAccount and RecurringDepositAccount into stateless calculators.
3. Map and decouple provider-level dependencies on FixedDepositAccount /
RecurringDepositAccount to prepare or execute their move from
fineract-provider into fineract-savings.

QUESTIONS FOR THE COMMUNITY

1. Pattern: Do you agree with continuing the  FINERACT-3200
<https://issues.apache.org/jira/browse/FINERACT-3200>   delegation pattern
(keeping existing entity methods backward-compatible while delegating
math/date logic to stateless calculator classes)?
2. Package Structure: Should new calculators live directly under
`org.apache.fineract.portfolio.savings.domain` alongside
`SavingsAccountLockPeriodCalculator`, or in a dedicated subpackage such as
`.domain.calculation`?
3. Dependencies: Since JPA entities are not Spring-managed beans, keeping
calculators as stateless POJOs (instantiated or passed cleanly without
Spring context dependencies) keeps unit tests fast and isolated. Are there
any objections or specific conventions you prefer here?
4. Modularization Scope: For a 350h timeline, does decoupling
Fixed/Recurring Deposit calculations and preparing their migration from
fineract-provider into fineract-savings align with current module
boundaries?
5. Mentorship: Would anyone on the PMC/committer team be interested in
mentoring or co-mentoring this scope for GSoC 2027?

I would greatly appreciate any architectural feedback or recommendations!

Best regards,
Eyad Sharkawy
GitHub: https://github.com/Eyad-Sharkawy

Reply via email to