Skip to Content
KTB Health Docs
Reference

Package map

What each workspace package in the product monorepo does.

The product repo is a bun workspace. Quick orientation:

Apps

PathWhat
apps/webTanStack Start app — the whole product UI + server. Deploys to Cloudflare Workers via Alchemy.

Packages

PackageRole
packages/kernelPlugin primitives (definePlugin)
packages/app-hostComposition root — discovers plugins, wires layers, CQRS buses
packages/db, packages/db-sqliteDrizzle schema + D1/SQLite access
packages/auth, packages/auth-betterAuthentication (better-auth)
packages/authzAuthorization primitives (Forbidden, guards)
packages/server-fnsServer function plumbing
packages/anamnesis, packages/anamnesis-llmStructured note schema + LLM extraction/cleanup
packages/transcriptionTranscriber port + fallback heuristics
packages/transcription-whisper, -webspeechBrowser transcription adapters
packages/export-pdfConsultation → PDF rendering
packages/interop, -fhir, -openehrEHR interoperability (in progress)
packages/bot, packages/bot-recallMeeting-bot capture source
packages/captcha*Bot protection ports/adapters
packages/driver-frameworkClient driver registry (adapter selection)

Plugins (plugins/)

Feature slices — consultations, patients, dashboard, groups, notifications, jobs, users, platform* — each a single-concern package with routes, services, schema, and views.

Infra (infra/)

Provider adapters implementing infra ports (e.g. infra/cloudflare) plus the Alchemy deploy definitions.

On this page