# rajendraprasathfern/nexus-lme architecture

> Architecture diagram of the GitHub repository rajendraprasathfern/nexus-lme, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rajendraprasathfern/nexus-lme
- Repository: https://github.com/rajendraprasathfern/nexus-lme

## Overview

#### Purpose and Platform
This is a Salesforce DX source repository for the Nexus_LME lending-management application. It is deployed into Salesforce, where custom objects, declarative Flows, Apex, Lightning Web Components (LWC), tabs, permissions, and a Lightning app compose the runtime. The supplied README is the stock SFDX guide; the metadata defines the actual product.

#### User Entry Points
The Lightning application and exposed custom-object tabs provide the principal UI surface:
- `force-app/main/default/applications/Nexus_LME.app-meta.xml`
- `force-app/main/default/tabs/Application__c.tab-meta.xml`
- `force-app/main/default/tabs/Financial_Account__c.tab-meta.xml`

A utility bar is configured for the app at `force-app/main/default/flexipages/Nexus_LME_UtilityBar.flexipage-meta.xml`. Access is governed through `force-app/main/default/permissionsets/Nexus_User.permissionset-meta.xml`.

#### Lending Domain Model
`Account` is the customer/borrower identity, augmented with business fields such as tier and year started. A loan application belongs to an Account and captures requested amount, term, purpose, and status:
- `force-app/main/default/objects/Account/Account.object-meta.xml`
- `force-app/main/default/objects/Application__c/Application__c.object-meta.xml`
- `force-app/main/default/objects/Application__c/fields/Account__c.field-meta.xml`

Supporting financial disclosures—income, liabilities, and assets—relate to Accounts and/or Applications, forming the underwriting input boundary:
- `force-app/main/default/objects/Income__c/Income__c.object-meta.xml`
- `force-app/main/default/objects/Liability__c/Liability__c.object-meta.xml`
- `force-app/main/default/objects/Asset__c/Asset__c.object-meta.xml`

#### Application Intake and Financial Capture
The loan-application Flow orchestrates declarative application creation/update. A dynamic LWC provides configurable financial-data entry and is the main custom client-side implementation:
- `force-app/main/default/flows/Laon_Application_Flow.flow-meta.xml`
- `force-app/main/default/lwc/dynamicFinancialsForm/dynamicFinancialsForm.js`
- `force-app/main/default/lwc/dynamicFinancialsForm/dynamicFinancialsForm.js-meta.xml`

The LWC-to-Apex boundary is represented by the financial service and its wrapper/DTO class:
- `force-app/main/default/classes/FinancialService.cls`
- `force-app/main/default/classes/FinancialWrapper.cls`

#### Account Origination and Transactions
Approved/processed applications lead to `Financial_Account__c`, linked to both borrower Account and Application. It carries loan principal, current balance, rate, disbursement, repayment, fee, and accrued-interest totals:
- `force-app/main/default/objects/Financial_Account__c/Financial_Account__c.object-meta.xml`
- `force-app/main/default/objects/Financial_Account__c/fields/Application__c.field-meta.xml`
- `force-app/main/default/flows/Financial_Account_Creation_FLow.flow-meta.xml`

Transactions are linked to financial accounts and record amount, date, type, and notes. The transaction Flow is the declarative transaction entry/orchestration path:
- `force-app/main/default/objects/Transaction__c/Transaction__c.object-meta.xml`
- `force-app/main/default/objects/Transaction__c/fields/Financial_Account__c.field-meta.xml`
- `force-app/main/default/flows/Create_Transaction_Flow.flow-meta.xml`

#### Interest Processing
Interest rates can be supplied by centrally stored loan configuration, while account-level cumulative interest and balances are persisted on financial accounts:
- `force-app/main/default/objects/Loan_Configuration__c/fields/Default_Interest_Rate__c.field-meta.xml`
- `force-app/main/default/objects/Financial_Account__c/fields/Interest_Rate__c.field-meta.xml`
- `force-app/main/default/objects/Financial_Account__c/fields/Total_Interest__c.field-meta.xml`

Daily processing is split between a scheduled/declarative job Flow and bulk-capable Apex batch logic:
- `force-app/main/default/flows/Daily_Interest_Job.flow-meta.xml`
- `force-app/main/default/classes/InterestCalculationBatch.cls`

This boundary is important: UI and Flows initiate record-oriented business processes; Apex batch execution handles scalable recurring interest calculations within Salesforce governor limits.

#### Delivery Model
Source follows Salesforce metadata packaging under `force-app/main/default`, with org/project definitions in `sfdx-project.json` and scratch-org configuration in `config/project-scratch-def.json`. Salesforce is the persistence layer, workflow runtime, identity/authorization provider, and job-execution infrastructure; no external integrations are evident in the repository tree.

