How jazmineacosta/ing-software-recaudo works
1. This repository is a small PHP/MySQL application for a “módulo de recaudos” within a larger software engineering final project. It is not a framework-based app; the structure is mostly hand-organized around presentation pages, PHP model/controller scripts, and bundled front-end libraries.
2. The main user-facing entry points live in vista/ and index.html. The vista/ folder contains the functional screens for the business workflow: clients, products, suppliers, purchases, payroll payment, user creation, and especially recaudo registration and consultation. The mix of .html and .php indicates some pages are static shells while others are server-driven.
3. Server-side business logic is concentrated in modelo/. The key PHP scripts suggest a CRUD-style backend:
- login.php for authentication
- crearrecaudo.php and Updaterecaudo.php for creating and updating collection records
- consultarClientes.php and consultarecaudos.php for read/query endpoints
These files are likely called directly from the views or via AJAX rather than through a central router.
4. Database connectivity is isolated in modelo/controlador/conectar_bd.php. That is the main boundary between the application logic and MySQL. There is no sign of an ORM or abstraction layer; the architecture appears to be direct PHP-to-database access through this connection helper.
5. The database schema is versioned as raw SQL dumps/scripts: modelo/bd_phpmyadmin.sql, modelo/sistema_facturacion.sql, and modelo/inserts.sql. That suggests the repository is meant to be deployed by importing SQL into MySQL/phpMyAdmin, with schema and seed data managed outside of an automated migration system.
6. Client-side behavior is handled in librerias/assets/js/ with main.js, main2.js, script.js, and color-modes.js. These files are the main place for UI interactions, theme/mode handling, and page-specific logic. The separate librerias/functions/lookup.js strongly suggests AJAX lookup/autocomplete behavior against the PHP backend.
7. Data tables and reporting/export capabilities are a notable front-end subsystem. The librerias/datatables/ tree includes DataTables plus Buttons, JSZip, and pdfmake, which means tabular screens probably support sorting, filtering, export to Excel/PDF/print, and column visibility. This is important for architecture because several views likely depend on a common table/reporting component.
8. The repository bundles third-party front-end assets locally under librerias/, including jQuery, Popper, and assorted vendor assets. This indicates the app is designed to run without external CDN dependencies, and the front-end layer is self-contained for offline or local deployment.
9. librerias/forms/contact.php is a separate form-handling module, likely for contact or feedback submission. It sits outside the core recaudo flow, so it should be treated as an auxiliary feature rather than part of the main transactional path.
10. The primary data flow is: user interacts with a view in vista/ or index.html → JavaScript adds behavior or sends AJAX requests → PHP scripts in modelo/ validate/process the request → conectar_bd.php opens the database connection → MySQL stores or returns data → the view renders a list, form result, or update confirmation. Read-only queries and write operations are separated into different PHP scripts.
11. The functional domain is broader than recaudos alone. The presence of clients, products, suppliers, purchases, payroll, and user management suggests this is a modular administrative system where recaudos is one module inside a larger billing/accounting or operational platform.
12. For an architecture diagram, the clearest boundaries are:
- Presentation layer: vista/, index.html, and client-side JS/CSS
- Application/data access layer: modelo/ and modelo/controlador/conectar_bd.php
- Shared UI/reporting libraries: librerias/
- Persistence layer: MySQL database represented by the SQL dumps
The strongest coupling is between the PHP views and the model scripts, with DataTables-enhanced tables as the main UI/reporting surface.
Main entry points: js Scripts · registrar-recaudo.php Recaudo · conectar_bd.php DB conexión · clientes.php Clientes
Components 22
Presentation
Entry pages and user-facing workflow screens
- Home · Main landing entry point
index.html - Clientes · Client management screen
vista/clientes.php - Productos · Product management screen
vista/productos.php - Proveedores · Supplier management screen
vista/proveedores.php - Compra · Purchase workflow screens
vista/registrar-compra.php - Nómina · Payroll payment screen
vista/pagar-nomina.html - Usuarios · User creation screen
vista/crear-usuarios.php - Recaudo · Recaudo registration and consultation
vista/registrar-recaudo.php
Client UI
Shared browser-side behavior and bundled frontend assets
- Scripts · Main client-side behavior and page logic
librerias/assets/js - Lookup · Client-side search and autocomplete calls
librerias/functions/lookup.js - DataTables · Tables, filtering, exports, and print actions
librerias/datatables - Vendor assets · Local jQuery, Popper, and other frontend dependencies
librerias - Contact form · Auxiliary contact or feedback handler
librerias/forms/contact.php
Backend
PHP scripts for auth, queries, and recaudo CRUD
- Login · Authentication endpoint
modelo/login.php - Crear recaudo · Creates recaudo records
modelo/crearrecaudo.php - Actualizar recaudo · Updates recaudo records
modelo/Updaterecaudo.php - Consultar clientes · Client lookup/query endpoint
modelo/consultarClientes.php - Consultar recaudos · Recaudo query endpoint
modelo/consultarecaudos.php - DB conexión · Direct database connection helper
modelo/controlador/conectar_bd.php
Persistence
MySQL schema and seed scripts
- Schema · Primary database schema definition
modelo/sistema_facturacion.sql - Legacy dump · Additional phpMyAdmin database export
modelo/bd_phpmyadmin.sql - Seed data · Insert scripts and sample records
modelo/inserts.sql
Connections 26
- Home → Clientes: navigates · Landing page links into operational screens
- Home → Recaudo: navigates · Entry path to the core recaudo module
- Clientes → Consultar clientes: queries · Client screen loads and searches client data
- Clientes → Scripts: uses · Page behavior and events
- Productos → Scripts: uses · Shared UI logic
- Proveedores → Scripts: uses · Shared UI logic
- Compra → Scripts: uses · Purchase form interactions
- Nómina → Scripts: uses · Payroll page interactions
- Usuarios → Scripts: uses · User creation interactions
- Recaudo → Crear recaudo: submits · Creates recaudo records
- Recaudo → Actualizar recaudo: updates · Edits existing recaudos
- Recaudo → Consultar recaudos: reads · Consults recaudo listings and detail
- Recaudo → Lookup: uses · Lookup/autocomplete support
- Recaudo → DataTables: renders · Tabular consultation and export UI
- Lookup → Consultar clientes: calls · AJAX requests for matching clients
- Scripts → Login: calls · Login and session-related interactions
- Login → DB conexión: opens · Uses shared database connection
- Crear recaudo → DB conexión: writes via · Persists new recaudo records
- Actualizar recaudo → DB conexión: writes via · Persists recaudo changes
- Consultar clientes → DB conexión: reads via · Fetches client data from MySQL
- Consultar recaudos → DB conexión: reads via · Fetches recaudo data from MySQL
- DB conexión → Schema: targets · Primary database structure
- Schema → Legacy dump: related · Alternate or older export of the same system
- Schema → Seed data: seeded by · Sample records and inserts
- DataTables → Vendor assets: depends on · Bundled browser libraries
- Contact form → Scripts: uses · Auxiliary form behavior