# antoniodp00/fitness360-proyecto3eval- architecture

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

- Interactive diagram: https://gitdiagram.com/antoniodp00/fitness360-proyecto3eval-
- Repository: https://github.com/antoniodp00/fitness360-proyecto3eval-

## Overview

##### Project type and purpose
- This is a standalone desktop application (not a web app) built in Java 17 with JavaFX.
- Purpose: Manage fitness routines, diets, client/professional users and subscriptions (tarifas) in a gym context.
- Architectural style: a classic 3-tier MVC (Presentation → Business/Controller → Data).

##### File structure
- src/main/java/com/dam/...
- controller/ → JavaFX controllers (view logic)
- model/ → domain entities (Cliente, Rutina, Dieta, Tarifa, Revision…)
- DAO/ → Data Access Objects, one per entity plus a GenericDAO
- baseDatos/ → low-level JDBC connection management (ConnectionDB, XMLManager)
- utilidades/ → shared utilities (HashUtil, generic methods)
- exceptions/ → custom validation/runtime exceptions
- MainApplication.java → JavaFX startup entry point
- src/main/resources/com/dam/...
- fxml/ → all FXML view definitions
- css/ → styling
- Top-level: BBDD scripts (MySQL schema and seed data), connection.xml (DB credentials), logback.xml (logging config), Maven wrapper & pom.xml.

##### README for additional insights
- Confirmed use of MVC.
- Technologies: JavaFX GUI, JDBC → MySQL, Maven for build, Logback for logging.
- No external microservices—client talks directly to DB over JDBC.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% UI Layer
    subgraph "UI Layer"
        MainApplication["MainApplication"]:::ui
        FXML["FXML Views"]:::ui
        CSS["CSS Styles"]:::ui
    end

    %% Business Layer
    subgraph "Business Layer"
        ControllerLayer["Controller Layer"]:::business
        ModelLayer["Model Layer"]:::business
        Utilities["Utilities"]:::business
        Exceptions["Exceptions"]:::business
    end

    %% Data Layer
    subgraph "Data Layer"
        DAOLayer["DAO Layer"]:::data
        ConnectionManager["Connection Manager"]:::data
    end

    %% External Systems
    subgraph "External Systems"
        ConfigXML["connection.xml"]:::external
        MySQL[(MySQL Database)]:::external
        LogConfig["logback.xml"]:::external
        Logs["logs/"]:::external
        DBScripts["BBDD/"]:::external
        Module["module-info.java"]:::external
        Pom["pom.xml"]:::external
    end

    %% Relationships
    MainApplication -->|loads| FXML
    MainApplication -->|loads| CSS
    FXML -->|"user events"| ControllerLayer
    ControllerLayer -->|"uses"| ModelLayer
    ControllerLayer -->|"calls DAO"| DAOLayer
    ControllerLayer -->|"utilizes"| Utilities
    ControllerLayer -->|"throws"| Exceptions
    DAOLayer -->|"connects via"| ConnectionManager
    ConnectionManager -->|"reads credentials from"| ConfigXML
    ConnectionManager -->|"JDBC"| MySQL
    ControllerLayer -->|"logs to"| LogConfig
    DAOLayer -->|"logs to"| LogConfig
    LogConfig -->|"writes to"| Logs

    %% Click Events
    click MainApplication "https://github.com/antoniodp00/fitness360-proyecto3eval-/blob/main/src/main/java/com/dam/adp/fitness360proyecto3eval/MainApplication.java"
    click FXML "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/src/main/resources/com/dam/adp/fitness360proyecto3eval/fxml/"
    click CSS "https://github.com/antoniodp00/fitness360-proyecto3eval-/blob/main/src/main/resources/com/dam/adp/fitness360proyecto3eval/css/styles.css"
    click ControllerLayer "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/src/main/java/com/dam/adp/fitness360proyecto3eval/controller/"
    click ModelLayer "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/src/main/java/com/dam/adp/fitness360proyecto3eval/model/"
    click DAOLayer "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/src/main/java/com/dam/adp/fitness360proyecto3eval/DAO/"
    click ConnectionManager "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/src/main/java/com/dam/adp/fitness360proyecto3eval/baseDatos/"
    click ConfigXML "https://github.com/antoniodp00/fitness360-proyecto3eval-/blob/main/connection.xml"
    click LogConfig "https://github.com/antoniodp00/fitness360-proyecto3eval-/blob/main/src/main/resources/logback.xml"
    click Logs "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/logs/"
    click Exceptions "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/src/main/java/com/dam/adp/fitness360proyecto3eval/exceptions/"
    click Utilities "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/src/main/java/com/dam/adp/fitness360proyecto3eval/utilidades/"
    click DBScripts "https://github.com/antoniodp00/fitness360-proyecto3eval-/tree/main/BBDD/"
    click Module "https://github.com/antoniodp00/fitness360-proyecto3eval-/blob/main/src/main/java/module-info.java"
    click Pom "https://github.com/antoniodp00/fitness360-proyecto3eval-/blob/main/pom.xml"

    %% Styles
    classDef ui fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef business fill:#90EE90,stroke:#000,stroke-width:1px
    classDef data fill:#FFA500,stroke:#000,stroke-width:1px
    classDef external fill:#D3D3D3,stroke:#000,stroke-width:1px
```
