How cavargas10/yummycreativefooc works
Project type and purpose
• This is a full-stack PHP/JavaScript web application called “YUMMYCreativeFood.” It provides:
• A public site for browsing recipes, tips and videos (“vistas_normal”)
• A user-authenticated experience (“vistas_usuario”)
• An admin/dashboard interface for managing content (“vistas_dashboard”)
• It uses a traditional LAMP-style stack (PHP + MySQL), with JavaScript, CSS and CKEditor for rich text editing.
File structure
• Top-level folders:
• css, img, imagenesReceta, imagenesTips, video – static assets
• dll – database connection and validation classes (class_mysqli.php, config.php, validar.php)
• ProyectoWeb/Recursos – CKEditor integration and build (webpack.config.js)
• internas – internal scripts (e.g., procesar.php)
• seguridad – session management (seguridad.php, exit.php)
• vistas_dashboard, vistas_normal, vistas_usuario – each follows MVC subfolders:
– controlador/ – PHP controllers
– modelo/ – PHP models
– vistas/ – PHP view templates
• Root entrypoint: index.php
• Database model file: modelo_BD.mwb (MySQL Workbench schema)
README
• The README only contains the project name, but the folder names and file organization imply the major architectural components listed above.
a. Main components:
• Web Client (Browser) – requests HTML/CSS/JS
• Frontend Static Server – serves CSS, JS, image, video assets
• PHP Application Server – hosts index.php, routes requests to controllers
– Public Site Controllers (“vistas_normal/controlador”)
– User Site Controllers (“vistas_usuario/controlador”)
– Dashboard Controllers (“vistas_dashboard/controlador”)
– Security Module (“seguridad/seguridad.php”)
– Internal Processing (“internas/procesar.php”)
• Business Logic – Models in each MVC module (“modelo/”)
• Data Access Layer – dll/class_mysqli.php for DB connections
• Relational Database – MySQL (schema in modelo_BD.mwb)
• External Library – CKEditor (ProyectoWeb/Recursos)
b. Relationships and interactions:
1. Browser → Frontend Static Server (CSS, JS, images)
2. Browser → index.php → Router identifies module (normal, user, dashboard)
3. Controller calls Model to fetch/update data
4. Model uses Data Access Layer (class_mysqli) → MySQL
5. Controller returns a View (PHP template) → rendered HTML → Browser
6. Security Module intercepts requests for protected pages (dashboard/user)
7. CKEditor assets loaded on recipe/tips edit forms
c. Architectural patterns and design principles:
• MVC separation per module (normal, user, dashboard)
• Single entrypoint (index.php) routing to different controllers
• Centralized database connection class (dll)
• Role-based access control via seguridad/seguridad.php
• Static assets served separately from PHP views
d. Key technologies and libraries:
• PHP 7+ with MySQLi
• MySQL database (modelo_BD.mwb)
• CKEditor (ProyectoWeb/Recursos) built via webpack
• HTML/CSS/JavaScript for views
• PHP session management for security
Detail
• MVC modules (normal, user, dashboard)
• Security module intercepting protected routes
• Static-asset server and Webpack/CKEditor build process
• Data flow for key use-cases (browse recipes, add recipe via dashboard, comment submission, profile update)