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.
| Port | Lives in | Capability | Current adapters |
|---|---|---|---|
Transcriber | packages/transcription | Client-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 engine | packages/transcription (engine port) | Server-side ASR backend | whisper-large-v3-turbo via Workers AI (@cf/* — adapter-only literal) |
Db | packages/db | Database access (Drizzle) | Cloudflare D1 (prod/dev), @ktb/db-sqlite better-sqlite3 (dev:node) |
| Audio storage | consultations pipeline | Session audio blob storage | Cloudflare R2 (audioKey) |
| Captcha | packages/captcha* | Bot protection | Turnstile (captcha-turnstile), local stub (captcha-stub) |
| Auth | packages/auth* | Sessions/identity | better-auth (auth-better) |
| Interop | packages/interop-* | EHR data exchange | FHIR, 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.