How gitwithravi/support-ticketing works
1. Overall shape
- This is a single Laravel 12 monolith with a strong admin/portal split, built on Filament, Livewire, Blade, and Tailwind.
- The core business domain is university support ticketing: tickets, campus buildings, maintenance categories, help-center content, and material requests.
2. Two user-facing surfaces
- The app has two distinct panels wired through separate Filament panel providers:
- Staff/admin panel for agents, supervisors, and administrators.
- Client/student portal for self-service ticket submission and account management.
- The client portal includes its own auth flow (Login, Register, GoogleRegister, VerifyOtp), dashboard, profile editing, and ticket pages.
3. Main domain boundary: tickets
- Ticket is the central aggregate and connects to:
- Category / SubCategory
- Building
- Client
- TicketComment, TicketActivity, TicketField
- TicketSla
- Breakage
- Ticket lifecycle is driven by dedicated actions for priority, status, type, and SLA creation, which keeps business rules out of controllers and UI code.
4. Campus-specific modeling
- The repository is specialized for university operations with domain entities for:
- Buildings and building supervisors
- Maintenance categories
- Breakages with responsible-party tracking
- Material requests
- User types that distinguish admin, agent, and university client roles
- Several migrations show the schema evolving toward campus workflows, including building supervisor pivots, maintenance terms, and university-style authentication fields.
5. Input channels into the system
- Tickets can enter the system through multiple paths:
- Client portal forms
- Public/support pages in resources/views/forms and resources/views/articles
- REST API endpoints under app/Http/Controllers/Api
- Inbound email ingestion using Mailbox plus queued import jobs
- This makes the system multi-channel: web UI, API, and email all converge into the same ticket domain.
6. Workflow and automation
- Business automation is handled by jobs, console commands, observers, and actions:
- ImportImapEmails / ImportImapEmailsCommand for email-to-ticket conversion
- CloseResolvedTicketJob / CloseResolvedTicketsCommand for ticket closure automation
- observers for tickets, help-center content, and form fields to keep related records consistent
- The architecture favors event-like side effects around model changes instead of putting everything in controllers.
7. Authorization and data scoping
- Access control is layered:
- Policies for models like tickets, users, buildings, categories, help-center content, and material requests
- Filament Shield-style role/permission configuration
- Middleware for active-user checks, locale handling, policy bypass in controlled contexts, and client auth debugging
- Additional model scopes (ClientScope, GroupScope, CategoryScope) imply record visibility is constrained by group/category relationships, not just by role.
8. Help center subsystem
- There is a separate knowledge-base domain under app/Models/HelpCenter and app/Filament/Clusters/HelpCenter.
- It includes articles, categories, sections, and forms, with form fields managed through relation managers.
- This subsystem is used both publicly and inside Filament, so it acts as a shared content layer for self-service support.
9. Notifications and communications
- Ticket state changes trigger email notifications such as:
- created
- resolved
- closed
- comment by agent
- escalation required
- OTP verification
- Livewire components handle ticket comments and comment creation in the UI, while notifications keep clients and staff synchronized asynchronously.
10. Admin UX and reporting
- The staff panel is heavily built around Filament resources, relation managers, widgets, infolists, and custom form/table components.
- Notable operational features include:
- ticket exports
- pivot-table style widgets for building/category/agent status
- ticket activity views
- custom notes/comments components
- This suggests the admin experience is designed for operational throughput and oversight rather than a simple CRUD interface.
11. Settings and external integration
- Cross-cutting configuration is centralized in Laravel Settings classes and persisted via settings migrations.
- A dedicated PrfApiService and PRF API settings indicate integration with an external institutional system.
- The app also uses standard Laravel infrastructure for queues, mail, Sanctum, filesystem, and database-backed sessions/cache, with MySQL/PostgreSQL support implied by the README.
12. Persistence and evolution
- The database layer is migration-heavy and reflects a mature domain model with:
- tickets, comments, activities, SLAs
- client auth and OTP fields
- help-center content
- groups, permissions, and pivots
- imports/exports tracking
- Seeders and factories exist for most core entities, which suggests the repo supports both development/test data and repeatable setup.
13. Tests and quality boundary
- The test suite is focused on core domain behavior: models, enums, observers, traits, and settings.
- That reinforces that the most important architecture boundary is the domain model and its side effects, not just HTTP endpoints.
14. How to draw the architecture
- A good diagram would place Ticket at the center, with inbound channels from client portal, admin panel, API, and email import.
- Surround that core with authorization/scoping, notifications, SLA automation, help center, campus entities, and external PRF integration.
- The UI layer is split into Filament staff panel and Filament client panel, both backed by the same Laravel domain and database.
Main entry points: Ticket.php Ticket · TicketCreated.php Notifications · Article.php Help center · TicketResource.php Filament admin
Components 19
User surfaces
Staff panel, client portal, and public support pages.
- Staff panel · Admin-facing Filament surface for operations and management.
app/Providers/Filament/AppPanelProvider.php - Client portal · Self-service portal for students/clients with auth and ticketing.
app/Providers/Filament/ClientPanelProvider.php - Public pages · Public article, category, and form pages used for support intake.
resources/views/articles/show.blade.php
Core domain
Ticketing, campus entities, help center, and shared models.
- Ticket · Central support case model tying together requesters, campus context, workflow, and history.
app/Models/Ticket.php - Campus data · Buildings, categories, subcategories, clients, and group-based scoping for university workflows.
app/Models/Building.php - Breakages · Maintenance/breakage tracking attached to tickets.
app/Models/Breakage.php - Material requests · Separate operational request stream with items and status tracking.
app/Models/MaterialRequest.php - Help center · Shared self-service content layer for articles, categories, sections, and forms.
app/Models/HelpCenter/Article.php
Workflow
Actions, jobs, commands, observers, notifications, and policy enforcement.
- Ticket actions · Encapsulated ticket mutations for priority, status, type, and SLA creation.
app/Actions/Tickets/UpdateTicketStatus.php - Automation · Background processing for email import and automatic ticket closure.
app/Jobs/ImportImapEmails.php - Observers · Side effects that keep tickets and help-center records consistent.
app/Observers/TicketObserver.php - Notifications · Async notifications for ticket lifecycle events and OTP verification.
app/Notifications/TicketCreated.php - Access control · Policies, middleware, and model scopes for role and record visibility.
app/Policies/TicketPolicy.php
Platform
Filament, settings, API, and infrastructure integration.
- REST API · Programmatic ticket intake and read endpoints.
app/Http/Controllers/Api/TicketController.php - Livewire comments · Ticket comment composition and threaded comment display in the UI.
app/Livewire/CreateTicketComment.php - Filament admin · Staff resources, relation managers, widgets, exports, and infolists around tickets and operations.
app/Filament/Resources/TicketResource.php - Filament client · Client-facing pages, ticket resource, and onboarding/auth flow in Filament.
app/Filament/Client/Resources/TicketResource.php - Settings · Persisted workflow, general, advanced, and PRF API settings.
app/Settings/WorkflowSettings.php - PRF integration · Institutional API integration used by settings, users, and material requests.
app/Services/PrfApiService.php
Connections 22
- Staff panel → Filament admin: serves · The staff panel is implemented through Filament admin resources and widgets.
- Client portal → Filament client: serves · The client panel exposes the self-service ticketing experience.
- Public pages → Help center: renders · Public pages surface help-center content and support forms.
- Filament admin → Ticket: manages · Admin resources operate on tickets and related records.
- Filament client → Ticket: creates/views · Clients submit and track their own tickets.
- REST API → Ticket: ingests · REST endpoints create and expose tickets programmatically.
- Livewire comments → Ticket: comments on · Livewire components add and display ticket comments.
- Ticket actions → Ticket: mutates · Dedicated actions encapsulate core ticket lifecycle changes.
- Automation → Ticket: automates · Jobs and commands import email and close resolved tickets.
- Observers → Ticket: reacts to · Observers enforce consistency around ticket and help-center changes.
- Notifications → Ticket: notifies for · Notifications broadcast ticket lifecycle events to clients and staff.
- Access control → Ticket: controls access · Policies, middleware, and scopes constrain ticket visibility and actions.
- Ticket → Campus data: relates to · Tickets are scoped by buildings, categories, subcategories, clients, and groups.
- Ticket → Breakages: tracks · Breakage records capture maintenance responsibility and outcomes.
- Ticket → Material requests: connects to · Material requests form a parallel operational flow in the same domain.
- Ticket → Help center: supported by · Help-center content supports self-service ticket resolution.
- Campus data → Access control: scoped by · Group and category scopes limit records by campus relationships.
- Help center → Observers: kept consistent by · Article, category, form, and field observers maintain content integrity.
- Settings → PRF integration: configures · Persisted settings supply credentials and workflow options for the external API.
- PRF integration → Material requests: integrates with · PRF integration supports material request and user synchronization workflows.
- Notifications → Client portal: updates · Client-facing notifications keep the portal in sync with ticket state.
- Notifications → Filament admin: updates · Staff receives async updates on ticket activity and escalations.