How tonicirvianum/miniappcrud_bbddexample works
MiniAppCRUD is a PHP MVC product-management app with a simple login flow. Requests enter through the front controller, which registers routes and dispatches to controllers; product actions validate input and render pages or use the Product model. The README documents MySQL-backed schema setup and seeding, but Product writes still use session data while its reads use MySQL. The graph preserves both paths. Product, login, and error views are grouped by directory; unsampled details are represented only where the README or source index supports them.
Main entry points: Controller.php View renderer · Router.php Router · HomeController.php Home controller · Database.php Database access
Components 18
Request routing
- Front controller
index.php - Router
App/Core/Router.php
Application features
- Home controller
App/Controllers/HomeController.php - Product controller
App/Controllers/ProductController.php - Login controller
App/Controllers/LoginController.php
Views and rendering
- View renderer
App/Core/Controller.php - Home page
App/Views/home - Product pages
App/Views/products - Login pages
App/Views/login - 404 page
App/Views/errors/404.view.php
Persistence and setup
- Product model
App/Models/Product.php - Category model
App/Models/Category.php - Database access
App/Core/Database.php - Product schema
App/Database/Schema.php - Product seeder
App/Database/Seeder.php - Session products
App/config/init.php
Other components
- Browser user
- MySQL database
Connections 25
- Browser user → Front controller: sends request
index.php - Front controller → Router: registers routes
index.php - Front controller → Router: dispatches request
index.php - Router → Home controller: dispatches routes
index.php - Router → Home controller: handles fallback
App/Core/Router.php - Router → Product controller: dispatches routes
index.php - Router → Login controller: dispatches routes
index.php - Home controller → Product schema: checks schema
App/Controllers/HomeController.php - Home controller → Product seeder: seeds products
App/Controllers/HomeController.php - Home controller → Database access: creates connection
App/Controllers/HomeController.php - Product controller → Product model: reads and mutates
App/Controllers/ProductController.php - Product model → Database access: queries through
App/Models/Product.php - Database access → MySQL database: executes SQL
App/Core/Database.php - Product schema → Database access: executes schema SQL
App/Database/Schema.php - Product seeder → Database access: inserts rows
App/Database/Seeder.php - Product controller → Session products: uses session data
- Front controller → Session products: initializes products
index.php - Home controller → View renderer: renders page
App/Controllers/HomeController.php - Product controller → View renderer: renders pages
App/Controllers/ProductController.php - Login controller → View renderer: renders pages
App/Controllers/LoginController.php - View renderer → Home page: loads view
- View renderer → Product pages: loads views
- View renderer → Login pages: loads views
- View renderer → 404 page: loads view
- Product pages → Category model: uses model
App/Views/products/create.view.php