The Support app provides a helpdesk-style ticket management system for business owners. It supports department organization, priority levels, status filtering, threaded message replies, and ticket lifecycle management (open, replied, closed, reopened).
Ticket dashboard with status and priority filtering
Department-based ticket organization
Four priority levels: Low, Medium, High, Urgent
Ticket lifecycle: Open, Replied, Closed (with reopen support)
Threaded message replies with optional attachments
Requester profile display (name, username, avatar)
Department CRUD with ticket count per department
Stats overview: open tickets and replied tickets
Route Purpose /business/apps/supportTicket dashboard with filters and stats /business/apps/support/[ticketId]Ticket detail with message thread and lifecycle actions /business/apps/support/departmentsDepartment management (create, edit, delete)
The main page displays two stat cards (Open Tickets, Replied) and a filterable ticket list. Filtering controls include:
Status filter — pill-style buttons for All, Open, Replied, and Closed (updates URL ?status= parameter)
Priority filter — dropdown select for All Priorities, Low, Medium, High, Urgent (updates URL ?priority= parameter)
Each ticket row shows the title, requester name, department, last updated date, priority badge, and status badge. Badges use semantic color variants:
Status Badge Priority Badge opendefault lowsecondary repliedsecondary mediumdefault closeddestructive high / urgentdestructive
The [ticketId] page loads the ticket with its department, requester profile, and full message thread. The server queries Supabase directly (no service abstraction) for ticket data and messages with author profiles. Available actions:
Reply — post a message with content and optional attachment URL; automatically sets ticket status to replied
Close — mark the ticket as closed
Reopen — reopen a previously closed ticket
The departments page provides full CRUD for support departments. Each department card shows the name, description, and a ticket count. The page uses an inline Zod schema (name required, description optional) with sveltekit-superforms validation.
Table Description public.support_ticketsTicket records with title, status, priority, requester, owner, and department public.support_messagesThreaded messages within a ticket (content, author, attachment) public.support_departmentsDepartment definitions (name, description, owner_id)
SupportTicket — id, owner_id, requester_id, department_id, title, status (open | replied | closed), priority (low | medium | high | urgent), created_at, updated_at
SupportMessage — id, ticket_id, author_id, content, attachment_url, created_at
SupportDepartment — id, owner_id, name, description
Note
The support app queries Supabase directly in its +page.server.ts files rather than using a shared service layer. Ticket and message queries use Supabase relation joins to inline department and profile data (e.g., support_tickets(*, department:support_departments(id, name), requester:profiles(...))).
Component Location Ticket dashboard + filters src/routes/(app)/business/apps/support/+page.svelteTicket detail + message thread src/routes/(app)/business/apps/support/[ticketId]/+page.svelteDepartment management src/routes/(app)/business/apps/support/departments/+page.svelte
Action Description replyPost a message and set status to replied closeClose the ticket reopenReopen a closed ticket
Action Description createCreate a new department with name and optional description updateUpdate a department’s name and description deleteDelete a department