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.
How it works
Section titled “How it works”- The support service publishes the support group’s permanent open-link invite (
GET /public/config). - The user consents to a chat-only, non-delegable offer: one
readpermission on the emptyhds-supportplaceholder stream. The team has no access to the user’s health data; the client refuses any other offer. - Accepting creates an ordinary CMC relationship, so the team also shows in the user’s Connections, with its chat.
- 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.
Consuming it
Section titled “Consuming it”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.
Related
Section titled “Related”- Support Service: presence, reply relay, the offline email.
- Support Console: where the team answers.