A clinician can push an updated record to a wallet-linked patient (permanent share). The snapshot is signed with the clinic Ed25519 key and sealed to the wallet's X25519 key — derived from its Ed25519 wallet number via the birational map, verified byte-for-byte against the wallet's own derivation. Stored pending, delivered over the /wallet relay live and on the wallet's next authenticated connect (offline catch-up). The patient approves/denies in-app; the wallet signs its decision, the backend verifies it, and the record is replaced only on approval. Wallet pins the clinic key (TOFU) and warns on change. Backend: walletRecordUpdates table + service, ed25519PubToX25519Hex helper, POST /api/patients/wallet/push, GET .../link/:fileNumber|updates|updates/:id, wallet:update-request / wallet:update-response relay events. Frontend: "Push to wallet" dialog with live status, wallet-link gating on the patient sheet, "Sent updates" list under Settings → Signing, walletPush / walletUpdatesList locale namespaces across all five languages. Bumps to v0.5.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
temetro frontend
The clinician-facing AI chat UI for temetro — a Next.js 16 app where
clinicians retrieve and organize patient data in natural language, rendered as
rich record cards. It's wired to the ../backend for real auth,
multi-tenant clinics, and live patient data.
Stack
Next.js 16 (App Router) · React 19 · TypeScript · Tailwind CSS v4 · COSS UI components (Base UI) · i18next · Socket.io client.
This app runs a customized Next.js 16 whose conventions differ from the public docs (e.g. route protection lives in
proxy.ts, notmiddleware.ts). SeeCLAUDE.mdandnode_modules/next/dist/docs/before writing Next.js code.
Develop
npm install
npm run dev # Next dev server (Turbopack) on http://localhost:3000
Other scripts: npm run build (production build), npm run start (serve the
build), npm run lint. There is no test runner — verify changes by running the
dev server.
Talking to the backend
The frontend needs the API running (see ../backend). It resolves
the backend URL from the host you open the app on — so it works on
localhost and across the clinic LAN (http://<server-IP>:3000) without a
rebuild. Set NEXT_PUBLIC_API_URL only to pin a fixed or reverse-proxied URL;
see lib/backend-url.ts.
Architecture
app/— App Router.app/(app)/is the authenticated product shell;app/(auth)/holds the login / signup / onboarding pages.components/chat/— the chat UI (input, message state, patient cards).components/settings/— settings panels, including About & updates (version + LAN access).components/ui/— COSS primitives (Base UI, added via the shadcn CLI).lib/— API + auth clients, i18n, and data helpers.
See CLAUDE.md for the full architecture, theming, and gotchas.
License
MIT.
