Skip to content

Support

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
RoutePurpose
/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:

StatusBadgePriorityBadge
opendefaultlowsecondary
repliedsecondarymediumdefault
closeddestructivehigh / 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.

TableDescription
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
ComponentLocation
Ticket dashboard + filterssrc/routes/(app)/business/apps/support/+page.svelte
Ticket detail + message threadsrc/routes/(app)/business/apps/support/[ticketId]/+page.svelte
Department managementsrc/routes/(app)/business/apps/support/departments/+page.svelte
ActionDescription
replyPost a message and set status to replied
closeClose the ticket
reopenReopen a closed ticket
ActionDescription
createCreate a new department with name and optional description
updateUpdate a department’s name and description
deleteDelete a department