# zainbaig313/ai-agent-dotnet-and-angular-project architecture

> Architecture diagram of the GitHub repository zainbaig313/ai-agent-dotnet-and-angular-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zainbaig313/ai-agent-dotnet-and-angular-project
- Repository: https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project

## Overview

Banking AI Assistant is a full-stack banking dashboard and conversational assistant. A customer selects a profile to view account and transaction information, or submits a question; Angular services call the ASP.NET API, whose agent can query customer banking data and use OpenRouter tool-calling to produce a natural-language answer. The API also exposes customer, account, and transaction endpoints backed by SQL Server. The graph preserves these domain stages and the UI/API/persistence layers. Controller and dashboard internals are unsampled, so some links rely on the README or source index.

Main entry points: [`BankingAgent.Api/Data/AppDbContext.cs`](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Data/AppDbContext.cs) (EF Core context), [`banking-ui/src/app/components/dashboard/dashboard.component.ts`](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/components/dashboard/dashboard.component.ts) (Banking dashboard), [`BankingAgent.Api/Services/AgentService.cs`](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Services/AgentService.cs) (Agent orchestration), [`banking-ui/src/app/services/customer.service.ts`](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/customer.service.ts) (Customer API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Angular banking UI"]
  node_app["App shell<br/>[app.ts]"]
  node_dashboard["Banking dashboard"]
  node_ui_models["UI data models<br/>[models.ts]"]
  node_customer_ui["Customer API client"]
  node_account_ui["Account API client<br/>[account.service.ts]"]
  node_transaction_ui["Transaction API client"]
  node_agent_ui["Agent API client<br/>[agent.service.ts]"]
end

subgraph group_api["Banking REST API"]
  node_customers_api["Customer endpoints"]
  node_accounts_api["Account endpoints"]
  node_transactions_api["Transaction endpoints"]
  node_agent_api["Agent endpoint<br/>[AgentController.cs]"]
end

subgraph group_agent["AI assistant"]
  node_agent_service["Agent orchestration<br/>[AgentService.cs]"]
  node_openrouter["OpenRouter client"]
end

subgraph group_data["Banking data"]
  node_context["EF Core context<br/>[AppDbContext.cs]"]
  node_database[("SQL Server")]
  node_customer_model["Customer entity<br/>[Customer.cs]"]
  node_account_model["Account entity<br/>[Account.cs]"]
  node_transaction_model["Transaction entity<br/>[Transaction.cs]"]
end

node_customer(("Customer"))
node_provider{{"OpenRouter AI"}}

node_customer -->|"uses"| node_dashboard
node_app -->|"renders"| node_dashboard
node_dashboard -->|"loads customers"| node_customer_ui
node_dashboard -->|"loads accounts"| node_account_ui
node_dashboard -->|"loads transactions"| node_transaction_ui
node_dashboard -->|"submits questions"| node_agent_ui
node_customer_ui -->|"HTTP requests"| node_customers_api
node_account_ui -->|"HTTP requests"| node_accounts_api
node_transaction_ui -->|"HTTP requests"| node_transactions_api
node_agent_ui -->|"POST question"| node_agent_api
node_agent_api -->|"delegates chat"| node_agent_service
node_agent_service -->|"sends chat"| node_openrouter
node_openrouter -->|"HTTP chat calls"| node_provider
node_agent_service -->|"queries banking data"| node_context
node_customers_api -->|"queries customers"| node_context
node_accounts_api -->|"accesses accounts"| node_context
node_transactions_api -->|"accesses transactions"| node_context
node_context -->|"reads and writes"| node_database
node_context -->|"maps entity"| node_customer_model
node_context -->|"maps entity"| node_account_model
node_context -->|"maps entity"| node_transaction_model

click node_app "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/app.ts"
click node_dashboard "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/components/dashboard/dashboard.component.ts"
click node_ui_models "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/models.ts"
click node_customer_ui "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/customer.service.ts"
click node_account_ui "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/account.service.ts"
click node_transaction_ui "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/transaction.service.ts"
click node_agent_ui "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/agent.service.ts"
click node_customers_api "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Controllers/CustomersController.cs"
click node_accounts_api "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Controllers/AccountsController.cs"
click node_transactions_api "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Controllers/TransactionsController.cs"
click node_agent_api "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Controllers/AgentController.cs"
click node_agent_service "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Services/AgentService.cs"
click node_openrouter "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Services/OpenRouterService.cs"
click node_context "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Data/AppDbContext.cs"
click node_customer_model "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Models/Customer.cs"
click node_account_model "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Models/Account.cs"
click node_transaction_model "https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Models/Transaction.cs"

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_dashboard,node_ui_models,node_customer_ui,node_account_ui,node_transaction_ui,node_agent_ui toneBlue
class node_customers_api,node_accounts_api,node_transactions_api,node_agent_api toneAmber
class node_agent_service,node_openrouter,node_provider toneMint
class node_context,node_database,node_customer_model,node_account_model,node_transaction_model toneRose
class node_customer toneIndigo
```

## Components

### Angular banking UI

- [App shell](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/app.ts): `banking-ui/src/app/app.ts`
- [Banking dashboard](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/components/dashboard/dashboard.component.ts): `banking-ui/src/app/components/dashboard/dashboard.component.ts`
- [UI data models](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/models.ts): `banking-ui/src/app/models.ts`
- [Customer API client](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/customer.service.ts): `banking-ui/src/app/services/customer.service.ts`
- [Account API client](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/account.service.ts): `banking-ui/src/app/services/account.service.ts`
- [Transaction API client](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/transaction.service.ts): `banking-ui/src/app/services/transaction.service.ts`
- [Agent API client](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/banking-ui/src/app/services/agent.service.ts): `banking-ui/src/app/services/agent.service.ts`

### Banking REST API

- [Customer endpoints](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Controllers/CustomersController.cs): `BankingAgent.Api/Controllers/CustomersController.cs`
- [Account endpoints](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Controllers/AccountsController.cs): `BankingAgent.Api/Controllers/AccountsController.cs`
- [Transaction endpoints](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Controllers/TransactionsController.cs): `BankingAgent.Api/Controllers/TransactionsController.cs`
- [Agent endpoint](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Controllers/AgentController.cs): `BankingAgent.Api/Controllers/AgentController.cs`

### AI assistant

- [Agent orchestration](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Services/AgentService.cs): `BankingAgent.Api/Services/AgentService.cs`
- [OpenRouter client](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Services/OpenRouterService.cs): `BankingAgent.Api/Services/OpenRouterService.cs`

### Banking data

- [EF Core context](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Data/AppDbContext.cs): `BankingAgent.Api/Data/AppDbContext.cs`
- **SQL Server**
- [Customer entity](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Models/Customer.cs): `BankingAgent.Api/Models/Customer.cs`
- [Account entity](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Models/Account.cs): `BankingAgent.Api/Models/Account.cs`
- [Transaction entity](https://github.com/zainbaig313/ai-agent-dotnet-and-angular-project/blob/main/BankingAgent.Api/Models/Transaction.cs): `BankingAgent.Api/Models/Transaction.cs`

### Other components

- **Customer**
- **OpenRouter AI**

## Connections

- Customer → Banking dashboard: uses (evidence: `README.md`)
- App shell → Banking dashboard: renders (evidence: `banking-ui/src/app/app.ts`)
- Banking dashboard → Customer API client: loads customers (evidence: `banking-ui/src/app/components/dashboard/dashboard.component.ts`)
- Banking dashboard → Account API client: loads accounts (evidence: `banking-ui/src/app/components/dashboard/dashboard.component.ts`)
- Banking dashboard → Transaction API client: loads transactions (evidence: `banking-ui/src/app/components/dashboard/dashboard.component.ts`)
- Banking dashboard → Agent API client: submits questions (evidence: `banking-ui/src/app/components/dashboard/dashboard.component.ts`)
- Customer API client → Customer endpoints: HTTP requests (evidence: `README.md`)
- Account API client → Account endpoints: HTTP requests (evidence: `README.md`)
- Transaction API client → Transaction endpoints: HTTP requests (evidence: `README.md`)
- Agent API client → Agent endpoint: POST question (evidence: `banking-ui/src/app/services/agent.service.ts`)
- Agent endpoint → Agent orchestration: delegates chat (evidence: `BankingAgent.Api/Controllers/AgentController.cs`)
- Agent orchestration → OpenRouter client: sends chat (evidence: `BankingAgent.Api/Services/AgentService.cs`)
- OpenRouter client → OpenRouter AI: HTTP chat calls (evidence: `BankingAgent.Api/Services/OpenRouterService.cs`)
- Agent orchestration → EF Core context: queries banking data (evidence: `BankingAgent.Api/Services/AgentService.cs`)
- Customer endpoints → EF Core context: queries customers (evidence: `BankingAgent.Api/Controllers/CustomersController.cs`)
- Account endpoints → EF Core context: accesses accounts (evidence: `BankingAgent.Api/Controllers/AccountsController.cs`)
- Transaction endpoints → EF Core context: accesses transactions (evidence: `BankingAgent.Api/Controllers/TransactionsController.cs`)
- EF Core context → SQL Server: reads and writes
- EF Core context → Customer entity: maps entity (evidence: `BankingAgent.Api/Data/AppDbContext.cs`)
- EF Core context → Account entity: maps entity (evidence: `BankingAgent.Api/Data/AppDbContext.cs`)
- EF Core context → Transaction entity: maps entity (evidence: `BankingAgent.Api/Data/AppDbContext.cs`)
