# sebastian-buitrag0/transfercoop architecture

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

- Interactive diagram: https://gitdiagram.com/sebastian-buitrag0/transfercoop
- Repository: https://github.com/sebastian-buitrag0/transfercoop

## Overview

##### Project Type and Purpose
- This is a Java-based desktop banking system built with a Swing-based GUI. It implements the MVC architectural pattern with clearly separated packages for Views (src/Vista), Controllers (src/Controlador), and Models (src/Modelo).
- Its purpose is to provide secure and user-friendly access for both administrators and end users to execute banking operations (deposits, withdrawals, transfers, and transaction records) with data stored in a MySQL database.

##### File Structure
- Top-level directories and files indicate configuration for Eclipse (.project, .settings) and VS Code (.vscode).
- The structure shows an MVC pattern:
– src/Vista contains the graphical user interface components, panels, and helper classes (e.g., simulated buttons).
– src/Controlador holds classes for login, registration, and user control logic.
– src/Modelo includes the business logic, domain objects (Cliente, Usuario, etc.), factories, and a database connection (Conexion).

##### README for Additional Insights
- The README gives a detailed description of how the system operates by distinguishing between two user roles (administrador and usuario final) and explains database operations (tables de Usuarios and Movimientos in MySQL).
- It documents both functional (login, transactions, balance tracking, receipt printing) and non-functional requirements (usability, security, performance).

##### Specific Elements
- "Vista (GUI Components)" with sub-components like VLogin, VRegistro, etc.
- "Controlador (Event Handlers)" showing CLogin, CRegistro, etc.
- "Modelo (Business Logic & Data Models)" showing classes like Cliente, Usuario, Conexion, etc.
- "MySQL Database" for persistence.
- "External Libraries" (AnimationClass.jar, RSPanelSlider.jar, jcalendar, mysql-connector-java).
- From the user’s actions (on the Vista) to the Controllers.
- From Controllers to the Model where operations are processed.
- From the Model to the Database for CRUD operations.

Be as detailed as possible, ensuring every component, dependency, and interaction is represented clearly for a comprehensive view of the system architecture.

## Diagram (Mermaid)

```mermaid
flowchart TD

    %% External MVC Entry Point
    D["MVC Entry Point"]:::external

    %% Presentation Layer (Vista)
    subgraph "Presentation Layer"
        A1["Vista (GUI Components)"]:::presentation
        A2["Componentes"]:::presentation
        A3["Paneles"]:::presentation
        A4["Images (bin)"]:::presentation
        A5["Images (src)"]:::presentation
    end

    %% Controller Layer (Controlador)
    subgraph "Controller Layer"
        B1["CLogin"]:::controller
        B2["CRegistro"]:::controller
        B3["CUsuario"]:::controller
        B4["CCorresponsal"]:::controller
    end

    %% Model Layer (Modelo)
    subgraph "Model Layer"
        C1["Cliente"]:::model
        C2["Usuario"]:::model
        C3["Conexion"]:::model
        C4["Factories"]:::model
    end

    %% External Libraries
    E["External Libraries"]:::external

    %% MySQL Database
    F["MySQL Database"]:::db

    %% Relationships from MVC Entry Point to other layers
    D -->|"BootstrapsUI"| A1
    D -->|"BootstrapsCtrls"| B1
    D -->|"BootstrapsCtrls"| B2
    D -->|"BootstrapsCtrls"| B3
    D -->|"BootstrapsCtrls"| B4

    %% Relationships from Presentation Layer to Controller Layer
    A1 -->|"UserInput"| B1
    A1 -->|"UserInput"| B2
    A1 -->|"UserInput"| B3
    A1 -->|"UserInput"| B4

    %% Relationships from Controller Layer to Model Layer (via Conexion)
    B1 -->|"LoginOp"| C3
    B2 -->|"RegOp"| C3
    B3 -->|"UserOp"| C3
    B4 -->|"CorrOp"| C3

    %% Communication between Model and Database
    C3 <-->|"DBQuery/Response"| F

    %% External Libraries enhancing Presentation and Model
    E -->|"UIEnhancements"| A1
    E -->|"DBConnector"| C3

    %% Optional intra-layer connections in Presentation Layer
    A1 --> A2
    A1 --> A3
    A1 --> A4
    A1 --> A5

    %% Click Events
    click A1 "https://github.com/sebastian-buitrag0/transfercoop/tree/main/src/Vista"
    click A2 "https://github.com/sebastian-buitrag0/transfercoop/tree/main/src/Vista/Componentes"
    click A3 "https://github.com/sebastian-buitrag0/transfercoop/tree/main/src/Vista/Paneles"
    click A4 "https://github.com/sebastian-buitrag0/transfercoop/tree/main/bin/Vista/img"
    click A5 "https://github.com/sebastian-buitrag0/transfercoop/tree/main/src/Vista/img"
    
    click B1 "https://github.com/sebastian-buitrag0/transfercoop/blob/main/src/Controlador/CLogin.java"
    click B2 "https://github.com/sebastian-buitrag0/transfercoop/blob/main/src/Controlador/CRegistro.java"
    click B3 "https://github.com/sebastian-buitrag0/transfercoop/blob/main/src/Controlador/CUsuario.java"
    click B4 "https://github.com/sebastian-buitrag0/transfercoop/blob/main/src/Controlador/CCorresponsal.java"
    
    click C1 "https://github.com/sebastian-buitrag0/transfercoop/blob/main/src/Modelo/Cliente.java"
    click C2 "https://github.com/sebastian-buitrag0/transfercoop/blob/main/src/Modelo/Usuario.java"
    click C3 "https://github.com/sebastian-buitrag0/transfercoop/blob/main/src/Modelo/Conexion.java"
    click C4 "https://github.com/sebastian-buitrag0/transfercoop/tree/main/src/Modelo"
    
    click D "https://github.com/sebastian-buitrag0/transfercoop/blob/main/src/MVC/MVC.java"
    click E "https://github.com/sebastian-buitrag0/transfercoop/tree/main/libreria"

    %% Styles
    classDef presentation fill:#8ecae6,stroke:#023047,stroke-width:2px;
    classDef controller fill:#ffb703,stroke:#fb8500,stroke-width:2px;
    classDef model fill:#a8dadc,stroke:#457b9d,stroke-width:2px;
    classDef db fill:#f4a261,stroke:#e76f51,stroke-width:2px;
    classDef external fill:#bde0fe,stroke:#3a86ff,stroke-width:2px;
```