Main entry points: [`force-app/main/default/objects/Financial_Account__c/Financial_Account__c.object-meta.xml`](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Financial_Account__c/Financial_Account__c.object-meta.xml) (Financial Account), [`force-app/main/default/objects/Application__c/Application__c.object-meta.xml`](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Application__c/Application__c.object-meta.xml) (Loan Application), [`force-app/main/default/applications/Nexus_LME.app-meta.xml`](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/applications/Nexus_LME.app-meta.xml) (Nexus LME App), [`force-app/main/default/classes/FinancialService.cls`](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/classes/FinancialService.cls) (Financial Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Lightning UI"]
  node_app["Nexus LME App<br/>Lightning app"]
  node_utility["Utility Bar<br/>Lightning utility"]
  node_permissions["Nexus User Access<br/>permission set"]
end

subgraph group_intake["Application Intake"]
  node_application[("Loan Application<br/>custom object")]
  node_account[("Borrower Account<br/>standard object extension")]
  node_application_flow{{"Application Flow<br/>record Flow"}}
  node_financial_form["Dynamic Financials Form<br/>LWC"]
  node_financial_service["Financial Service<br/>Apex service"]
  node_financial_wrapper["Financial DTO<br/>Apex wrapper"]
  node_disclosures[("Financial Disclosures<br/>custom objects")]
end

subgraph group_servicing["Loan Servicing"]
  node_financial_account[("Financial Account<br/>custom object")]
  node_origination_flow{{"Account Creation Flow<br/>record Flow"}}
  node_transaction[("Transaction<br/>custom object")]
  node_transaction_flow{{"Transaction Flow<br/>record Flow"}}
end

subgraph group_interest["Interest Processing"]
  node_loan_config[("Loan Configuration<br/>custom object field")]
  node_daily_interest_flow{{"Daily Interest Job<br/>scheduled Flow"}}
  node_interest_batch["Interest Calculation Batch<br/>Batch Apex"]
end

node_permissions -->|"authorizes"| node_app
node_app -->|"includes"| node_utility
node_app -->|"exposes tab"| node_application
node_app -->|"exposes tab"| node_financial_account
node_application -->|"belongs to"| node_account
node_application_flow -->|"creates or updates"| node_application
node_financial_form -->|"invokes"| node_financial_service
node_financial_service -->|"uses"| node_financial_wrapper
node_financial_service -->|"captures"| node_disclosures
node_disclosures -->|"relate to"| node_account
node_disclosures -->|"support underwriting"| node_application
node_origination_flow -->|"processes approved"| node_application
node_origination_flow -->|"creates"| node_financial_account
node_financial_account -->|"originates from"| node_application
node_financial_account -->|"belongs to borrower"| node_account
node_transaction_flow -->|"creates"| node_transaction
node_transaction -->|"posts to"| node_financial_account
node_daily_interest_flow -->|"initiates"| node_interest_batch
node_interest_batch -->|"reads rate"| node_loan_config
node_interest_batch -->|"updates interest and balance"| node_financial_account

click node_app "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/applications/Nexus_LME.app-meta.xml"
click node_utility "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flexipages/Nexus_LME_UtilityBar.flexipage-meta.xml"
click node_permissions "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/permissionsets/Nexus_User.permissionset-meta.xml"
click node_application "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Application__c/Application__c.object-meta.xml"
click node_account "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Account/Account.object-meta.xml"
click node_application_flow "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flows/Laon_Application_Flow.flow-meta.xml"
click node_financial_form "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/lwc/dynamicFinancialsForm/dynamicFinancialsForm.js"
click node_financial_service "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/classes/FinancialService.cls"
click node_financial_wrapper "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/classes/FinancialWrapper.cls"
click node_financial_account "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Financial_Account__c/Financial_Account__c.object-meta.xml"
click node_origination_flow "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flows/Financial_Account_Creation_FLow.flow-meta.xml"
click node_transaction "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Transaction__c/Transaction__c.object-meta.xml"
click node_transaction_flow "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flows/Create_Transaction_Flow.flow-meta.xml"
click node_loan_config "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Loan_Configuration__c/fields/Default_Interest_Rate__c.field-meta.xml"
click node_daily_interest_flow "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flows/Daily_Interest_Job.flow-meta.xml"
click node_interest_batch "https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/classes/InterestCalculationBatch.cls"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_utility,node_permissions toneBlue
class node_application,node_account,node_application_flow,node_financial_form,node_financial_service,node_financial_wrapper,node_disclosures toneAmber
class node_financial_account,node_origination_flow,node_transaction,node_transaction_flow toneMint
class node_loan_config,node_daily_interest_flow,node_interest_batch toneRose
```

## Components

### Lightning UI

- [Nexus LME App](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/applications/Nexus_LME.app-meta.xml): Lightning app · `force-app/main/default/applications/Nexus_LME.app-meta.xml`
- [Utility Bar](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flexipages/Nexus_LME_UtilityBar.flexipage-meta.xml): Lightning utility · `force-app/main/default/flexipages/Nexus_LME_UtilityBar.flexipage-meta.xml`
- [Nexus User Access](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/permissionsets/Nexus_User.permissionset-meta.xml): permission set · `force-app/main/default/permissionsets/Nexus_User.permissionset-meta.xml`

### Application Intake

- [Loan Application](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Application__c/Application__c.object-meta.xml): custom object · Captures requested loan terms and status. · `force-app/main/default/objects/Application__c/Application__c.object-meta.xml`
- [Borrower Account](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Account/Account.object-meta.xml): standard object extension · `force-app/main/default/objects/Account/Account.object-meta.xml`
- [Application Flow](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flows/Laon_Application_Flow.flow-meta.xml): record Flow · `force-app/main/default/flows/Laon_Application_Flow.flow-meta.xml`
- [Dynamic Financials Form](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/lwc/dynamicFinancialsForm/dynamicFinancialsForm.js): LWC · Configurable financial-data entry UI. · `force-app/main/default/lwc/dynamicFinancialsForm/dynamicFinancialsForm.js`
- [Financial Service](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/classes/FinancialService.cls): Apex service · `force-app/main/default/classes/FinancialService.cls`
- [Financial DTO](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/classes/FinancialWrapper.cls): Apex wrapper · `force-app/main/default/classes/FinancialWrapper.cls`
- **Financial Disclosures**: custom objects · Income, liabilities, and assets support underwriting.

### Loan Servicing

- [Financial Account](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Financial_Account__c/Financial_Account__c.object-meta.xml): custom object · Persisted originated loan balances and totals. · `force-app/main/default/objects/Financial_Account__c/Financial_Account__c.object-meta.xml`
- [Account Creation Flow](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flows/Financial_Account_Creation_FLow.flow-meta.xml): record Flow · `force-app/main/default/flows/Financial_Account_Creation_FLow.flow-meta.xml`
- [Transaction](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Transaction__c/Transaction__c.object-meta.xml): custom object · `force-app/main/default/objects/Transaction__c/Transaction__c.object-meta.xml`
- [Transaction Flow](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flows/Create_Transaction_Flow.flow-meta.xml): record Flow · `force-app/main/default/flows/Create_Transaction_Flow.flow-meta.xml`

### Interest Processing

- [Loan Configuration](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/objects/Loan_Configuration__c/fields/Default_Interest_Rate__c.field-meta.xml): custom object field · Supplies default interest rates. · `force-app/main/default/objects/Loan_Configuration__c/fields/Default_Interest_Rate__c.field-meta.xml`
- [Daily Interest Job](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/flows/Daily_Interest_Job.flow-meta.xml): scheduled Flow · `force-app/main/default/flows/Daily_Interest_Job.flow-meta.xml`
- [Interest Calculation Batch](https://github.com/rajendraprasathfern/nexus-lme/blob/main/force-app/main/default/classes/InterestCalculationBatch.cls): Batch Apex · Bulk recurring interest calculation. · `force-app/main/default/classes/InterestCalculationBatch.cls`

## Connections

- Nexus User Access → Nexus LME App: authorizes
- Nexus LME App → Utility Bar: includes
- Nexus LME App → Loan Application: exposes tab
- Nexus LME App → Financial Account: exposes tab
- Loan Application → Borrower Account: belongs to
- Application Flow → Loan Application: creates or updates
- Dynamic Financials Form → Financial Service: invokes
- Financial Service → Financial DTO: uses
- Financial Service → Financial Disclosures: captures
- Financial Disclosures → Borrower Account: relate to
- Financial Disclosures → Loan Application: support underwriting
- Account Creation Flow → Loan Application: processes approved
- Account Creation Flow → Financial Account: creates
- Financial Account → Loan Application: originates from
- Financial Account → Borrower Account: belongs to borrower
- Transaction Flow → Transaction: creates
- Transaction → Financial Account: posts to
- Daily Interest Job → Interest Calculation Batch: initiates
- Interest Calculation Batch → Loan Configuration: reads rate
- Interest Calculation Batch → Financial Account: updates interest and balance
