How andrescutellez/sistema-tickets works
1. This is a classic PHP monolith for “Sistema de Interventoría - Security Shops”: one server-side application, backed by MySQL, with a largely server-rendered UI and some JavaScript-driven interactivity.
2. The main entry point is index.php. From the structure, it acts as the app’s front door and likely decides which view to load based on session/auth state and requested module.
3. The backend is organized in an MVC-like split:
- config/conexion.php holds the database connection.
- models/ contains the domain models: Usuario, Proyecto, and Categoria.
- controller/ contains the action layer for those same domains: usuario.php, proyecto.php, and categoria.php.
4. The domain model is centered on three business entities:
- Users for authentication and role-based access.
- Projects for the interventoría workflow.
- Categories for classifying projects.
The README also implies project priority, status, assignment, and comment/traceability data are part of the project lifecycle.
5. The UI is split into reusable layout partials under view/:
- MainCabecera/, MainHeader/, MainNav/, and MainJS/
These are the shared shell around the feature screens, which keeps the app visually consistent across modules.
6. Feature screens live in dedicated view folders:
- home/ for the dashboard
- mntusuarios/ for user administration
- nuevoProyecto/ for creating projects
- consultarProyecto/ for searching/assigning projects
- detalleProyecto/ for project detail and traceability
- Logout/ for sign-out
This suggests a menu-driven, module-by-module navigation model rather than a single-page app.
7. Each feature view has its own companion JavaScript file:
- home/home.js
- mntusuarios/mntusuarios.js
- nuevoProyecto/nuevoProyecto.js
- consultarProyecto/consultarProyecto.js
- detalleProyecto/detalleProyecto.js
This indicates the browser side handles form behavior, table interaction, and likely AJAX calls to the PHP controllers.
8. The database is externalized as interventoria_securityshops.sql, which is the authoritative schema/data seed for local setup. The README confirms MySQL as the persistence layer and config/conexion.php as the environment-specific connection point.
9. public/ is mostly a full admin-template asset bundle: HTML examples, Bootstrap-based CSS, jQuery plugins, charts, tables, calendars, editors, notifications, and other UI utilities. These assets are not the core business logic; they provide the presentation layer and interactions for the PHP views.
10. The architectural boundary is clear:
- Controllers expose app actions.
- Models encapsulate database-backed entities.
- Views render the UI and include shared layout fragments.
- Client-side JS enhances the screens and talks back to the backend.
- MySQL stores users, projects, categories, and traceability records.
This is a straightforward layered CRUD architecture with authentication and workflow tracking as the main business concerns.
Main entry points: home/index.php Dashboard · mntusuarios/index.php Users · nuevoProyecto/index.php New project · consultarProyecto/index.php Search project
Components 23
Core app
Front controller, config, and domain/backend layer
- Front door · Application entry point and route dispatcher
index.php - DB config · Database connection bootstrap
config/conexion.php - User ctrl · User actions for auth and administration
controller/usuario.php - Project ctrl · Project workflow actions
controller/proyecto.php - Category ctrl · Category management actions
controller/categoria.php - User model · User entity and persistence logic
models/Usuario.php - Project model · Project entity and persistence logic
models/Proyecto.php - Category model · Category entity and persistence logic
models/Categoria.php
UI shell
Shared layout fragments used by rendered views
- Header shell · Shared page head and top chrome
view/MainCabecera/cabecera.php - Nav shell · Shared navigation menu
view/MainNav/Nav.php - Top bar · Shared application header
view/MainHeader/MainHeader.php - Script shell · Shared client-side script includes
view/MainJS/js.php
Feature views
Module-oriented screens and their client-side behavior
- Dashboard · Home dashboard screen
view/home/index.php - Home JS · Dashboard behavior and interactions
view/home/home.js - Users · User maintenance screen
view/mntusuarios/index.php - Users JS · User administration behavior
view/mntusuarios/mntusuarios.js - New project · Project creation screen
view/nuevoProyecto/index.php - New JS · Project creation form behavior
view/nuevoProyecto/nuevoProyecto.js - Search project · Project consultation and assignment screen
view/consultarProyecto/index.php - Search JS · Project lookup and assignment behavior
view/consultarProyecto/consultarProyecto.js - Project detail · Project detail and traceability screen
view/detalleProyecto/index.php - Detail JS · Project detail interactions
view/detalleProyecto/detalleProyecto.js
Data store
Database schema and seed for the application
- SQL seed · Database schema and seed data
interventoria_securityshops.sql
Connections 36
- Front door → DB config: connects · Bootstraps persistence before loading modules
- Front door → User ctrl: routes · Dispatches user-related actions
- Front door → Project ctrl: routes · Dispatches project-related actions
- Front door → Category ctrl: routes · Dispatches category-related actions
- User ctrl → User model: uses · Reads and writes user data
- Project ctrl → Project model: uses · Reads and writes project data
- Category ctrl → Category model: uses · Reads and writes category data
- User model → DB config: queries · Persists through the shared connection
- Project model → DB config: queries · Persists through the shared connection
- Category model → DB config: queries · Persists through the shared connection
- SQL seed → DB config: defines · Schema matches the runtime connection target
- Dashboard → Header shell: includes · Uses shared page shell
- Dashboard → Nav shell: includes · Uses shared navigation
- Dashboard → Top bar: includes · Uses shared header
- Dashboard → Script shell: includes · Uses shared scripts
- Dashboard → Home JS: loads · Enhances dashboard interactions
- Users → Header shell: includes · Uses shared page shell
- Users → Nav shell: includes · Uses shared navigation
- Users → Top bar: includes · Uses shared header
- Users → Script shell: includes · Uses shared scripts
- Users → Users JS: loads · Enhances user admin interactions
- New project → Header shell: includes · Uses shared page shell
- New project → Nav shell: includes · Uses shared navigation
- New project → Top bar: includes · Uses shared header
- New project → Script shell: includes · Uses shared scripts
- New project → New JS: loads · Enhances project creation form
- Search project → Header shell: includes · Uses shared page shell
- Search project → Nav shell: includes · Uses shared navigation
- Search project → Top bar: includes · Uses shared header
- Search project → Script shell: includes · Uses shared scripts
- Search project → Search JS: loads · Enhances search and assignment flows
- Project detail → Header shell: includes · Uses shared page shell
- Project detail → Nav shell: includes · Uses shared navigation
- Project detail → Top bar: includes · Uses shared header
- Project detail → Script shell: includes · Uses shared scripts
- Project detail → Detail JS: loads · Enhances traceability and detail interactions