# joshuamc1/proyecto-tienda-de-ropa architecture

> Architecture diagram of the GitHub repository joshuamc1/proyecto-tienda-de-ropa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/joshuamc1/proyecto-tienda-de-ropa
- Repository: https://github.com/joshuamc1/proyecto-tienda-de-ropa

## Overview

1. **Project type and runtime**
   - This is a **Java desktop application** built with **JavaFX** and organized for **NetBeans/Ant** (`build.xml`, `nbproject/`, `manifest.mf`).
   - The app is a store-management system for “Yosary’s Store,” with modules for **login, main menu, sales, inventory, users, profile, dashboard, and reports**.

2. **Top-level architectural style**
   - The code follows a **presentation / controller / model / database** structure.
   - UI is defined in **FXML views** under `src/vista`.
   - JavaFX controllers live in `src/controlador`.
   - Business/data models and DB access live in `src/modelo`.
   - The database schema is stored separately in `DATABASE/tienda_de_ropa.sql`.

3. **Application entry and navigation**
   - `src/controlador/launch.java` is the app entry point.
   - The first visible flow is likely **Login → Main Menu → module screens**.
   - `MainMenuController` acts as the central navigation hub to open the other modules.

4. **Presentation layer**
   - Each major screen has a matching FXML file and controller:
     - `login.fxml` / `LoginController`
     - `mainMenu.fxml` / `MainMenuController`
     - `dashboard.fxml` / `DashboardController`
     - `sales.fxml` / `SalesController`
     - `inventory.fxml` / `InventoryController`
     - `users.fxml` / `UsersController`
     - `userProfile.fxml` / `UserProfileController`
     - `reports.fxml` / `ReportsController`
   - This suggests a fairly standard **screen-per-module** JavaFX structure.

5. **Inventory and product-maintenance subsystem**
   - Inventory-related maintenance is split into specialized controllers under `src/controlador/ProductOptions`:
     - `CreateProductTypeController`
     - `CreateProductGenreController`
     - `CreateSupplierController`
     - `CreateDiscountController`
     - `MarcaController`
   - These correspond to auxiliary catalog screens in `src/vista/ProductOptions/`.
   - The related data entities live in `src/modelo/inventoryModel/`:
     - `product`
     - `tipoProducto`
     - `generoProducto`
     - `proveedor`
     - `marca`
     - `descuentos`

6. **Sales subsystem**
   - `SalesController` and `sales.fxml` represent the sales workflow.
   - `src/controlador/clases/Fact_Model.java` likely supports invoice/receipt or transaction data.
   - The sales module probably reads product/customer data from the database and writes completed sales back to it.

7. **User administration and profile subsystem**
   - `UsersController` manages the administrative user screen.
   - `UserProfileController` manages the current user’s profile or account details.
   - Supporting classes in `src/controlador/clases/` include `User_Model.java` and `Usuario.java`, which likely represent user records and session/user state.

8. **Reporting subsystem**
   - `ReportsController` is the UI layer for reports.
   - `src/modelo/reports/generateReports.java` contains report-generation logic.
   - The repository includes `report1.jrxml`, indicating **JasperReports** is used to define and render reports.

9. **Database access and persistence**
   - `src/modelo/ConexionMySQL.java` is the central MySQL connection helper.
   - The repository includes `mysql-connector-java-8.0.23.jar`, confirming direct JDBC access to **MySQL**.
   - The SQL dump in `DATABASE/tienda_de_ropa.sql` is the authoritative database schema and seed data for the application.

10. **Shared utility layer**
   - `src/modelo/funciones/funciones.java` appears to hold shared helper functions used across modules.
   - This is likely where validation, formatting, or common database-related helpers are centralized.

11. **External libraries and why they matter**
   - **JasperReports** and Groovy are present for reporting.
   - **Apache POI** is bundled, which suggests spreadsheet import/export or document generation features may exist or be planned.
   - Multiple Commons libraries support reporting and data handling.
   - These dependencies indicate the app is not just CRUD; it also produces formatted business outputs.

12. **Frontend assets and styling**
   - FXML views are paired with CSS files in `src/vista/style/`.
   - Images are in `src/vista/img/`.
   - The UI is therefore mostly desktop-form based, with per-module styling rather than a shared web-style layout system.

