# youssefraof/banking_system_webapp architecture

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

- Interactive diagram: https://gitdiagram.com/youssefraof/banking_system_webapp
- Repository: https://github.com/youssefraof/banking_system_webapp

## Overview

##### Project Type & Purpose
- This is a full-stack ASP.NET web application that models a banking system.
- Its architecture is organized around a layered approach – with clear separations for the Presentation Layer (PL), Business Logic Layer (BLL), and Data Access Layer (DAL).
- The goal is to provide a web interface (likely via MVC controllers and Razor views) to interact with banking services that are implemented in the business logic, and to connect to a database through an ORM/data access mechanism.

##### Analysis of the File Structure
- Three Key Directories:
- BankingSystem.PL: Contains the ASP.NET web project with controllers, views (including shared and individual pages), static web assets (CSS, JS, libraries like Bootstrap and jQuery), and configuration files (appsettings.json).
- BankingSystem.BLL: Houses the business logic. This layer likely includes services, business rules, and any application-specific logic that orchestrates data processing. The csproj indicates it’s a separate project/library.
- BankingSystem.DAL: Contains the Data Access code with a project file, includes an Entity Framework context (BankingSystemContext.cs) and model definitions (such as BaseEntity.cs). This is where database operations are abstracted.
- Additional configuration and solution files (.sln) tie the projects together.

a. Main Components:
- Presentation Layer (PL): The front-end web application. Represent this with a component labeled “Web UI (BankingSystem.PL)” that covers controllers, views, and static assets.
- Data Access Layer (DAL): Represent this as “Data Access (BankingSystem.DAL)” that contains the EF context, model classes, and is responsible for database interaction.

b. Relationships & Interactions:
- Optionally, list additional external libraries (like jQuery, Bootstrap) within the PL section to indicate static asset dependencies.

c. Architectural Patterns & Design Principles:
- Separation of concerns and layered (n-tier) architecture.
- Use of the MVC pattern inherent in the PL portion (Controllers, Views, etc.).
- That dependency injection might be in use for decoupling between BLL and DAL (if that is evident in the code or project conventions).

## Diagram (Mermaid)

```mermaid
flowchart TD
    Client["Client (Web Browser)"]:::clientStyle

    subgraph "Presentation Layer (BankingSystem.PL)"
        WebUI["Web UI (BankingSystem.PL)"]:::presentation
        Controllers["Controllers (HomeController.cs)"]:::presentation
        IndexView["View: Index.cshtml"]:::presentation
        LayoutView["View: _Layout.cshtml"]:::presentation
        AppSettings["Configuration (appsettings.json)"]:::presentation
        StaticAssets["Static Assets (wwwroot)"]:::presentation
        Libraries["External Libraries (Bootstrap&jQuery)"]:::external
    end

    subgraph "Business Logic Layer (BankingSystem.BLL)"
        BLL["Business Logic (BankingSystem.BLL)"]:::business
    end

    subgraph "Data Access Layer (BankingSystem.DAL)"
        DAL["Data Access (BankingSystem.DAL)"]:::dataAcc
        EFContext["EF Context (BankingSystemContext.cs)"]:::dataAcc
        Models["Models (BaseEntity.cs)"]:::dataAcc
    end

    DB["Relational Database"]:::database

    Client --> WebUI
    WebUI -->|"calls"| BLL
    BLL -->|"calls"| DAL
    DAL -->|"connects"| DB

    WebUI --- Controllers
    WebUI --- IndexView
    WebUI --- LayoutView
    WebUI --- AppSettings
    WebUI --- StaticAssets
    WebUI --- Libraries

    DAL --- EFContext
    DAL --- Models

    click WebUI "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.PL"
    click Controllers "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.PL/Controllers/HomeController.cs"
    click IndexView "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.PL/Views/Home/Index.cshtml"
    click LayoutView "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.PL/Views/Shared/_Layout.cshtml"
    click AppSettings "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.PL/appsettings.json"
    click StaticAssets "https://github.com/youssefraof/banking_system_webapp/tree/master/BankingSystem.PL/wwwroot"
    click BLL "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.BLL"
    click DAL "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.DAL"
    click EFContext "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.DAL/Data/BankingSystemContext.cs"
    click Models "https://github.com/youssefraof/banking_system_webapp/blob/master/BankingSystem.DAL/Models/BaseEntity.cs"

    classDef presentation fill:#AED6F1,stroke:#2E86C1,stroke-width:2px;
    classDef business fill:#ABEBC6,stroke:#28B463,stroke-width:2px;
    classDef dataAcc fill:#F9E79F,stroke:#F1C40F,stroke-width:2px;
    classDef database fill:#E6B0AA,stroke:#C0392B,stroke-width:2px;
    classDef external fill:#D7BDE2,stroke:#8E44AD,stroke-width:2px;
    classDef clientStyle fill:#FAD7A0,stroke:#E67E22,stroke-width:2px;
```
