How chouaib100/todoapp-php works
Project type and purpose
• This is a PHP-based full-stack MVC web application (a ToDo app) that demonstrates both SQL injection vulnerabilities and secure‐coding practices.
• README confirms it uses MySQL and is intended as an educational tool in web security.
File structure
• Top-level directories:
– App/ (contains MVC folders)
– App/public/ (webroot/front controller + assets)
– .idea/ (IDE settings)
• Inside App/:
– config/ (database.php, routes.php) → DB credentials & route definitions
– controllers/ (AuthController, ProfileController, TaskController) → business logic
– models/ (User.php, Task.php) → data‐access layer
– views/ (auth/, profile/, tasks/) → presentation templates
• App/public/:
– .htaccess → URL rewriting to index.php
– index.php → Front Controller
– assets/css, assets/js → static files
• Pattern: Classic MVC with a Front Controller and layered separation (presentation, logic, data).
README for additional insights
• Confirms purpose: showcase SQL injection vulnerabilities → secure vs insecure queries.
• Technology stack: PHP (≥7), MySQL, Apache (with mod_rewrite), HTML/CSS/JS.
Elements
• Blue for presentation (Browser, Views)
• Green for logic (Controllers, Router)
• Orange for data (Models, DB)
– Callouts highlighting vulnerable SQL vs parameterized query paths
– Notes indicating config files feeding routing and DB connections
Detail
– Include the public/assets sub-systems delivering CSS/JS.
– Show how config/database.php credentials are consumed by Models.
– Represent session store interactions in AuthController.
– If desired, layer environment boundaries (development vs production) and show deployment artifact (App folder + public) on the server.