13. **Likely data flow across the system**
   - User interacts with a JavaFX screen.
   - The controller validates input and coordinates actions.
   - The controller calls model/DB helper classes in `src/modelo`.
   - Data is read from or written to MySQL.
   - Reports are generated from persisted data and rendered through JasperReports.

14. **Important architectural boundaries for a diagram**
   - **UI boundary:** FXML/CSS/images in `src/vista`.
   - **Control boundary:** JavaFX controllers in `src/controlador`.
   - **Domain/data boundary:** model classes in `src/modelo` and `src/controlador/clases`.
   - **Persistence boundary:** MySQL schema plus JDBC connection helper.
   - **Reporting boundary:** JasperReports-based report generation.

15. **What the repo suggests about maturity**
   - The README checklist shows some modules are complete and others are still pending, so this looks like a **student project with active feature growth**.
   - The architecture is already modular, but several domains are still partially implemented or in progress, especially inventory and purchases.

Main entry points: [`src/controlador/MainMenuController.java`](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/MainMenuController.java) (MenuCtrl), [`src/controlador/SalesController.java`](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/SalesController.java) (SalesCtrl), [`src/controlador/LoginController.java`](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/LoginController.java) (LoginCtrl), [`src/controlador/InventoryController.java`](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/InventoryController.java) (InventoryCtrl)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Presentation"]
  node_login_view["Login<br/>fxml view<br/>[login.fxml]"]
  node_menu_view["Main Menu<br/>fxml view<br/>[mainMenu.fxml]"]
  node_sales_view["Sales<br/>fxml view<br/>[sales.fxml]"]
  node_inventory_view["Inventory<br/>fxml view<br/>[inventory.fxml]"]
  node_user_view["Users<br/>fxml view<br/>[users.fxml]"]
  node_profile_view["Profile<br/>fxml view<br/>[userProfile.fxml]"]
  node_reports_view["Reports<br/>fxml view<br/>[reports.fxml]"]
end

subgraph group_control["Controllers"]
  node_launch["Launch<br/>entrypoint<br/>[launch.java]"]
  node_login_ctrl["LoginCtrl<br/>controller"]
  node_menu_ctrl["MenuCtrl<br/>controller"]
  node_dashboard_ctrl["Dashboard<br/>controller"]
  node_sales_ctrl["SalesCtrl<br/>controller"]
  node_inventory_ctrl["InventoryCtrl<br/>controller"]
  node_user_ctrl["UsersCtrl<br/>controller"]
  node_profile_ctrl["ProfileCtrl<br/>controller"]
  node_reports_ctrl["ReportsCtrl<br/>controller"]
  node_catalog_ctrl["Catalog Options<br/>controllers"]
end

subgraph group_model["Domain & Data"]
  node_inventory_model["Inventory Models<br/>domain model"]
  node_shared_models["Shared Models<br/>domain model"]
end

subgraph group_persistence["Persistence & Reports"]
  node_db_helper[("MySQL Helper<br/>jdbc helper<br/>[ConexionMySQL.java]")]
  node_reports_engine["Reports Engine<br/>report service"]
  node_schema_sql[("Schema SQL<br/>database schema<br/>[tienda_de_ropa.sql]")]
end

node_launch -->|"starts"| node_login_ctrl
node_login_ctrl -->|"renders"| node_login_view
node_login_ctrl -->|"authenticates"| node_menu_ctrl
node_menu_ctrl -->|"renders"| node_menu_view
node_menu_ctrl -->|"opens"| node_dashboard_ctrl
node_menu_ctrl -->|"opens"| node_sales_ctrl
node_menu_ctrl -->|"opens"| node_inventory_ctrl
node_menu_ctrl -->|"opens"| node_user_ctrl
node_menu_ctrl -->|"opens"| node_profile_ctrl
node_menu_ctrl -->|"opens"| node_reports_ctrl
node_dashboard_ctrl -->|"reads"| node_db_helper
node_sales_ctrl -->|"renders"| node_sales_view
node_sales_ctrl -->|"uses"| node_shared_models
node_sales_ctrl -->|"writes"| node_db_helper
node_inventory_ctrl -->|"renders"| node_inventory_view
node_inventory_ctrl -->|"delegates"| node_catalog_ctrl
node_catalog_ctrl -->|"manages"| node_inventory_model
node_user_ctrl -->|"renders"| node_user_view
node_profile_ctrl -->|"renders"| node_profile_view
node_reports_ctrl -->|"renders"| node_reports_view
node_reports_ctrl -->|"generates"| node_reports_engine
node_reports_engine -->|"queries"| node_schema_sql
node_db_helper -->|"connects to"| node_schema_sql
node_login_view -->|"binds"| node_login_ctrl
node_menu_view -->|"binds"| node_menu_ctrl
node_sales_view -->|"binds"| node_sales_ctrl
node_inventory_view -->|"binds"| node_inventory_ctrl
node_user_view -->|"binds"| node_user_ctrl
node_profile_view -->|"binds"| node_profile_ctrl
node_reports_view -->|"binds"| node_reports_ctrl

