How openmf/community-app works
Project Type and Purpose
• This is a frontend UI application (“community-app”) that exposes the functionalities of the Mifos X platform to end-users.
• Its purpose is to provide a rich SPA interface that interacts with a separate backend Fineract provider (via REST APIs). It uses AngularJS along with auxiliary libraries such as Bootstrap and Font Awesome.
File Structure to Architectural Components
• The “app” folder holds all the client-side logic:
• The “angular” folder (and many “controllers”, “directives”, “filters”, “services”, “models”, “modules”, “routes”) shows that the application adheres to an MVC or MVVM-like pattern.
• “views” contains HTML templates that are rendered by Angular based on routing.
• “styles”, “styles-dev”, and fonts indicate the presentation layer that uses Bootstrap and custom SCSS.
• Configuration files like “UIconfig.json”, “Gruntfile.js”, “bower.json”, etc. indicate build and dependency management.
• External assets (images, fonts) and internationalization support (i18n and global-translations) are also present.
• The Dockerfile, Travis config, and CI/CD files point to automated builds, testing, and deployment pipelines.
Key Components
a. Client (Browser):
• That the application is loaded via ‘index.html’ and relies on AngularJS.
b. AngularJS Application Shell:
• “Main Controller”, “Routing”, “Modules”, and “Services” that manage the UI state.
• Denote the “controllers” (grouped by features like client, loans, deposits, accounting, etc.), “directives”, “filters”, and “views” as sub-components.
c. Communication Layer:
• REST API client modules (AuthenticationService, ResourceFactoryProvider, HttpServiceProvider, SessionManager, etc.) which facilitate communication with the Fineract backend.
• Use of query parameters such as baseApiUrl and tenantIdentifier for API endpoint configurations.
d. External Services and Build Tools:
• That the Docker image builds the app and deploys it on Nginx within a container (as defined by the Dockerfile).
• Integration with OAuth2 settings as a configurable module (via configurations.js).
e. Integration with Mifos X / Fineract Backend:
• That the angular app interacts with a remote Fineract backend (even though it’s not in the same repository, the integration is essential for the overall system).
Architectural Patterns and Design Principles
• SPA design pattern where a single HTML page is used alongside AngularJS to dynamically update content.
• Pattern separation such as MVC/MVVM: Controllers and directives encapsulate UI behavior, while services manage API integration.
• Modularity – various functional areas (clients, loans, products, accounting, organization, etc.) are separated into individual subfolders in controllers and views.
• The build system (Grunt, Bower) and automated tests (unit and functional tests under the “test” folder) should be indicated as supporting components.
• Start from a high-level view:
• Within the “UI” layer:
• “Modules” that are set up to manage features like accounting, client management, loan products, savings, and system configurations.
• External interactions:
• A note on the API endpoint configuration and how the app is configurable to target different backend URLs.
• On the periphery, include components representing the build and deployment environment (e.g., Grunt tasks, Docker container deployment to Nginx).
Final Touches
• Clear labels (for example, “Authentication Service”, “Session Manager”) to demonstrate which modules facilitate communication with the backend.