Skip to content

API reference

Generated from the source with TypeDoc at build time — every exported symbol, with its signature and TSDoc. One page per package, listed in dependency order: contract and di depend on nothing here, then config and core, then the harness, the observability starter, the three application-service ports, the Prisma starter and the three transport starters on top of core.

  • @btravstack/contract — The contract tier: markers and normed shapes a client and the server that implements it both need — the authenticated() marker, and a cursor page with its schema. Additional entry points: @btravstack/contract/zod.
  • @btravstack/di — A module-based dependency-injection container for TypeScript: ports as the vocabulary an application defines, providers bound at one edge, and modules that declare their imports and exports.
  • @btravstack/config — Configuration the twelve-factor way for @btravstack/di: typed values bound from the environment, validated once, injected like any other service.
  • @btravstack/core — The application kernel: boot a di module into a running process, and stop it without losing work.
  • @btravstack/testing — Test the applications @btravstack/core boots: an in-memory runtime, a fake clock, a boot fixture that stops what it started, and a tap into a running graph. Additional entry points: @btravstack/testing/jwt.
  • @btravstack/observability — Observability for @btravstack/core: a strict Logger port correlated with the kernel's units, a dependency-free JSON sink, and the lifecycle events as log lines. Additional entry points: @btravstack/observability/pino, @btravstack/observability/otel.
  • @btravstack/cache — A Cache port for @btravstack/core: an in-memory adapter, a Redis adapter, and a composition that reports every call to Observers. Additional entry points: @btravstack/cache/redis.
  • @btravstack/mailer — A Mailer port for @btravstack/core: a recording adapter a spec asserts against, an SMTP adapter, and a composition that spans, counts and logs every send. Additional entry points: @btravstack/mailer/smtp.
  • @btravstack/storage — A Storage port for @btravstack/core: an in-memory adapter, an S3-compatible adapter with presigned reads, and a composition that spans, counts and logs every operation. Additional entry points: @btravstack/storage/s3.
  • @btravstack/prisma — The Prisma starter for @btravstack/core: DATABASE_URL through Config, the Postgres driver adapter, and a client whose pool is the application scope's. Additional entry points: @btravstack/prisma/rls.
  • @btravstack/http-server — The HTTP starter for @btravstack/core: oRPC over node:http, one unit per request, and a drain that actually stops accepting. Additional entry points: @btravstack/http-server/openapi, @btravstack/http-server/jwt, @btravstack/http-server/session, @btravstack/http-server/oidc.
  • @btravstack/temporal-worker — The Temporal worker runtime for @btravstack/core: one unit per activity attempt, and a drain that honours the kernel's deadline. Additional entry points: @btravstack/temporal-worker/schedule.
  • @btravstack/amqp-worker — The AMQP starter for @btravstack/core: the handlers as a port, one unit per delivery, and a drain the kernel's deadline releases.

Looking for prose?

The generated pages document signatures. For what each package is for, with its install line and worked examples, read Packages and install and the hand-written reference under it; for why the surface is shaped this way, read Why btravstack?.

Released under the MIT License.