# lucianoo-png/proyectoweb architecture

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

- Interactive diagram: https://gitdiagram.com/lucianoo-png/proyectoweb
- Repository: https://github.com/lucianoo-png/proyectoweb

## Overview

LuchanosCorp is a PHP commerce application with customer shopping and ordering, plus employee-facing inventory, purchasing, delivery, reporting, and administration areas. The visible web entry point handles AJAX requests and constructs controllers; order registration then delegates to the order model and retrieves customer/address data. The README provides no product details, and many view and report files were not sampled, so their internal routing and dependencies are not asserted here.

Main entry points: [`index.php`](https://github.com/lucianoo-png/proyectoweb/blob/main/index.php) (Web entry), [`modelo/Conexion.php`](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Conexion.php) (Database connector), [`control/PedidoControlador.php`](https://github.com/lucianoo-png/proyectoweb/blob/main/control/PedidoControlador.php) (Order processing), [`control/SolicitudReabastecimientoControlador.php`](https://github.com/lucianoo-png/proyectoweb/blob/main/control/SolicitudReabastecimientoControlador.php) (Replenishment requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and views"]
  node_entry["Web entry<br/>[index.php]"]
  node_storefront["Storefront pages"]
  node_account["Account registration<br/>[Registro.php]"]
  node_adminui["Admin workspace"]
  node_staffui["Staff workspaces"]
end

subgraph group_commerce["Shopping and orders"]
  node_catalog["Product catalog"]
  node_cart["Cart reservations"]
  node_checkout["Order processing"]
  node_customerops["Customer accounts"]
end

subgraph group_operations["Staff operations"]
  node_employees["Employee operations"]
  node_purchasing["Purchases"]
  node_replenishment["Replenishment requests"]
  node_reports["Sales and reports"]
  node_audit["Audit logging"]
end

subgraph group_data["Persistence and audit"]
  node_products["Product data<br/>[Producto.php]"]
  node_reservations["Reservation data<br/>[Reserva.php]"]
  node_orders["Order data<br/>[Pedido.php]"]
  node_customers["Customer data<br/>[Cliente.php]"]
  node_purchasemodel["Purchase data<br/>[Compra.php]"]
  node_requestmodel["Replenishment data"]
  node_auditmodel["Audit records<br/>[Bitacora.php]"]
  node_connection["Database connector<br/>[Conexion.php]"]
end

node_customer(("Shopper"))
node_staff(("Staff users"))
node_database[("PostgreSQL database")]

node_customer -->|"uses"| node_entry
node_staff -.->|"uses"| node_entry
node_entry -->|"dispatches"| node_catalog
node_entry -->|"dispatches"| node_customerops
node_entry -->|"dispatches"| node_replenishment
node_entry -->|"dispatches"| node_purchasing
node_entry -->|"dispatches"| node_checkout
node_entry -.->|"renders"| node_storefront
node_entry -.->|"renders"| node_adminui
node_entry -.->|"renders"| node_staffui
node_entry -.->|"dispatches"| node_cart
node_catalog -->|"uses"| node_products
node_cart -->|"uses"| node_reservations
node_checkout -->|"registers"| node_orders
node_checkout -->|"retrieves customer data"| node_customerops
node_customerops -->|"uses"| node_customers
node_employees -->|"creates"| node_audit
node_employees -->|"uses"| node_account
node_purchasing -->|"uses"| node_purchasemodel
node_replenishment -->|"uses"| node_requestmodel
node_replenishment -->|"uses"| node_employees
node_audit -->|"uses"| node_auditmodel
node_products -->|"queries"| node_connection
node_reservations -->|"queries"| node_connection
node_orders -->|"queries"| node_connection
node_customers -->|"queries"| node_connection
node_purchasemodel -->|"queries"| node_connection
node_requestmodel -->|"queries"| node_connection
node_auditmodel -->|"queries"| node_connection
node_connection -->|"connects"| node_database
node_reports -.->|"uses"| node_orders
node_adminui -.->|"offers"| node_reports

click node_entry "https://github.com/lucianoo-png/proyectoweb/blob/main/index.php"
click node_storefront "https://github.com/lucianoo-png/proyectoweb/tree/main/vista"
click node_account "https://github.com/lucianoo-png/proyectoweb/blob/main/vista/Cuenta/Registro.php"
click node_adminui "https://github.com/lucianoo-png/proyectoweb/tree/main/vista/admin"
click node_staffui "https://github.com/lucianoo-png/proyectoweb/tree/main/vista/vendedor"
click node_catalog "https://github.com/lucianoo-png/proyectoweb/blob/main/control/ProductoControlador.php"
click node_cart "https://github.com/lucianoo-png/proyectoweb/blob/main/control/CarritoControlador.php"
click node_checkout "https://github.com/lucianoo-png/proyectoweb/blob/main/control/PedidoControlador.php"
click node_customerops "https://github.com/lucianoo-png/proyectoweb/blob/main/control/ClienteControlador.php"
click node_products "https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Producto.php"
click node_reservations "https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Reserva.php"
click node_orders "https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Pedido.php"
click node_customers "https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Cliente.php"
click node_employees "https://github.com/lucianoo-png/proyectoweb/blob/main/control/EmpleadoControlador.php"
click node_purchasing "https://github.com/lucianoo-png/proyectoweb/blob/main/control/CompraControlador.php"
click node_replenishment "https://github.com/lucianoo-png/proyectoweb/blob/main/control/SolicitudReabastecimientoControlador.php"
click node_reports "https://github.com/lucianoo-png/proyectoweb/tree/main/reportes"
click node_audit "https://github.com/lucianoo-png/proyectoweb/blob/main/control/BitacoraControlador.php"
click node_purchasemodel "https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Compra.php"
click node_requestmodel "https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/SolicitudReabastecimiento.php"
click node_auditmodel "https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Bitacora.php"
click node_connection "https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Conexion.php"

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_entry,node_storefront,node_account,node_adminui,node_staffui,node_staff toneBlue
class node_catalog,node_cart,node_checkout,node_customerops,node_database toneAmber
class node_employees,node_purchasing,node_replenishment,node_reports,node_audit toneMint
class node_products,node_reservations,node_orders,node_customers,node_purchasemodel,node_requestmodel,node_auditmodel,node_connection toneRose
class node_customer toneIndigo
```

## Components

### Web entry and views

- [Web entry](https://github.com/lucianoo-png/proyectoweb/blob/main/index.php): `index.php`
- [Storefront pages](https://github.com/lucianoo-png/proyectoweb/tree/main/vista): `vista`
- [Account registration](https://github.com/lucianoo-png/proyectoweb/blob/main/vista/Cuenta/Registro.php): `vista/Cuenta/Registro.php`
- [Admin workspace](https://github.com/lucianoo-png/proyectoweb/tree/main/vista/admin): `vista/admin`
- [Staff workspaces](https://github.com/lucianoo-png/proyectoweb/tree/main/vista/vendedor): `vista/vendedor`

### Shopping and orders

- [Product catalog](https://github.com/lucianoo-png/proyectoweb/blob/main/control/ProductoControlador.php): `control/ProductoControlador.php`
- [Cart reservations](https://github.com/lucianoo-png/proyectoweb/blob/main/control/CarritoControlador.php): `control/CarritoControlador.php`
- [Order processing](https://github.com/lucianoo-png/proyectoweb/blob/main/control/PedidoControlador.php): `control/PedidoControlador.php`
- [Customer accounts](https://github.com/lucianoo-png/proyectoweb/blob/main/control/ClienteControlador.php): `control/ClienteControlador.php`

### Staff operations

- [Employee operations](https://github.com/lucianoo-png/proyectoweb/blob/main/control/EmpleadoControlador.php): `control/EmpleadoControlador.php`
- [Purchases](https://github.com/lucianoo-png/proyectoweb/blob/main/control/CompraControlador.php): `control/CompraControlador.php`
- [Replenishment requests](https://github.com/lucianoo-png/proyectoweb/blob/main/control/SolicitudReabastecimientoControlador.php): `control/SolicitudReabastecimientoControlador.php`
- [Sales and reports](https://github.com/lucianoo-png/proyectoweb/tree/main/reportes): `reportes`
- [Audit logging](https://github.com/lucianoo-png/proyectoweb/blob/main/control/BitacoraControlador.php): `control/BitacoraControlador.php`

### Persistence and audit

- [Product data](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Producto.php): `modelo/Producto.php`
- [Reservation data](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Reserva.php): `modelo/Reserva.php`
- [Order data](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Pedido.php): `modelo/Pedido.php`
- [Customer data](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Cliente.php): `modelo/Cliente.php`
- [Purchase data](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Compra.php): `modelo/Compra.php`
- [Replenishment data](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/SolicitudReabastecimiento.php): `modelo/SolicitudReabastecimiento.php`
- [Audit records](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Bitacora.php): `modelo/Bitacora.php`
- [Database connector](https://github.com/lucianoo-png/proyectoweb/blob/main/modelo/Conexion.php): `modelo/Conexion.php`

### Other components

- **Shopper**
- **Staff users**
- **PostgreSQL database**

## Connections

- Shopper → Web entry: uses (evidence: `index.php`)
- Staff users → Web entry: uses
- Web entry → Product catalog: dispatches (evidence: `index.php`)
- Web entry → Customer accounts: dispatches (evidence: `index.php`)
- Web entry → Replenishment requests: dispatches (evidence: `index.php`)
- Web entry → Purchases: dispatches (evidence: `index.php`)
- Web entry → Order processing: dispatches (evidence: `index.php`)
- Web entry → Storefront pages: renders
- Web entry → Admin workspace: renders
- Web entry → Staff workspaces: renders
- Web entry → Cart reservations: dispatches (evidence: `index.php`)
- Product catalog → Product data: uses (evidence: `control/ProductoControlador.php`)
- Cart reservations → Reservation data: uses (evidence: `control/CarritoControlador.php`)
- Order processing → Order data: registers (evidence: `control/PedidoControlador.php`)
- Order processing → Customer accounts: retrieves customer data (evidence: `control/PedidoControlador.php`)
- Customer accounts → Customer data: uses (evidence: `control/ClienteControlador.php`)
- Employee operations → Audit logging: creates (evidence: `control/EmpleadoControlador.php`)
- Employee operations → Account registration: uses (evidence: `control/EmpleadoControlador.php`)
- Purchases → Purchase data: uses (evidence: `control/CompraControlador.php`)
- Replenishment requests → Replenishment data: uses (evidence: `control/SolicitudReabastecimientoControlador.php`)
- Replenishment requests → Employee operations: uses (evidence: `control/SolicitudReabastecimientoControlador.php`)
- Audit logging → Audit records: uses (evidence: `control/BitacoraControlador.php`)
- Product data → Database connector: queries (evidence: `modelo/Producto.php`)
- Reservation data → Database connector: queries (evidence: `modelo/Reserva.php`)
- Order data → Database connector: queries (evidence: `modelo/Pedido.php`)
- Customer data → Database connector: queries (evidence: `modelo/Cliente.php`)
- Purchase data → Database connector: queries (evidence: `modelo/Compra.php`)
- Replenishment data → Database connector: queries (evidence: `modelo/SolicitudReabastecimiento.php`)
- Audit records → Database connector: queries (evidence: `modelo/Bitacora.php`)
- Database connector → PostgreSQL database: connects (evidence: `modelo/Conexion.php`)
- Sales and reports → Order data: uses
- Admin workspace → Sales and reports: offers
