# victorpedroza/systempdv architecture

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

- Interactive diagram: https://gitdiagram.com/victorpedroza/systempdv
- Repository: https://github.com/victorpedroza/systempdv

## Overview

This is a Java Swing point-of-sale application with product catalog, cashier and self-service screens, client and employee management, and reporting. The demonstrated workflow starts the desktop UI, opens the menu, and enters product management, where the screen collects product details, invokes the DAO, and loads catalog rows from MySQL. Other menu destinations are represented by their named screens, but sampled excerpts do not establish their internal behavior; their implementation details and any sales persistence are therefore not inferred.

Main entry points: [`src/view/MenuScreen.java`](https://github.com/victorpedroza/systempdv/blob/master/src/view/MenuScreen.java) (Navigation menu), [`src/view/Interface.java`](https://github.com/victorpedroza/systempdv/blob/master/src/view/Interface.java) (Main window), [`src/view/ProductManagementScreen.java`](https://github.com/victorpedroza/systempdv/blob/master/src/view/ProductManagementScreen.java) (Product management), [`src/beans/ProductDAO.java`](https://github.com/victorpedroza/systempdv/blob/master/src/beans/ProductDAO.java) (Product DAO)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["Application startup<br/>[Aplic.java]"]
  node_mainframe["Main window<br/>[Interface.java]"]
  node_menu["Navigation menu<br/>[MenuScreen.java]"]
end

subgraph group_operations["POS operations"]
  node_productui["Product management"]
  node_addform["Product entry form"]
  node_clients["Client management"]
  node_employees["Employee management"]
  node_salesmanagement["Sales management"]
  node_cashier["Cashier screen<br/>[SalesScreen.java]"]
  node_selfservice["Self-service screen"]
  node_reports["Reports screen<br/>[ReportScreen.java]"]
end

subgraph group_domain["Domain models"]
  node_product["Product model<br/>[Product.java]"]
  node_user["User model<br/>[User.java]"]
  node_client["Client model<br/>[Client.java]"]
  node_employee["Employee model<br/>[Employee.java]"]
  node_usercontroller["User controller"]
end

subgraph group_persistence["Product persistence"]
  node_productdao["Product DAO<br/>[ProductDAO.java]"]
  node_database["Database connector<br/>[Database.java]"]
end

node_operator(("Store operator"))
node_mysql[("MySQL database")]

node_operator -->|"starts"| node_app
node_app -->|"opens"| node_mainframe
node_mainframe -->|"displays"| node_menu
node_mainframe -->|"registers"| node_cashier
node_mainframe -->|"registers"| node_selfservice
node_menu -->|"opens"| node_productui
node_menu -->|"routes to"| node_clients
node_menu -->|"routes to"| node_employees
node_menu -->|"routes to"| node_salesmanagement
node_menu -->|"routes to"| node_reports
node_productui -->|"shows"| node_addform
node_productui -->|"loads and saves"| node_productdao
node_productui -->|"creates and displays"| node_product
node_productdao -->|"maps rows"| node_product
node_productdao -->|"obtains connection"| node_database
node_database -->|"connects to"| node_mysql
node_client -->|"extends"| node_user
node_employee -->|"extends"| node_user

click node_app "https://github.com/victorpedroza/systempdv/blob/master/src/Aplic.java"
click node_mainframe "https://github.com/victorpedroza/systempdv/blob/master/src/view/Interface.java"
click node_menu "https://github.com/victorpedroza/systempdv/blob/master/src/view/MenuScreen.java"
click node_productui "https://github.com/victorpedroza/systempdv/blob/master/src/view/ProductManagementScreen.java"
click node_addform "https://github.com/victorpedroza/systempdv/blob/master/src/view/form/AddProductForm.java"
click node_clients "https://github.com/victorpedroza/systempdv/blob/master/src/view/ClientManagementScreen.java"
click node_employees "https://github.com/victorpedroza/systempdv/blob/master/src/view/EmployeeManagementScreen.java"
click node_salesmanagement "https://github.com/victorpedroza/systempdv/blob/master/src/view/SalesManagementScreen.java"
click node_cashier "https://github.com/victorpedroza/systempdv/blob/master/src/view/SalesScreen.java"
click node_selfservice "https://github.com/victorpedroza/systempdv/blob/master/src/view/SelfSalesScreen.java"
click node_reports "https://github.com/victorpedroza/systempdv/blob/master/src/view/ReportScreen.java"
click node_product "https://github.com/victorpedroza/systempdv/blob/master/src/model/Product.java"
click node_user "https://github.com/victorpedroza/systempdv/blob/master/src/model/User.java"
click node_client "https://github.com/victorpedroza/systempdv/blob/master/src/model/Client.java"
click node_employee "https://github.com/victorpedroza/systempdv/blob/master/src/model/Employee.java"
click node_usercontroller "https://github.com/victorpedroza/systempdv/blob/master/src/controller/UserController.java"
click node_productdao "https://github.com/victorpedroza/systempdv/blob/master/src/beans/ProductDAO.java"
click node_database "https://github.com/victorpedroza/systempdv/blob/master/src/config/database/Database.java"

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_app,node_mainframe,node_menu toneBlue
class node_productui,node_addform,node_clients,node_employees,node_salesmanagement,node_cashier,node_selfservice,node_reports,node_mysql toneAmber
class node_product,node_user,node_client,node_employee,node_usercontroller toneMint
class node_productdao,node_database toneRose
class node_operator toneIndigo
```

## Components

### Desktop interface

- [Application startup](https://github.com/victorpedroza/systempdv/blob/master/src/Aplic.java): `src/Aplic.java`
- [Main window](https://github.com/victorpedroza/systempdv/blob/master/src/view/Interface.java): `src/view/Interface.java`
- [Navigation menu](https://github.com/victorpedroza/systempdv/blob/master/src/view/MenuScreen.java): `src/view/MenuScreen.java`

### POS operations

- [Product management](https://github.com/victorpedroza/systempdv/blob/master/src/view/ProductManagementScreen.java): `src/view/ProductManagementScreen.java`
- [Product entry form](https://github.com/victorpedroza/systempdv/blob/master/src/view/form/AddProductForm.java): `src/view/form/AddProductForm.java`
- [Client management](https://github.com/victorpedroza/systempdv/blob/master/src/view/ClientManagementScreen.java): `src/view/ClientManagementScreen.java`
- [Employee management](https://github.com/victorpedroza/systempdv/blob/master/src/view/EmployeeManagementScreen.java): `src/view/EmployeeManagementScreen.java`
- [Sales management](https://github.com/victorpedroza/systempdv/blob/master/src/view/SalesManagementScreen.java): `src/view/SalesManagementScreen.java`
- [Cashier screen](https://github.com/victorpedroza/systempdv/blob/master/src/view/SalesScreen.java): `src/view/SalesScreen.java`
- [Self-service screen](https://github.com/victorpedroza/systempdv/blob/master/src/view/SelfSalesScreen.java): `src/view/SelfSalesScreen.java`
- [Reports screen](https://github.com/victorpedroza/systempdv/blob/master/src/view/ReportScreen.java): `src/view/ReportScreen.java`

### Domain models

- [Product model](https://github.com/victorpedroza/systempdv/blob/master/src/model/Product.java): `src/model/Product.java`
- [User model](https://github.com/victorpedroza/systempdv/blob/master/src/model/User.java): `src/model/User.java`
- [Client model](https://github.com/victorpedroza/systempdv/blob/master/src/model/Client.java): `src/model/Client.java`
- [Employee model](https://github.com/victorpedroza/systempdv/blob/master/src/model/Employee.java): `src/model/Employee.java`
- [User controller](https://github.com/victorpedroza/systempdv/blob/master/src/controller/UserController.java): `src/controller/UserController.java`

### Product persistence

- [Product DAO](https://github.com/victorpedroza/systempdv/blob/master/src/beans/ProductDAO.java): `src/beans/ProductDAO.java`
- [Database connector](https://github.com/victorpedroza/systempdv/blob/master/src/config/database/Database.java): `src/config/database/Database.java`

### Other components

- **Store operator**
- **MySQL database**

## Connections

- Store operator → Application startup: starts (evidence: `src/Aplic.java`)
- Application startup → Main window: opens (evidence: `src/Aplic.java`)
- Main window → Navigation menu: displays (evidence: `src/view/Interface.java`)
- Main window → Cashier screen: registers (evidence: `src/view/Interface.java`)
- Main window → Self-service screen: registers (evidence: `src/view/Interface.java`)
- Navigation menu → Product management: opens (evidence: `src/view/MenuScreen.java`)
- Navigation menu → Client management: routes to (evidence: `src/view/MenuScreen.java`)
- Navigation menu → Employee management: routes to (evidence: `src/view/MenuScreen.java`)
- Navigation menu → Sales management: routes to (evidence: `src/view/MenuScreen.java`)
- Navigation menu → Reports screen: routes to (evidence: `src/view/MenuScreen.java`)
- Product management → Product entry form: shows (evidence: `src/view/ProductManagementScreen.java`)
- Product management → Product DAO: loads and saves (evidence: `src/view/ProductManagementScreen.java`)
- Product management → Product model: creates and displays (evidence: `src/view/ProductManagementScreen.java`)
- Product DAO → Product model: maps rows (evidence: `src/beans/ProductDAO.java`)
- Product DAO → Database connector: obtains connection (evidence: `src/beans/ProductDAO.java`)
- Database connector → MySQL database: connects to (evidence: `src/config/database/Database.java`)
- Client model → User model: extends (evidence: `src/model/Client.java`)
- Employee model → User model: extends (evidence: `src/model/Employee.java`)
