Ahmed - Thanks for your ideas and posting those links. What may be missing is the context. We've long struggled with this dynamic of "its easier to add than to refactor". This led to a project called Fineract-CN which was intended to "re-platform" on a microservices architecture. Unfortunately, we had to formally abandon the Fineract-CN (Microservices) architecture over a year ago for lack of progress.
So, instead the ideas today are more about modularity of the code within the existing Fineract. This is a work in progress. Those videos speak to that mostly. In any project, there is always a tension between "starting over" and "fixing the code debt". Neither strategy works 100% of the time - for Fineract, the "start over" idea was called Fineract-CN and unfortunately, after five years there was no formal release and no progress. So, we are now on the Fixing the Code Debt approach. In an apache project, the first place to look is the Listserv. ... search for "microservices" on https://lists.apache.org/list.html?dev@fineract.apache.org. the listserv is the authoritative channel for all discussions about the project. Secondly, the project uses Significant Improvement Proposals to organize major areas of work. https://cwiki.apache.org/confluence/display/FINERACT/Fineract+Significant+Improvement+Proposals. You will also find that archive of Fineract-CN which is now in the "attic" at Apache. This is deprecated content. https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=66851897 This is context and represents hundreds (if not thousands) of hours of work and still was unable to get to a formal release. On Sun, Apr 20, 2025 at 1:21 PM James Dailey <jamespdai...@gmail.com> wrote: > [ There is a slack channel hosted on Mifos.slack.com called #Fineract. > There are 368 participants on that channel and so it is a place where > people are having discussions. My note to the host is to make sure content > makes it back to the list if it is of broad interest... ] > > A recent thread is perhaps useful to capture here for the listserv > archive. It starts with Ahmed making a summary and asking questions... I > then follow up. > > > ================ > FROM AHMED : > Hi contributors > As part of my journey to understand *Fineract's codebase and workflow*, I > found the following videos which helped me to understand multiple things, > and found it useful to share, already will help anyone . > > - Modularizing Fineract <https://youtu.be/8qp3zQGh5s4> > - Monolith to Microservices: Modularizing Fineract 1.x > <https://youtu.be/fn9uhpOWrHk> > - Expanding Fineract capabilities <https://youtu.be/sfp7ox3wMKk> > > *I took some notes here, but for sure the videos are much more valuable.* > > - As the Fineract community and codebase grew over time, the > monolithic architecture introduced natural scalability challenges. Core > domain classes, such as Loan.java (exceeding *7,000 lines of code*) > fineract is monolithic not microservices architecture but it's well > structure. > - For that, the need for modularity and separation comes into the > scene, check this Picture > > <https://martinfowler.com/bliki/images/microservice-verdict/productivity.png> > . > - The flow of the application goes as follows: > - External clients (web/mobile apps) send HTTP requests to the > Fineract backend. > - API layer (RESTful APIs developed with JAX-RS) receives the > request > - When receiving PUT or POST requests the attached JSON is stored > as a string blob and is converted manually with GSON library to Java > POJO. > - A portion of the requests are translated into commands. > - The commands are related to CQRS pattern for separation between > Reads & Writes. (e.g. GLAccountReadPlatformService and > GLAccountWritePlatformService) > - The commands go to a spring injectable service for command > processing (handler packages) which delegates the command to the service > layer where business logic resides. > - All The execution flow happens synchronously. > - Check this image > > <https://github.com/apache/fineract/assets/87117386/d66494ec-41b2-467d-9ba3-4c6de7a4f2a0> > - The code structure consists of 12 top-level > > <https://github-production-user-asset-6210df.s3.amazonaws.com/87117386/311600210-c11b5493-b0f4-4973-ab4b-dbe01e7c5e31.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20250420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250420T015137Z&X-Amz-Expires=300&X-Amz-Signature=1679e4b6964f4fab1c740a89d04da7cce4ea176f1cbe4558c49ee0ac48f491b4&X-Amz-SignedHeaders=host> > . > - Identifiable patterns in the codebase: > - api : The API layer that receives the client requests and is > implemented with JAX-RS, which exposes some end-points that the client > communicates with. > - data : The *Data Transfer Objects* which encapsulates the data > and transports it among different parts of the application which use > Spring > Data *JPA *(e.g. LoanRepository). > - domain : Contain JPA/Hibernate (e.g., Loan, Client) entities that > map between database tables and java classes. > - serialization : responsible for de/serializing between *JSON* files > and java *POJO*s > - exception : hold the project exceptions. > - utility : some utility classes that contain some reusable code. > - handler : delegate the commands to the suitable service. > - mapper : contains the mapper classes that are responsible for > mapping between entities and DTOs. > - service : the service layer which contain the business logic. > > Finally, these insights are personal effort (any feedback would be > appreciated). > What about my suggestions ? > I recommend watch the videos and read documentation > <https://fineract.apache.org/docs/current/> where you will find more info > about the history and the challenges for scalability and consistency and > how they have been tackled > thanks for your attention. > [image: YouTube] <https://www.youtube.com/>YouTube > <https://www.youtube.com/> | The ASF > <https://www.youtube.com/@communityovercode> > Modularizing Fineract: The journey so far <https://youtu.be/8qp3zQGh5s4> > <https://youtu.be/8qp3zQGh5s4> > [image: YouTube] <https://www.youtube.com/>YouTube > <https://www.youtube.com/> | The ASF > <https://www.youtube.com/@communityovercode> > Monolith to Microservices: Modularizing Fineract 1.x - A. Vidakovic, N. > Ambali, I. Molnar, V. Romero <https://youtu.be/fn9uhpOWrHk> > <https://youtu.be/fn9uhpOWrHk> > [image: YouTube] <https://www.youtube.com/>YouTube > <https://www.youtube.com/> | The ASF > <https://www.youtube.com/@communityovercode> > Expanding Fineract capabilities, a practical example - Frank Nkuyahaga > <https://youtu.be/sfp7ox3wMKk> > <https://youtu.be/sfp7ox3wMKk> > (105 kB) > > > >