Skip to content

hds-support-js

LibraryGitHub

“Help & support” for HDS apps: a headless SupportClient and a React <SupportChat> that let a signed-in user chat with the Health Data Safe team. hds-webapp uses it for Settings → Help & support.

  1. The support service publishes the support group’s permanent open-link invite (GET /public/config).
  2. The user consents to a chat-only, non-delegable offer: one read permission on the empty hds-support placeholder stream. The team has no access to the user’s health data; the client refuses any other offer.
  3. Accepting creates an ordinary CMC relationship, so the team also shows in the user’s Connections, with its chat.
  4. When nobody is online (GET /public/presence), the user may leave an email address (POST /notify): one email, without the message, at the team’s first answer; the address is then deleted.

Installed from GitHub like hds-forms-js (git+https://github.com/healthdatasafe/hds-support-js.git); depends on hds-lib and hds-forms-js, React 19 as a peer. The host app builds a SupportClient with the user’s pryv.Connection (personal token), the service URL and its own CMC scope stream (cmc.appScope('<app code>')); <SupportChat> then handles consent, the thread, presence and the email offer. Setup details (Vite, Tailwind sources) are in the repo README.