click node_launch "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/launch.java"
click node_login_view "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/login.fxml"
click node_login_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/LoginController.java"
click node_menu_view "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/mainMenu.fxml"
click node_menu_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/MainMenuController.java"
click node_dashboard_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/DashboardController.java"
click node_sales_view "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/sales.fxml"
click node_sales_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/SalesController.java"
click node_inventory_view "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/inventory.fxml"
click node_inventory_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/InventoryController.java"
click node_user_view "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/users.fxml"
click node_user_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/UsersController.java"
click node_profile_view "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/userProfile.fxml"
click node_profile_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/UserProfileController.java"
click node_reports_view "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/reports.fxml"
click node_reports_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/ReportsController.java"
click node_catalog_ctrl "https://github.com/joshuamc1/proyecto-tienda-de-ropa/tree/main/src/controlador/ProductOptions"
click node_inventory_model "https://github.com/joshuamc1/proyecto-tienda-de-ropa/tree/main/src/modelo/inventoryModel"
click node_shared_models "https://github.com/joshuamc1/proyecto-tienda-de-ropa/tree/main/src/controlador/clases"
click node_db_helper "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/modelo/ConexionMySQL.java"
click node_reports_engine "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/modelo/reports/generateReports.java"
click node_schema_sql "https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/DATABASE/tienda_de_ropa.sql"

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_view,node_menu_view,node_sales_view,node_inventory_view,node_user_view,node_profile_view,node_reports_view toneBlue
class node_launch,node_login_ctrl,node_menu_ctrl,node_dashboard_ctrl,node_sales_ctrl,node_inventory_ctrl,node_user_ctrl,node_profile_ctrl,node_reports_ctrl,node_catalog_ctrl toneAmber
class node_inventory_model,node_shared_models toneMint
class node_db_helper,node_reports_engine,node_schema_sql toneRose
```

## Components

### Presentation

JavaFX screens, styling, and assets.

- [Login](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/login.fxml): fxml view · Authentication screen. · `src/vista/login.fxml`
- [Main Menu](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/mainMenu.fxml): fxml view · Central navigation screen. · `src/vista/mainMenu.fxml`
- [Sales](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/sales.fxml): fxml view · Sales workflow screen. · `src/vista/sales.fxml`
- [Inventory](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/inventory.fxml): fxml view · Inventory management screen. · `src/vista/inventory.fxml`
- [Users](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/users.fxml): fxml view · Administrative user screen. · `src/vista/users.fxml`
- [Profile](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/userProfile.fxml): fxml view · Current user profile screen. · `src/vista/userProfile.fxml`
- [Reports](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/vista/reports.fxml): fxml view · Reporting screen. · `src/vista/reports.fxml`

### Controllers

Navigation and screen logic for the app.

- [Launch](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/launch.java): entrypoint · Application startup class. · `src/controlador/launch.java`
- [LoginCtrl](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/LoginController.java): controller · Handles sign-in flow. · `src/controlador/LoginController.java`
- [MenuCtrl](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/MainMenuController.java): controller · Main navigation hub. · `src/controlador/MainMenuController.java`
- [Dashboard](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/DashboardController.java): controller · Summary and overview screen logic. · `src/controlador/DashboardController.java`
- [SalesCtrl](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/SalesController.java): controller · Handles sales transactions. · `src/controlador/SalesController.java`
- [InventoryCtrl](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/InventoryController.java): controller · Coordinates inventory operations. · `src/controlador/InventoryController.java`
- [UsersCtrl](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/UsersController.java): controller · Manages users and accounts. · `src/controlador/UsersController.java`
- [ProfileCtrl](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/UserProfileController.java): controller · Handles profile details. · `src/controlador/UserProfileController.java`
- [ReportsCtrl](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/controlador/ReportsController.java): controller · Triggers report generation. · `src/controlador/ReportsController.java`
- [Catalog Options](https://github.com/joshuamc1/proyecto-tienda-de-ropa/tree/main/src/controlador/ProductOptions): controllers · Auxiliary inventory catalogs: product type, genre, supplier, discount, brand. · `src/controlador/ProductOptions`

### Domain & Data

Shared models, inventory entities, and helper classes.

- [Inventory Models](https://github.com/joshuamc1/proyecto-tienda-de-ropa/tree/main/src/modelo/inventoryModel): domain model · Product, type, genre, supplier, brand, and discount entities. · `src/modelo/inventoryModel`
- [Shared Models](https://github.com/joshuamc1/proyecto-tienda-de-ropa/tree/main/src/controlador/clases): domain model · Invoice and user/session model classes. · `src/controlador/clases`

### Persistence & Reports

MySQL access, schema, and JasperReports generation.

- [MySQL Helper](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/modelo/ConexionMySQL.java): jdbc helper · Central MySQL connection utility. · `src/modelo/ConexionMySQL.java`
- [Reports Engine](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/src/modelo/reports/generateReports.java): report service · JasperReports generation logic. · `src/modelo/reports/generateReports.java`
- [Schema SQL](https://github.com/joshuamc1/proyecto-tienda-de-ropa/blob/main/DATABASE/tienda_de_ropa.sql): database schema · Database dump and seed data. · `DATABASE/tienda_de_ropa.sql`

## Connections

- Launch → LoginCtrl: starts · Entry point opens the login flow.
- LoginCtrl → Login: renders · Controller drives the login screen.
- LoginCtrl → MenuCtrl: authenticates · Successful login transitions to the main menu.
- MenuCtrl → Main Menu: renders · Main menu screen is shown.
- MenuCtrl → Dashboard: opens · Navigation hub launches dashboard.
- MenuCtrl → SalesCtrl: opens · Navigation hub launches sales module.
- MenuCtrl → InventoryCtrl: opens · Navigation hub launches inventory module.
- MenuCtrl → UsersCtrl: opens · Navigation hub launches user administration.
- MenuCtrl → ProfileCtrl: opens · Navigation hub launches profile screen.
- MenuCtrl → ReportsCtrl: opens · Navigation hub launches reports screen.
- Dashboard → MySQL Helper: reads · Dashboard aggregates persisted data.
- SalesCtrl → Sales: renders · Sales controller drives the sales UI.
- SalesCtrl → Shared Models: uses · Sales logic uses invoice/user state models.
- SalesCtrl → MySQL Helper: writes · Completed sales persist through JDBC.
- InventoryCtrl → Inventory: renders · Inventory controller drives the inventory UI.
- InventoryCtrl → Catalog Options: delegates · Inventory module opens catalog-maintenance screens.
- Catalog Options → Inventory Models: manages · Catalog screens maintain product-related entities.
- UsersCtrl → Users: renders · User admin controller drives the users UI.
- ProfileCtrl → Profile: renders · Profile controller drives the profile UI.
- ReportsCtrl → Reports: renders · Reports controller drives the reports UI.
- ReportsCtrl → Reports Engine: generates · Reports UI invokes JasperReports generation.
- Reports Engine → Schema SQL: queries · Reports are built from persisted store data.
- MySQL Helper → Schema SQL: connects to · Connection helper targets the MySQL schema.
- Login → LoginCtrl: binds · FXML is paired with its controller.
- Main Menu → MenuCtrl: binds · FXML is paired with its controller.
- Sales → SalesCtrl: binds · FXML is paired with its controller.
- Inventory → InventoryCtrl: binds · FXML is paired with its controller.
- Users → UsersCtrl: binds · FXML is paired with its controller.
- Profile → ProfileCtrl: binds · FXML is paired with its controller.
- Reports → ReportsCtrl: binds · FXML is paired with its controller.
