Skip to Content
KTB Health Docs
Reference

Ports catalog

The capability ports in the product repo and their current adapters.

Domain code talks to ports — interfaces named by capability, not vendor. Adapters at the edge implement them. This is the current catalog.

PortLives inCapabilityCurrent adapters
Transcriberpackages/transcriptionClient-side speech-to-text (partial/final events, confidence stats, audio capture)@ktb/transcription-whisper (in-browser Whisper worker), @ktb/transcription-webspeech (Web Speech API)
Transcription enginepackages/transcription (engine port)Server-side ASR backendwhisper-large-v3-turbo via Workers AI (@cf/* — adapter-only literal)
Dbpackages/dbDatabase access (Drizzle)Cloudflare D1 (prod/dev), @ktb/db-sqlite better-sqlite3 (dev:node)
Audio storageconsultations pipelineSession audio blob storageCloudflare R2 (audioKey)
Captchapackages/captcha*Bot protectionTurnstile (captcha-turnstile), local stub (captcha-stub)
Authpackages/auth*Sessions/identitybetter-auth (auth-better)
Interoppackages/interop-*EHR data exchangeFHIR, openEHR (in progress)

Conventions

  • Port packages contain interfaces and domain types only — no vendor imports, no node:*/Bun/process, no provider literals.
  • Adapters are sibling packages (<capability>-<vendor>) selected at the composition root.
  • New capability? Add a port in a packages/ domain package first, then adapters. See the Add a port adapter tutorial.

On this page