How tayfunerbilen/php-boilerplate works
This repository is a PHP application boilerplate, not a finished domain product. Its demonstrated request workflow starts at the front controller, initializes framework services, registers routes, and dispatches to controllers; the home controller supports post creation and listing, while authentication controllers handle registration, login, and logout. The README also documents routing, templates, validation, database, sessions, configuration, error handling, dates, and uploads. The graph preserves these capabilities but limits connections to those shown in the README or supplied source evidence; several utility integrations are documented rather than traced through sampled calls.
Main entry points: Home.php Post home · route.php Route definitions · Bootstrap.php Application bootstrap · index.php Front controller
Components 20
Request handling
- Front controller
index.php - Route definitions
app/route.php
Application features
- Post home
app/controllers/Home.php - Authentication actions
app/controllers/Auth.php - Posts API
app/controllers/Api.php - Authentication checks
app/middlewares/CheckAuth.php - Guest-only checks
app/middlewares/CheckNotAuth.php - Post records
app/models/Post.php - User records
app/models/User.php - Home template
public/views/home.blade.php - Login and registration templates
public/views/auth
Framework services
- Application bootstrap
core/Bootstrap.php - Session authentication
core/Auth.php - Image upload
core/Upload.php - Template rendering
core/View.php - Controller base
core/Controller.php - ORM base
core/Model.php
Persistence
- MySQL database
- Uploaded post images
upload/posts
Other components
- Browser user
Connections 25
- Browser user → Front controller: requests
index.php - Front controller → Application bootstrap: initializes
index.php - Front controller → Route definitions: loads routes
index.php - Front controller → Application bootstrap: runs router
index.php - Application bootstrap → Route definitions: dispatches routes
app/route.php - Application bootstrap → Template rendering: creates renderer
core/Bootstrap.php - Application bootstrap → MySQL database: configures connection
core/Bootstrap.php - Route definitions → Post home: routes requests
app/route.php - Route definitions → Authentication actions: routes requests
app/route.php - Route definitions → Posts API: routes requests
app/route.php - Route definitions → Guest-only checks: guards login routes
app/route.php - Post home → Post records: creates and lists
app/controllers/Home.php - Post home → Image upload: uploads images
app/controllers/Home.php - Post home → Uploaded post images: writes images
app/controllers/Home.php - Post home → Home template: renders
app/controllers/Home.php - Post home → Controller base: extends
app/controllers/Home.php - Authentication actions → Session authentication: authenticates
- Authentication actions → Login and registration templates: renders forms
app/controllers/Auth.php - Authentication actions → Controller base: extends
app/controllers/Auth.php - Session authentication → User records: reads and creates
core/Auth.php - Post records → ORM base: extends
app/models/Post.php - User records → ORM base: extends
app/models/User.php - Post records → User records: belongs to
app/models/Post.php - User records → Post records: has many
app/models/User.php - Controller base → Application bootstrap: inherits services
core/Controller.php