pediatric-ai-scribe-v3/public
Daniel 39c1663334 feat: invite-only registration
registration_enabled was a single switch: open to anyone, or closed to
everyone. This adds the setting an operator actually wants in between — open
to people you invited.

A code is single-use, expires (7 days by default, 90 maximum), and can be
revoked or deleted. It is stored hashed with only its last four characters
kept, because an invite grants account creation and a database dump should
not hand someone a working one. The code is readable exactly once, in the
response that creates it.

The claim is a single conditional UPDATE carrying every condition, so two
registrations racing the same code cannot both succeed. It happens after the
account exists, so a code is never spent on a failed registration — and if
the race is lost, the just-created account is removed rather than left behind
as a free registration. The rejection never says which of the four reasons
applied; distinguishing them would tell someone probing codes which guesses
were closer.

Codes avoid I, L, O and U so they survive being read aloud or copied off a
screen, and matching ignores case and separators.

The sign-up field appears only when the server says a code is required. The
admin card creates, lists, revokes and deletes, and carries the toggle.

Verified against the live database: create, claim, second claim refused,
unknown code refused, revoking a used code refused, delete. 684 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-10 23:12:07 +02:00
..
.well-known Add SHA256 fingerprint to assetlinks.json for TWA domain verification 2026-03-29 00:32:58 +00:00
audio Match TTS voices to the selected LiteLLM model 2026-07-30 17:34:34 +02:00
components feat: invite-only registration 2026-09-10 23:12:07 +02:00
css fix: stop iOS zoom, compact model control, quieter composer, better search 2026-09-10 15:26:43 +02:00
data move pe guide data to json 2026-05-08 08:56:21 +02:00
icons Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
images/pe-guide feat(pe-guide): real audio, innocent-murmur panel, APTM image, all-ages resp+CV 2026-04-22 21:00:42 +02:00
img feat: Bedside clinical reference module + age→weight estimator + dose-math unit tests 2026-04-20 02:49:42 +02:00
js feat: invite-only registration 2026-09-10 23:12:07 +02:00
vendor stabilize assistant and add diagrams 2026-05-08 00:23:00 +02:00
404.html rebrand to Pediatric Clinical Tools, add diagrams tab, simplify litellm transcribe/tts 2026-05-02 18:23:06 +02:00
e2e-harness.html fix(nav): move image lightbox to index.html so NRP + seizure pathways 2026-04-23 18:58:38 +02:00
favicon.ico Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
index.html feat: invite-only registration 2026-09-10 23:12:07 +02:00
manifest.json fix: image models can be added and offered; solid phone top bar on iOS 2026-09-10 13:46:19 +02:00
sw.js harden clinical assistant source handling 2026-05-09 19:59:04 +02:00
template-guide.md feat: add extension import preview 2026-05-08 22:26:53 +02:00