# finaegis/core-banking-prototype-laravel architecture

> Architecture diagram of the GitHub repository finaegis/core-banking-prototype-laravel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/finaegis/core-banking-prototype-laravel
- Repository: https://github.com/finaegis/core-banking-prototype-laravel

## Overview

FinAegis is an event-sourced core banking platform, with GCU as a reference currency implementation. A typical user-facing path starts at an API or GraphQL surface and reaches account, payment, or wallet capabilities; the platform also provides AI transaction queries, compliance/regulatory tooling, cross-chain operations, mobile/privacy features, and modular domains. The graph preserves these documented branches. Source excerpts are limited, so README-backed links are identified as such and uncertain internal call chains are omitted.

Main entry points: [`bootstrap/app.php`](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/bootstrap/app.php) (REST API), [`app/Http/Controllers/Api/AI/AIQueryController.php`](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Http/Controllers/Api/AI/AIQueryController.php) (AI query endpoint), [`app/Domain/Account/Models/AccountBalance.php`](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Account/Models/AccountBalance.php) (Account balances), [`app/Domain/RegTech/Services/RegTechOrchestrationService.php`](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/RegTech/Services/RegTechOrchestrationService.php) (Regulatory orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_banking["Banking Core"]
  node_accountquery["Account queries"]
  node_accountbalance[("Account balances<br/>[AccountBalance.php]")]
  node_accountmodel[("Account records<br/>[Account.php]")]
  node_transactions["Transaction model<br/>[Transaction.php]"]
  node_asset[("Asset catalog<br/>[Asset.php]")]
  node_userrecord[("User records<br/>[User.php]")]
end

subgraph group_interfaces["User Interfaces"]
  node_api["REST API<br/>[app.php]"]
  node_graphql["GraphQL API"]
  node_mobile["Mobile services"]
  node_aiquery["AI query endpoint"]
end

subgraph group_intelligence["AI and Risk"]
  node_nlp["Natural language processing"]
  node_queryanalysis["Transaction query analysis"]
  node_fraud["Fraud detection"]
  node_pattern["Streaming detection"]
end

subgraph group_platform["Platform Services"]
  node_regtech["Regulatory orchestration"]
  node_domains["Domain management<br/>[DomainManager.php]"]
  node_plugins["Plugin management<br/>[PluginManager.php]"]
  node_streaming["Event streaming"]
end

subgraph group_extensions["Extended Finance"]
  node_crosschain["Bridge orchestration"]
  node_railgun["Privacy engine config"]
  node_gcu["GCU reference currency"]
end

node_user(("Banking user"))

node_user -->|"uses"| node_api
node_user -->|"queries"| node_graphql
node_user -.->|"uses"| node_mobile
node_api -->|"routes"| node_aiquery
node_aiquery -->|"parses intent"| node_nlp
node_aiquery -->|"analyzes transactions"| node_queryanalysis
node_accountquery -->|"reads balances"| node_accountbalance
node_asset -->|"relates balances"| node_accountbalance
node_userrecord -->|"relates accounts"| node_accountmodel
node_regtech -.->|"supports KYC"| node_user
node_regtech -.->|"serves reports"| node_api
node_domains -->|"isolates routes"| node_api
node_plugins -.->|"extends modules"| node_domains
node_streaming -.->|"detects patterns"| node_pattern
node_crosschain -->|"uses address data"| node_accountbalance
node_railgun -->|"authenticates user"| node_userrecord
node_gcu -->|"uses basket assets"| node_asset
node_graphql -.->|"queries accounts"| node_accountquery

click node_api "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/bootstrap/app.php"
click node_graphql "https://github.com/finaegis/core-banking-prototype-laravel/tree/main/app/GraphQL"
click node_mobile "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Http/Controllers/Api/MobileController.php"
click node_aiquery "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Http/Controllers/Api/AI/AIQueryController.php"
click node_accountquery "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Account/Services/AccountQueryService.php"
click node_accountbalance "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Account/Models/AccountBalance.php"
click node_accountmodel "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Account/Models/Account.php"
click node_transactions "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/sdks/php/src/Models/Transaction.php"
click node_asset "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Asset/Models/Asset.php"
click node_userrecord "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Models/User.php"
click node_nlp "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/AI/Services/NaturalLanguageProcessorService.php"
click node_queryanalysis "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/AI/Services/TransactionQueryAnalyzerService.php"
click node_fraud "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Fraud/Services/RuleEngineService.php"
click node_pattern "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Compliance/Streaming/PatternDetectionEngine.php"
click node_regtech "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/RegTech/Services/RegTechOrchestrationService.php"
click node_domains "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Infrastructure/Domain/DomainManager.php"
click node_plugins "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Infrastructure/Plugins/PluginManager.php"
click node_streaming "https://github.com/finaegis/core-banking-prototype-laravel/tree/main/app/Domain"
click node_crosschain "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/CrossChain/Services/BridgeOrchestratorService.php"
click node_railgun "https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Http/Controllers/Api/Privacy/RailgunEngineConfigController.php"
click node_gcu "https://github.com/finaegis/core-banking-prototype-laravel/tree/main/app/Domain/Basket"

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_accountquery,node_accountbalance,node_accountmodel,node_transactions,node_asset,node_userrecord,node_user toneBlue
class node_api,node_graphql,node_mobile,node_aiquery toneAmber
class node_nlp,node_queryanalysis,node_fraud,node_pattern toneMint
class node_regtech,node_domains,node_plugins,node_streaming toneRose
class node_crosschain,node_railgun,node_gcu toneIndigo
```

## Components

### Banking Core

- [Account queries](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Account/Services/AccountQueryService.php): `app/Domain/Account/Services/AccountQueryService.php`
- [Account balances](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Account/Models/AccountBalance.php): `app/Domain/Account/Models/AccountBalance.php`
- [Account records](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Account/Models/Account.php): `app/Domain/Account/Models/Account.php`
- [Transaction model](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/sdks/php/src/Models/Transaction.php): `sdks/php/src/Models/Transaction.php`
- [Asset catalog](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Asset/Models/Asset.php): `app/Domain/Asset/Models/Asset.php`
- [User records](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Models/User.php): `app/Models/User.php`

### User Interfaces

- [REST API](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [GraphQL API](https://github.com/finaegis/core-banking-prototype-laravel/tree/main/app/GraphQL): `app/GraphQL`
- [Mobile services](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Http/Controllers/Api/MobileController.php): `app/Http/Controllers/Api/MobileController.php`
- [AI query endpoint](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Http/Controllers/Api/AI/AIQueryController.php): `app/Http/Controllers/Api/AI/AIQueryController.php`

### AI and Risk

- [Natural language processing](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/AI/Services/NaturalLanguageProcessorService.php): `app/Domain/AI/Services/NaturalLanguageProcessorService.php`
- [Transaction query analysis](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/AI/Services/TransactionQueryAnalyzerService.php): `app/Domain/AI/Services/TransactionQueryAnalyzerService.php`
- [Fraud detection](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Fraud/Services/RuleEngineService.php): `app/Domain/Fraud/Services/RuleEngineService.php`
- [Streaming detection](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/Compliance/Streaming/PatternDetectionEngine.php): `app/Domain/Compliance/Streaming/PatternDetectionEngine.php`

### Platform Services

- [Regulatory orchestration](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/RegTech/Services/RegTechOrchestrationService.php): `app/Domain/RegTech/Services/RegTechOrchestrationService.php`
- [Domain management](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Infrastructure/Domain/DomainManager.php): `app/Infrastructure/Domain/DomainManager.php`
- [Plugin management](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Infrastructure/Plugins/PluginManager.php): `app/Infrastructure/Plugins/PluginManager.php`
- [Event streaming](https://github.com/finaegis/core-banking-prototype-laravel/tree/main/app/Domain): `app/Domain`

### Extended Finance

- [Bridge orchestration](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Domain/CrossChain/Services/BridgeOrchestratorService.php): `app/Domain/CrossChain/Services/BridgeOrchestratorService.php`
- [Privacy engine config](https://github.com/finaegis/core-banking-prototype-laravel/blob/main/app/Http/Controllers/Api/Privacy/RailgunEngineConfigController.php): `app/Http/Controllers/Api/Privacy/RailgunEngineConfigController.php`
- [GCU reference currency](https://github.com/finaegis/core-banking-prototype-laravel/tree/main/app/Domain/Basket): `app/Domain/Basket`

### Other components

- **Banking user**

## Connections

- Banking user → REST API: uses (evidence: `README.md`)
- Banking user → GraphQL API: queries (evidence: `README.md`)
- Banking user → Mobile services: uses
- REST API → AI query endpoint: routes (evidence: `app/Http/Controllers/Api/AI/AIQueryController.php`)
- AI query endpoint → Natural language processing: parses intent (evidence: `app/Http/Controllers/Api/AI/AIQueryController.php`)
- AI query endpoint → Transaction query analysis: analyzes transactions (evidence: `app/Http/Controllers/Api/AI/AIQueryController.php`)
- Account queries → Account balances: reads balances (evidence: `app/Domain/Account/Services/AccountQueryService.php`)
- Asset catalog → Account balances: relates balances (evidence: `app/Domain/Asset/Models/Asset.php`)
- User records → Account records: relates accounts (evidence: `app/Models/User.php`)
- Regulatory orchestration → Banking user: supports KYC
- Regulatory orchestration → REST API: serves reports (evidence: `README.md`)
- Domain management → REST API: isolates routes (evidence: `README.md`)
- Plugin management → Domain management: extends modules (evidence: `README.md`)
- Event streaming → Streaming detection: detects patterns (evidence: `README.md`)
- Bridge orchestration → Account balances: uses address data (evidence: `app/Domain/CrossChain/Services/BridgeOrchestratorService.php`)
- Privacy engine config → User records: authenticates user (evidence: `app/Http/Controllers/Api/Privacy/RailgunEngineConfigController.php`)
- GCU reference currency → Asset catalog: uses basket assets (evidence: `README.md`)
- GraphQL API → Account queries: queries accounts (evidence: `README.md`)
