How yontu24/php-mvc-example-tw-project works
OBIS is an obesity-prevalence visualizer with a PHP MVC web application and a REST API. The user-facing flow enters through the web front controller, routes to an MVC controller, and renders views; filter models retrieve reference data from REST endpoints. The API also exposes information-management and user endpoints, including JWT-protected operations. A separate sesiune tree contains a parallel charting and information-management implementation. Several controller, view, and endpoint files were not sampled, so their internal call relationships are not asserted.
Main entry points: Model.php HTTP data client · info Information endpoints · user User endpoints · App.php MVC router
Components 23
Web application
- Web entry
Proiect/public/index.php - MVC router
Proiect/app/core/App.php - Controller base
Proiect/app/core/Controller.php - Page controllers
Proiect/app/controllers - Visualizer pages
Proiect/app/views
Web data models
- Filter models
Proiect/app/models/AllFilters.php - Year model
Proiect/app/models/Year.php - Location model
Proiect/app/models/Location.php - Category model
Proiect/app/models/Category.php - Response model
Proiect/app/models/Response.php - Comparison model
Proiect/app/models/Comparison.php - HTTP data client
Proiect/app/models/Model.php
REST API
- Information endpoints
Proiect/REST/api/info - User endpoints
Proiect/REST/api/user - Information model
Proiect/REST/models/Info.php - User model
Proiect/REST/models/User.php
Persistence and auth
- REST database
Proiect/REST/config/Database.php - JWT library
Proiect/REST/config/JWT/php-jwt-master/src/JWT.php
Session implementation
- Session charting
Proiect/sesiune/View/vchartcomparatie.js - Year query controller
Proiect/sesiune/Controller/cgetbyyears.js - Session add endpoint
Proiect/sesiune/Model/MAaddinformations.php - Session database
Proiect/sesiune/DB/database.php
Other components
- Visualizer user
Connections 23
- Visualizer user → Web entry: opens
- Web entry → MVC router: starts
Proiect/public/index.php - MVC router → Page controllers: routes to
Proiect/app/core/App.php - MVC router → Controller base: dispatches through
- Controller base → Visualizer pages: loads
Proiect/app/core/Controller.php - Controller base → Filter models: loads model
Proiect/app/core/Controller.php - Year model → HTTP data client: uses
Proiect/app/models/Year.php - Year model → Information endpoints: requests years
Proiect/app/models/Year.php - Filter models → HTTP data client: uses
Proiect/app/models/AllFilters.php - Location model → HTTP data client: uses
Proiect/app/models/Location.php - Category model → HTTP data client: uses
Proiect/app/models/Category.php - Response model → HTTP data client: uses
Proiect/app/models/Response.php - Comparison model → HTTP data client: uses
Proiect/app/models/Comparison.php - Information endpoints → Information model: uses
Proiect/REST/api/info/delete.php - Information endpoints → REST database: opens connection
Proiect/REST/api/info/delete.php - Information endpoints → JWT library: verifies token
Proiect/REST/api/info/delete.php - User endpoints → User model: uses
Proiect/REST/api/user/read.php - User endpoints → REST database: opens connection
Proiect/REST/api/user/read.php - User endpoints → JWT library: verifies token
Proiect/REST/api/user/read.php - Information model → REST database: queries
- Session charting → Year query controller: requests years
Proiect/sesiune/View/vchartcomparatie.js - Session add endpoint → Session database: opens connection
Proiect/sesiune/Model/MAaddinformations.php - Session add endpoint → JWT library: verifies token
Proiect/sesiune/Model/MAaddinformations.php