# abdulrahman-whale/golden-bank-ms architecture

> Architecture diagram of the GitHub repository abdulrahman-whale/golden-bank-ms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdulrahman-whale/golden-bank-ms
- Repository: https://github.com/abdulrahman-whale/golden-bank-ms

## Overview

Bank MS WPF is a desktop banking-management application. Users log in or register, then work through role-specific screens: customers deposit, withdraw, and view balances; staff manage customer accounts; managers manage staff. Shared person/customer/staff/manager classes hold domain behavior and access MongoDB collections. The excerpts show login and dashboard navigation plus several model-to-database operations; other screen-to-model wiring is not established by the available evidence, so those links are omitted.

Main entry points: [`Classes/Person_CS.cs`](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Person_CS.cs) (Person and login logic), [`MainWindow.xaml.cs`](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/MainWindow.xaml.cs) (Login and registration), [`Windows/StaffDashboard.xaml.cs`](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Windows/StaffDashboard.xaml.cs) (Staff dashboard), [`Windows/Manager Dashboard.xaml.cs`](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Windows/Manager%20Dashboard.xaml.cs) (Manager dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and identity"]
  node_login["Login and registration<br/>[MainWindow.xaml.cs]"]
  node_account_creation["Account creation"]
end

subgraph group_customer["Customer banking"]
  node_customer_dashboard["Customer dashboard"]
  node_customer_actions["Deposit, withdrawal, balance"]
end

subgraph group_staff["Staff operations"]
  node_staff_dashboard["Staff dashboard"]
  node_staff_customer_ops["Customer account lookup"]
end

subgraph group_manager["Manager operations"]
  node_manager_dashboard["Manager dashboard"]
  node_manager_staff_ops["Staff administration"]
end

subgraph group_domain["Domain and persistence"]
  node_person["Person and login logic<br/>[Person_CS.cs]"]
  node_customer_model["Customer transactions<br/>[Customer_CS.cs]"]
  node_staff_model["Staff account queries<br/>[Staff_CS.cs]"]
  node_manager_model["Manager staff queries<br/>[Manager_CS.cs]"]
  node_mongodb[("MongoDB banking data")]
end

node_user(("Bank user"))

node_user -->|"enters credentials"| node_login
node_login -->|"calls login"| node_person
node_login -->|"opens registration"| node_account_creation
node_person -->|"queries collections"| node_mongodb
node_person -->|"opens on customer login"| node_customer_dashboard
node_person -->|"opens on staff login"| node_staff_dashboard
node_person -->|"opens on manager login"| node_manager_dashboard
node_staff_dashboard -->|"opens account tools"| node_staff_customer_ops
node_manager_dashboard -->|"opens staff tools"| node_manager_staff_ops
node_customer_model -->|"updates balances"| node_mongodb
node_staff_model -->|"queries customers"| node_mongodb
node_manager_model -->|"queries staff"| node_mongodb

click node_login "https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/MainWindow.xaml.cs"
click node_account_creation "https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows"
click node_customer_dashboard "https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows"
click node_customer_actions "https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows"
click node_staff_dashboard "https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Windows/StaffDashboard.xaml.cs"
click node_staff_customer_ops "https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows"
click node_manager_dashboard "https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Windows/Manager%20Dashboard.xaml.cs"
click node_manager_staff_ops "https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows"
click node_person "https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Person_CS.cs"
click node_customer_model "https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Customer/Customer_CS.cs"
click node_staff_model "https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Staff/Staff_CS.cs"
click node_manager_model "https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Manager/Manager_CS.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_login,node_account_creation,node_user toneBlue
class node_customer_dashboard,node_customer_actions toneAmber
class node_staff_dashboard,node_staff_customer_ops toneMint
class node_manager_dashboard,node_manager_staff_ops toneRose
class node_person,node_customer_model,node_staff_model,node_manager_model,node_mongodb toneIndigo
```

## Components

### Entry and identity

- [Login and registration](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/MainWindow.xaml.cs): `MainWindow.xaml.cs`
- [Account creation](https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows): `Windows`

### Customer banking

- [Customer dashboard](https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows): `Windows`
- [Deposit, withdrawal, balance](https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows): `Windows`

### Staff operations

- [Staff dashboard](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Windows/StaffDashboard.xaml.cs): `Windows/StaffDashboard.xaml.cs`
- [Customer account lookup](https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows): `Windows`

### Manager operations

- [Manager dashboard](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Windows/Manager%20Dashboard.xaml.cs): `Windows/Manager Dashboard.xaml.cs`
- [Staff administration](https://github.com/abdulrahman-whale/golden-bank-ms/tree/main/Windows): `Windows`

### Domain and persistence

- [Person and login logic](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Person_CS.cs): `Classes/Person_CS.cs`
- [Customer transactions](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Customer/Customer_CS.cs): `Classes/Customer/Customer_CS.cs`
- [Staff account queries](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Staff/Staff_CS.cs): `Classes/Staff/Staff_CS.cs`
- [Manager staff queries](https://github.com/abdulrahman-whale/golden-bank-ms/blob/main/Classes/Manager/Manager_CS.cs): `Classes/Manager/Manager_CS.cs`
- **MongoDB banking data**

### Other components

- **Bank user**

## Connections

- Bank user → Login and registration: enters credentials
- Login and registration → Person and login logic: calls login (evidence: `MainWindow.xaml.cs`)
- Login and registration → Account creation: opens registration (evidence: `MainWindow.xaml.cs`)
- Person and login logic → MongoDB banking data: queries collections (evidence: `Classes/Person_CS.cs`)
- Person and login logic → Customer dashboard: opens on customer login (evidence: `Classes/Person_CS.cs`)
- Person and login logic → Staff dashboard: opens on staff login (evidence: `Classes/Person_CS.cs`)
- Person and login logic → Manager dashboard: opens on manager login (evidence: `Classes/Person_CS.cs`)
- Staff dashboard → Customer account lookup: opens account tools (evidence: `Windows/StaffDashboard.xaml.cs`)
- Manager dashboard → Staff administration: opens staff tools (evidence: `Windows/Manager Dashboard.xaml.cs`)
- Customer transactions → MongoDB banking data: updates balances (evidence: `Classes/Customer/Customer_CS.cs`)
- Staff account queries → MongoDB banking data: queries customers (evidence: `Classes/Staff/Staff_CS.cs`)
- Manager staff queries → MongoDB banking data: queries staff (evidence: `Classes/Manager/Manager_CS.cs`)
