How rathfaisal/pebs works
Project type and purpose
• This is a full-stack, monolithic web application built on Laravel 12 (PHP 8.2+) with Blade templates, Bootstrap/Tailwind CSS, and Vite for asset bundling.
• Its purpose is to serve as the PeBS Management System with three role-based dashboards (Super Admin, Admin, User) for activity and user management.
File structure
• Top-level directories:
• app/ – contains MVC core (Controllers, Models, Middleware, Service Providers, View Components)
• config/ – environment and service configuration (database, cache, mail, queue, session)
• database/ – migration and seeder definitions for users, activities, pivot tables
• resources/ – Blade view templates (layouts, components, role-specific views), CSS/JS assets
• public/ – web-server document root (index.php entry point, compiled assets, images)
• routes/ – HTTP and console routing (web.php, auth.php)
• Deployment files: .env, artisan CLI, composer.json, vite.config.js.
README for additional insights
• The README provides:
• An overview of user roles and feature sets
• Technology stack: Laravel Breeze for auth, MySQL/MariaDB, PHPUnit tests.
a. Main components
• Clients (Web Browser/Mobile Web)
• Web Server (Nginx/Apache + PHP-FPM)
• Laravel Application (MVC layers)
• Data Stores: MySQL/MariaDB, File Storage (local S3-compatible), Cache/Queue (Redis or file)
• External Services: Mail (SMTP/SendGrid), Optional CDN for assets
b. Relationships & interactions
• Clients send HTTP(S) requests → Web Server → PHP-FPM → Laravel Router → Controllers →
• Models (Eloquent ORM) ↔ MySQL
• File I/O for pictures, uploads
• Queue jobs (email notifications, activity restore)
• Controllers return Blade views or JSON responses
• Assets: Vite dev server in development, compiled CSS/JS in production served by public/
• Middleware enforces RBAC before entering controllers
c. Architectural patterns / design principles
• MVC: clear separation of Views (resources/views), Controllers (app/Http/Controllers), Models (app/Models)
• Service Providers for DI and bootstrapping
• Middleware for authentication and role checks (IsAdmin, IsSuperAdmin)
• Database Migrations & Seeders for schema management
• RESTful resource controllers for CRUD on activities, announcements, admins
d. Key technologies
• PHP 8.2, Laravel 12.x, Laravel Breeze (auth scaffolding)
• Blade templating, Bootstrap 5, Tailwind CSS
• Vite & npm for asset bundling
• MySQL/MariaDB, PHPUnit for tests
Detailed capture of architectural elements
• Routes/web.php feeding into the Router → Controllers.
• Middleware (auth, IsAdmin, IsSuperAdmin).
• Background processes: queue dispatcher for sending emails, restoring deleted activities.