How remetulla17771/tinymvc works
TinyMVC is a PHP MVC framework with a sample site, an admin module, database-backed models, and console tools. Its main user workflow is an HTTP request entering the front controller, being routed to a controller, and producing a rendered view or response; the sample site also loads paginated user data. Separate branches cover authentication, errors and localization, admin modules, and console generation/migrations. The runtime and sample-site links are supported by excerpts or README statements; some documented subsystems were not sampled, so their internal calls are not expanded.
Main entry points: App.php Application · SiteController.php Site controller · ActiveRecord.php Active Record · Router.php Router
Components 24
HTTP runtime
- Front controller
web/index.php - Application
app/App.php - Request
app/Request.php - Router
app/Router.php - Response
app/Response.php
MVC and UI
- Site controller
app/controllers/SiteController.php - Error controller
app/controllers/ErrorController.php - Site views
views/site/index.php - Page layouts
views/layouts/main.php - UI helpers
app/helpers/GridView.php - Admin module
modules/admin/Module.php
Data and identity
- User model
app/models/User.php - News model
app/models/News.php - Active Record
app/ActiveRecord.php - Query builder
app/Query.php - PDO database
app/Db.php
Framework services
- Authentication
app/AuthService.php - Translations
app/helpers/I18n.php - Error handling
app/ErrorHandler.php
Console tools
- Console entry
bin/console.php - Console application
app/console/ConsoleApplication.php - Code generators
app/console/MakeCrudCommand.php - Migration commands
app/console/MigrateCommand.php
Other components
- Browser
Connections 26
- Browser → Front controller: sends request
- Front controller → Application: starts
web/index.php - Application → Request: creates
app/App.php - Application → Router: creates
app/App.php - Application → Error handling: logs failures
app/App.php - Router → Site controller: dispatches
- Router → Admin module: routes modules
- Site controller → User model: queries
app/controllers/SiteController.php - Site controller → Site views: renders
- Site controller → Response: redirects
app/controllers/SiteController.php - Application → Error controller: renders errors
app/App.php - Error controller → Response: returns view
app/controllers/ErrorController.php - Response → Browser: sends output
- Site views → UI helpers: renders widgets
views/site/index.php - Site controller → Page layouts: renders layout
- User model → Active Record: extends
app/models/User.php - News model → Active Record: extends
app/models/News.php - Active Record → Query builder: provides queries
- Active Record → PDO database: uses database
- Site controller → Authentication: checks identity
app/controllers/SiteController.php - Authentication → User model: loads user
app/AuthService.php - Application → Translations: translates
app/App.php - Console entry → Console application: starts
bin/console.php - Console application → Code generators: dispatches commands
app/console/ConsoleApplication.php - Console application → Migration commands: dispatches commands
app/console/ConsoleApplication.php - Migration commands → PDO database: applies migrations