How jonasbirkelof/beets-php works
Beets PHP is a REST-style MVC microframework with a bundled user-administration application. A browser request enters the front controller and route table, passes authentication/permission gates, reaches login, profile, or user-account actions, and renders a view or redirects with session feedback. Models validate and persist user/profile and role data through the database layer. The README also describes a designed, replaceable UI and optional Docker/local development integrations; source excerpts do not establish detailed runtime wiring for those capabilities.
Main entry points: ProfileController.php Profile actions · UserController.php User administration · User.php User records · Router.php Router
Components 24
Request framework
- Front controller
src/index.php - REST route table
src/routes/web.php - Router
src/App/Core/Router.php - View and errors
src/App/Core/App.php - PDO database
src/App/Core/Database.php
Identity and access
- Authentication state
src/App/Core/Authenticate.php - Login actions
src/App/Http/Controllers/Authenticate/LoginController.php - Login and session
src/App/Models/Authenticate/Login.php - Role and permissions
src/App/Models/Authenticate/Role.php - Permission rules
src/App/Models/Authenticate/Permission.php
Account administration
- Profile actions
src/App/Http/Controllers/ProfileController.php - Profile data
src/App/Models/Profile.php - User administration
src/App/Http/Controllers/UserController.php - User records
src/App/Models/User.php - Form validation
src/App/Core/Form.php - CSRF protection
src/App/Core/CSRF.php
Application interface
- Session feedback
src/App/Http/Feedback.php - Application views
src/public/views - Navigation and sidebar
src/public/partials/navigation.php - Beets Layout UI
src/resources/beets-layout-v1.1.0-src/js/beets-layout/beets-layout.js
Runtime integrations
- PHP web server
- MySQL database
- MailHog
Other components
- Browser user
Connections 35
- Browser user → PHP web server: sends request
- PHP web server → Front controller: serves PHP
- Front controller → REST route table: loads routes
src/index.php - REST route table → Router: registers routes
src/routes/web.php - Router → Login actions: dispatches login
src/routes/web.php - Router → Profile actions: dispatches profile
src/routes/web.php - Router → User administration: dispatches users
src/routes/web.php - REST route table → Authentication state: checks access
src/routes/web.php - Login actions → Login and session: attempts login
src/App/Http/Controllers/Authenticate/LoginController.php - Login and session → Authentication state: sets identity
src/App/Models/Authenticate/Login.php - Login and session → PDO database: queries accounts
src/App/Models/Authenticate/Login.php - Login and session → Role and permissions: loads role
src/App/Models/Authenticate/Login.php - Role and permissions → Permission rules: loads permissions
src/App/Models/Authenticate/Role.php - Profile actions → Profile data: updates profile
src/App/Http/Controllers/ProfileController.php - Profile actions → User records: manages image
src/App/Http/Controllers/ProfileController.php - Profile actions → CSRF protection: validates token
src/App/Http/Controllers/ProfileController.php - User administration → User records: manages accounts
src/App/Http/Controllers/UserController.php - User administration → Role and permissions: loads role options
src/App/Http/Controllers/UserController.php - User administration → CSRF protection: validates token
src/App/Http/Controllers/UserController.php - User records → PDO database: queries records
src/App/Models/User.php - Profile data → User records: delegates lookup
src/App/Models/Profile.php - Profile data → PDO database: updates record
src/App/Models/Profile.php - User records → Form validation: validates fields
src/App/Models/User.php - Profile data → Form validation: validates fields
src/App/Models/Profile.php - Login actions → View and errors: renders login
src/App/Http/Controllers/Authenticate/LoginController.php - Profile actions → View and errors: renders profile
src/App/Http/Controllers/ProfileController.php - User administration → View and errors: renders user views
src/App/Http/Controllers/UserController.php - View and errors → Application views: renders template
src/App/Core/App.php - Login actions → Session feedback: configures feedback
src/App/Http/Controllers/Authenticate/LoginController.php - Profile actions → Session feedback: configures feedback
src/App/Http/Controllers/ProfileController.php - User administration → Session feedback: configures feedback
src/App/Http/Controllers/UserController.php - Navigation and sidebar → User records: reads user data
src/public/partials/navigation.php - Browser user → Beets Layout UI: uses interface
- PHP web server → MySQL database: connects database
- PHP web server → MailHog: optional mail service