Smart Helpdesk is a high-fidelity, modern SaaS Helpdesk and SLA Management system built with Laravel and custom Vanilla CSS (complete with dark-slate layouts, smooth gradients, status indicators, and responsive panels).
The platform supports multiple companies (tenants) sharing a single application database, with strict data isolation, role-based dashboards, queue-based inbound email simulation, database notifications, dynamic SLA compliance checks, and reports with graphical charts.
- Data Isolation: Multiple companies use a single codebase and database. Strict isolation is implemented transparently using Laravel's Global Eloquent Scopes.
- Tenant Context Resolution: Automatically resolved via middleware based on either the URL slug (
/{tenant_slug}/...) or the logged-in user's company profile. - Auto-Provisioning: Super Admins can instantly register new tenants, which automatically sets up initial admin credentials and default priority SLA policies.
- Super Admin: Manage global tenant environments and view SaaS company lists.
- Tenant Admin: Manage ticket assignments, configure FAQs, update SLA targets, and inspect analytics dashboards.
- Support Agent: View assigned tickets (Critical priority sorted at the top), update ticket status, post external replies, and add internal notes (visible only to agents/admins).
- Customer: Create support tickets with file attachments, view ticket history, chat with agents, and search the self-service Knowledge Base.
- Dynamic Deadlines: Custom SLA response time limits calculated dynamically on ticket submission based on priority (Low: 24h, Medium: 8h, High: 2h, Critical: 1h).
- Breach Alarms: A background Artisan command (
tickets:check-sla) audits active tickets, changes overdue ticket statuses tobreached, and triggers database notification alerts. - Visual Alerting: Critical tickets are highlighted at the top of the queue with custom pulsating indicators to grab support agents' attention.
- Inbound Webhook: A POST endpoint
/api/inbound-emailprocesses incoming email payloads to auto-create tickets and register customers. - Visual Simulator: An interactive simulator panel inside the Admin dashboard allows testing email arrival.
- Database Queues: Email parsing is offloaded to a queued background job (
ProcessInboundEmail), demonstrating Laravel's database queue driver. Admins can trigger the queue worker once directly from the UI.
- Displays metrics for Total Tickets, Active Tickets, Resolved Tickets, and SLA Breaches.
- Integrates interactive charts via Chart.js:
- Ticket distribution by priority (doughnut chart).
- Support Agent performance comparing assigned vs. resolved counts (grouped bar chart).
POST /api/inbound-email(Public webhook for email routing).POST /api/{tenant_slug}/tickets(Bearer Token-authenticated ticket creation for external integrations).
- Framework: Laravel 12+
- Database: MySQL (supported via PDO extension)
- Frontend Engine: Blade Templates & Vanilla JavaScript
- Styling: Vanilla CSS (Glassmorphism card styles, modern typography, responsive layout templates)
- Libraries: Chart.js (CDN)
- Testing: PHPUnit / Laravel HTTP Feature Tests
- PHP 8.2+
- Composer
- MySQL/MariaDB database (e.g., XAMPP local environment)
-
Clone the Repository:
git clone https://github.com/your-username/smart-helpdesk.git cd smart-helpdesk -
Install Composer Dependencies:
composer install
-
Configure Environment: Copy
.env.exampleto.envand configure your database parameters:cp .env.example .env
Modify the DB fields in
.envto match your database server configuration:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=smart_helpdesk DB_USERNAME=root DB_PASSWORD=
-
Generate Application Key:
php artisan key:generate
-
Run Database Migrations & Seeders: Create a database named
smart_helpdeskin MySQL, then run:php artisan migrate:fresh --seed
This seeds default tenants (TechCorp Solutions, FinBank Corporation), pre-configured SLA policies, sample tickets, FAQs, and a set of test users.
-
Serve the Application:
php artisan serve
Open your browser and navigate to:
http://127.0.0.1:8000
The application includes feature tests covering tenant data isolation, role authorization, and SLA audit execution:
php artisan test- Portal Directory (Landing Page): Open
http://127.0.0.1:8000. Use the Demo Quick Switcher to log into different roles without entering passwords. - Submit a Ticket: Log in as Customer under TechCorp. Create a new ticket (e.g., Critical priority) and upload attachments.
- Verify Dashboard Sorting: Log in as Agent A under TechCorp. Note the new ticket shows at the top with a red pulse alarm. A notification will appear in the top header.
- Post Internal Notes: As an Agent, view the ticket. Post a reply with the Internal Note checkbox ticked. Log back in as the customer; they cannot see internal notes.
- Update SLA Policy: As Admin under TechCorp, visit SLA Policies and adjust the target hours.
- Trigger Email Simulator: As Admin, navigate to Email Simulator. Fill out the form simulating an email to
support@techcorp.com. Submit it. Click Run Queue Worker to process the job in the database and see the ticket created. - SLA Breach Audit: Run the audit command in the console to identify overdue tickets and trigger team alerts:
php artisan tickets:check-sla
- Add a Tenant: Log in as Super Admin (
admin@saas.com). Spin up a new tenant (e.g.,Acme Corp). Log out and log in as the newly generated tenant admin (admin@acme.com/ password:password) to see an isolated default workspace.