The project follows a straightforward separation between frontend views (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/EmirPolito/CRUD-HOTEL-GUEVARINI-Publico/llms.txt
Use this file to discover all available pages before exploring further.
views/) and backend form-processing handlers (php/). Static assets live in css/, img/, and js/. The single entry point is login.php at the project root.
Directory Tree
Key Files
Entry point — login.php
The root login.php is the first file a browser hits. It redirects to views/login.php, which renders the login form. All authenticated pages check for a valid session and redirect back to this entry point if the session is missing or expired.
Database connection — php/conexion.php
Contains the Conexion class, which encapsulates a PDO connection to MySQL. Every PHP handler that needs to query the database instantiates this class and calls obtenerConexion().
php/conexion.php is the single place to update database credentials. No other file holds connection parameters.Dashboard — views/panel.php
The main dashboard shown after a successful login. It serves as the navigation hub for all CRUD sections: clients, rooms, reservations, and users.
Architecture: views/ vs php/
The project separates concerns across two directories:
| Directory | Purpose |
|---|---|
views/ | HTML/PHP templates that render the UI. These files are what the browser requests directly. |
php/ | Form-processing handlers. Views submit HTML forms to these scripts, which validate input, interact with the database, and redirect back to the appropriate view. |
Authentication handlers — php/auth/
| File | Responsibility |
|---|---|
validar_login.php | Verifies credentials, starts the session |
procesar_registro.php | Creates a new user, sends verification email |
enviar_recuperacion.php | Sends the password-reset email with a unique token |
procesar_reset_password.php | Validates the reset token and updates the password hash |
reenviar_verificacion.php | Resends the account verification email |
logout.php | Destroys the session and redirects to login |
Composer and vendor/
The only PHP dependency declared in composer.json is PHPMailer:
vendor/ directory is not included in version control. It is created by running:
procesar_registro.php, enviar_recuperacion.php, reenviar_verificacion.php, guardar_usuario.php) to send transactional emails.