# mw8969040/bank-project architecture

> Architecture diagram of the GitHub repository mw8969040/bank-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mw8969040/bank-project
- Repository: https://github.com/mw8969040/bank-project

## Overview

##### Project type and purpose
- This is a Windows-desktop Bank Management System written in C# using WinForms (with Guna UI), ADO.NET, and SQL Server.
- It implements a classic 3-Tier architecture: Presentation (UI), Business Layer, Data Access Layer, backed by a SQL Server database.

##### File structure
- Top-level project “Bank” contains all WinForms screens (Login, Dashboard, Customer forms, User forms, Transaction forms).
- “BusinessLayerBankSystem” houses domain logic classes (ClsCustomers, ClsDeposit, ClsTransfer, ClsUsers, ClsCurrency, encryption/decryption helpers).
- “DataAccessLayerBankSystem” holds data-access classes (ClsDataCustomers, ClsDataDeposite, ClsDataTransfer, ClsDataUsers, ClsDataCurrency, plus DataAccess.cs).
- The root “Bank” project references both BusinessLayerBankSystem and DataAccessLayerBankSystem.
- Configuration files (App.config, Settings.settings) define connection strings and application settings.

##### README for additional insights
- Confirms use of 3-Tier Architecture, ADO.NET, SQL Server, Guna UI.
- Enumerates features: authentication, dashboard, user/customer management, currency management, deposit/withdraw/transfer operations, role-based permissions, and password encryption.

##### Detail
- Module in Presentation (authentication, dashboard, user management, customer management, each transaction type)
- Encryption/decryption helper classes connected to Business Layer
- Configuration component feeding into DataAccessLayer (connection string)
- PFX key usage by the encryption classes

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Presentation Tier
    subgraph "Presentation Tier"
        direction TB
        Auth["Authentication"]:::ui
        Dashboard["Dashboard"]:::ui
        UserMgmt["User Management"]:::ui
        CustMgmt["Customer Management"]:::ui
        Balance["Balance Operations"]:::ui
        Transfer["Transfer"]:::ui
        Currency["Currency"]:::ui
    end

    %% Business Layer
    subgraph "BusinessLayerBankSystem"
        direction TB
        ClsCustomers["ClsCustomers"]:::bl
        ClsUsers["ClsUsers"]:::bl
        ClsDeposit["ClsDeposit"]:::bl
        ClsWithdraw["ClsWithdraw"]:::bl
        ClsTransferBL["ClsTransfer"]:::bl
        ClsCurrencyBL["ClsCurrency"]:::bl
        ClsRegisters["ClsRegisters"]:::bl
        ClsEncryption["ClsEncryption"]:::bl
        ClsDecryption["ClsDecryption"]:::bl
    end
    BL["BusinessLayerBankSystem"]:::bl

    %% Data Access Layer
    subgraph "DataAccessLayerBankSystem"
        direction TB
        DataAccess["DataAccess"]:::dal
        ClsDataCustomers["ClsDataCustomers"]:::dal
        ClsDataUsers["ClsDataUsers"]:::dal
        ClsDataDeposite["ClsDataDeposite"]:::dal
        ClsDataWithdraw["ClsDataWithdraw"]:::dal
        ClsDataTransfer["ClsDataTransfer"]:::dal
        ClsDataCurrency["ClsDataCurrency"]:::dal
        ClsDataRegister["ClsDataRegister"]:::dal
    end
    DAL["DataAccessLayerBankSystem"]:::dal

    %% Database and Infrastructure
    SQLServer["SQL Server DB"]:::db
    Config["Configuration"]:::infra
    Encryption["Encryption Key (PFX)"]:::infra

    %% Relationships
    Auth -->|calls| BL
    Dashboard -->|calls| BL
    UserMgmt -->|calls| BL
    CustMgmt -->|calls| BL
    Balance -->|calls| BL
    Transfer -->|calls| BL
    Currency -->|calls| BL

    BL -->|uses| DataAccess
    DataAccess -->|connects to| SQLServer
    BL -->|uses| ClsEncryption
    BL -->|uses| ClsDecryption
    DataAccess -->|reads connection| Config

    %% Click Events
    click Auth "https://github.com/mw8969040/bank-project/blob/main/Bank/Login.cs"
    click Dashboard "https://github.com/mw8969040/bank-project/blob/main/Bank/Dashboard.cs"
    click UserMgmt "https://github.com/mw8969040/bank-project/tree/main/Bank/User"
    click CustMgmt "https://github.com/mw8969040/bank-project/tree/main/Bank/Customer"
    click Balance "https://github.com/mw8969040/bank-project/tree/main/Bank/Transaction/BalanceOperation"
    click Transfer "https://github.com/mw8969040/bank-project/tree/main/Bank/Transaction/Transfer"
    click Currency "https://github.com/mw8969040/bank-project/tree/main/Bank/Transaction/Currency"

    click ClsCustomers "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsCustomers.cs"
    click ClsUsers "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsUsers.cs"
    click ClsDeposit "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsDeposit.cs"
    click ClsWithdraw "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsWithdraw.cs"
    click ClsTransferBL "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsTransfer.cs"
    click ClsCurrencyBL "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsCurrency.cs"
    click ClsRegisters "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsRegisters.cs"
    click ClsEncryption "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsEncryption.cs"
    click ClsDecryption "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/ClsDecryption.cs"
    click BL "https://github.com/mw8969040/bank-project/blob/main/BusinessLayerBankSystem/BusinessLayerBankSystem.csproj"

    click DataAccess "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/DataAccess.cs"
    click ClsDataCustomers "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/ClsDataCustomers.cs"
    click ClsDataUsers "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/ClsDataUsers.cs"
    click ClsDataDeposite "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/ClsDataDeposite.cs"
    click ClsDataWithdraw "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/ClsDataWithdraw.cs"
    click ClsDataTransfer "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/ClsDataTransfer.cs"
    click ClsDataCurrency "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/ClsDataCurrency.cs"
    click ClsDataRegister "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/ClsDataRegister.cs"
    click DAL "https://github.com/mw8969040/bank-project/blob/main/DataAccessLayerBankSystem/DataAccessLayerBankSystem.csproj"

    click Config "https://github.com/mw8969040/bank-project/blob/main/Bank/App.config"
    click Encryption "https://github.com/mw8969040/bank-project/blob/main/Bank/Bank_TemporaryKey.pfx"

    %% Styles
    classDef ui fill:#cce5ff,stroke:#004085
    classDef bl fill:#d4edda,stroke:#155724
    classDef dal fill:#fff3cd,stroke:#856404
    classDef db fill:#f8d7da,stroke:#721c24
    classDef infra fill:#e2e3e5,stroke:#6c757d
```
