How asobrados03/tweb-notificador-avisos works
Project type and purpose
• This is a full-stack LAMP web application (“Notificador de Avisos”) written in PHP, intended for professors to notify students via web-based messages (avisos). It supports user management (login, password reset), student registration, publishing individual/collective notices, CSV import of bulk notices, and tracking read/unread status.
File structure
Top-level:
• conexionBD/ – database connection helper (conexion_BD.php)
• public_html/ – the web root containing all public-facing PHP scripts, static assets and include modules:
– .htaccess (rewrite/protection rules)
– index.php, login/registration/reset/password scripts, aviso-related scripts (publicar-aviso, ver-aviso, importar-aviso, aviso-CSV)
– css/ (estilo.css, images), js/ (comportamientoLadoCliente.js)
– inc/ (template and function includes: initialization, functions library, navigation bar, footer, filter logic)
• uploads/ – storage of uploaded CSV files
Other indicators: procedural PHP with include-based templating, a single Apache/PHP monolith, and MySQL interaction via conexionBD.
README for additional insights
• No external services (e.g., mail services) are used; CSV validation is handled server-side.
a. Main components:
• Client (Browser on desktop/mobile)
• Web Server (Apache with mod_php)
• PHP Application Layer
– Entry-point scripts (index.php, procesar-*.php, importar-aviso.php)
– Include modules (inc/*.php) for business logic, templating, navigation
– Database access layer (conexionBD/conexion_BD.php)
• Database (MySQL/MariaDB)
• File Storage (uploads/ for CSV files; static assets under public_html/css, public_html/js)
b. Relationships and interactions:
– Browser → Web Server: HTTP requests for pages and form submissions
– Web Server → PHP Application: executes PHP scripts
– PHP Application ↔ Database: CRUD operations on USUARIO, ESTUDIANTE, AVISO, DIRIGIR_A_ESTUDIANTE
– PHP Application → File Storage: read/write CSV files on import, serve CSS/JS/images
– Browser ← PHP Application: dynamic HTML, CSS, JS responses
c. Architectural patterns and principles:
– Layered architecture: Presentation (HTML/CSS/JS + templates), Application Logic (PHP functions and processing scripts), Data Access (conexionBD to MySQL), Data Storage (DB + filesystem)
– Reusable include modules for templating and common functions
– Separation of concerns: distinct scripts for each use case (login, register student, publish notice, import file, filter/list notices)
d. Key technologies/frameworks:
– Apache HTTP Server, PHP 7+
– MySQL/MariaDB
– HTML5/CSS3 (responsive design), JavaScript (client-side interactivity)
– CSV processing (delimiter validation, error reporting)
Essential elements
• Clear component labels (e.g., “public_html/index.php”, “conexionBD/conexion_BD.php”, “MySQL DB”)