How faveosuite/faveo-helpdesk works
Project type and purpose
• This is a monolithic, full-stack web application built on Laravel (PHP 8.1) that provides a helpdesk / ticketing system.
• It exposes both browser-based UI (blade templates + JS/CSS assets) and a RESTful API (versions v1 & v2).
Key components
a. Clients
• Web browser (loads HTML, CSS, JS from public/)
• API consumers (mobile apps, external systems)
b. Web server & application runtime
• Apache or Nginx + PHP-FPM container
• Laravel framework layers:
– Route definitions (routes/web.php, routes/api.php, etc.)
– Middleware (auth, CSRF, JWT, roles)
– Controllers (Admin, Agent, Client, Api v1/v2, Installer, Update)
– Service Providers (AppServiceProvider, ApiServiceProvider, plugin providers)
– Events & Listeners (app/Events → app/Listeners)
– Console Commands & Scheduler (app/Console/Commands, artisan schedule)
– Queue Worker (jobs table, app/Jobs, queue worker process)
c. Persistence
• MySQL / MariaDB (managed via Eloquent models, migrations under database/migrations)
• File storage (attachments, logs) under storage/
d. External services
• SMTP/IMAP server for ticket emails (MailService, FaveoQueue)
• Bugsnag for error reporting
• Third-party integrations (Socialite for social login, external APIs)
Relationships & data flow
• Browser → HTTP request → Web server → Laravel router → Controller → Model/Eloquent → MySQL → Controller → Blade view → HTML response → Browser
• API client → /api/v1 or /api/v2 → TokenAuthController → Services → JSON response
• User actions (e.g., “Create Ticket”) dispatch an Event → Listener queues email jobs → jobs table → Queue worker picks up → SMTP sends email
• Cron scheduler runs artisan commands (e.g., TicketFetch) → Dispatches jobs or synchronizes updates
• File uploads saved to storage/app and served via public/vendor or symlink
Architectural patterns & design principles
• MVC (Models, Views, Controllers)
• Service-provider based modularization (core + plugins)
• Event-driven notifications and extensibility (app/Events & app/Listeners)
• Command Bus for console tasks (artisan commands)
• Dependency injection via Laravel’s service container
• Eloquent ORM with migrations & seeders for schema management
Technologies & frameworks
• Backend: PHP 8.1, Laravel (v9.x), MySQL/MariaDB
• Frontend: Blade templates, AdminLTE theme, jQuery, Angular2 snippets, CKEditor, Webpack (webpack.mix.js)
• Queue driver: database (jobs table) or Redis
• CI/CD: Travis CI, GitHub Actions, StyleCI, Scrutinizer
Don’t forget these details
• Both web and API routes
• Middleware checks (Auth, JWT) in the request path
• Plugin modules (app/Plugins, FaveoStorage, FaveoLog) as separate service provider blocks
• File upload/download to storage/app and serving from public/
• Event → listener → job pipelines for notifications