Deprixa Pro — Integrated Courier & Logistics System · System Architecture
How the request flow works
Deprixa Pro uses a classic PHP MVC-inspired pattern with entry-point PHP files, view files, and shared helpers. Here is the full request flow from login to action:
1
Access & Login
User opens the admin URL. Session is created; userlevel (role) and permissions are loaded from the database.
2
Dashboard by Role
After login, the system redirects to the role-specific dashboard. Admin, Employee, Agency, and Driver see different dashboards and widgets.
3
Permission-based Menu
The sidebar is built dynamically from assigned permissions. Only modules the user is authorized to see appear. Agency sees Courier, Clients, Recipients, and Consolidados scoped to its own data.
4
Module PHP Entry Point
Clicking a menu item (e.g. Courier → List) executes the corresponding PHP file (e.g. courier_list.php). It loads config, helpers, checks permissions, applies role filters, then includes the view.
5
View Rendering
The view file from views/ receives data (lists, user info) and renders the HTML. Tables, forms, and action buttons are displayed here.
6
Actions (Forms / AJAX)
Buttons (Add, Edit, Delete) open other PHP pages or call AJAX endpoints. E.g. "Create shipment" → courier_add.php; saving calls ajax/courier/add_courier_ajax.php. The response updates the screen or redirects.
7
Database & File Storage
All reads/writes go through PDO to MySQL. File uploads (packages, documents, signatures) go to folders: order_files/, pre_alert_files/, doc_signs/, driver_files/.
8
Notifications Dispatch
When configured, the system sends WhatsApp (Ultramsg), SMS (ClickSend), or email (SMTP/PHPMailer) at key events: shipment created, status changed, package arrived, invoice generated.