Modules

Help center

Search with highlighting, topics, articles with steps and tips, feedback and a contact page with suggestions.

composables/useHelpCenter.ts
View in the demo

The help center (/help, /help/[slug], /help/contact) lives in useHelpCenter() over mocks/help.mock.ts, which only holds ids and metadata: articles with author, optional extras per section (tip, steps) and an action route, plus updates, popular searches, support channels, tickets and uptime. The copy is UI text in locales/<code>/help.json (s<n>.heading|text|tip|step<i>, action).

Files

File
Role
pages/help/index.vueThe index and the results view.
pages/help/[slug].vueAn article; 404 when it does not exist.
pages/help/contact.vueThe contact form, tickets and uptime.
composables/useHelpCenter.tsArticles, topics, search and support data.
utils/help.tsExcerpts, ranking, neighbours and uptime, unit tested.
components/pages/help/HelpHero, HelpTopicCard, HelpContactCard.

Rules

Pure functions in utils/, unit tested in tests/unit/. Statuses and segments are derived from the stored data, never stored themselves.

snippet()

An excerpt around the match.

utils/help.ts
snippet(text: string, term: string, radius = SNIPPET_RADIUS): string

rankByOverlap()

Suggestions while typing.

utils/help.ts
rankByOverlap(query: string, items: T[], text: (item: T) => string, limit = 3): T[]

uptimePercent()

Uptime.

utils/help.ts
uptimePercent(days: UptimeDay[]): number

splitMatch()

Highlighting.

utils/text.ts
splitMatch(text: string, term: string): TextPart[]

How it works

  • The index starts with HelpHero: search with the / hotkey synced to ?q=, popular searches and the system status.
  • With a query or ?topic= it becomes the results view: a BaseSectionNav of topics with counts, matches highlighted with BaseTextMatch and excerpts from snippet(). Otherwise it shows HelpTopicCards, popular articles with the FAQ, what’s new and HelpContactCard.
  • Articles show BaseStepList, tips, a deep-link button, BaseFeedbackPrompt (asks why on “No”), previous and next and an aside with BaseTableOfContents, copy link, the topic’s articles and contact.
  • /help/contact suggests articles while typing, sends a demo request and lists tickets and uptime (BaseMiniBars).

Add an article

Add its metadata (id, topic, author, sections, optional extras and action) to mocks/help.mock.ts and its copy to locales/<code>/help.json in every language. Search, topics, previous and next and the table of contents pick it up.

© 2026 melsami UI.
Developer documentation for melsami UI.