btravstack

btravstack

An expressive, robust TypeScript backend.

A small stack of type-safe building blocks for Node — contracts for your messaging and workflows, and a principled way to handle errors. Define things once, let the types flow everywhere.

Explore the org See the packages
amqp-contract temporal-contract unthrown

Why btravstack

Building blocks for the TypeScript backend.

Each package is small, focused and does one thing well — but they share a worldview: your interfaces are contracts, failure is part of the type, and the compiler should catch what tests can't.

01

Contracts, not guesswork

Declare your interface once. Types, autocompletion and validation flow to every call site — publisher, consumer, worker and client.

02

Errors as values

Model failure in the type system. Anticipated errors are returned, not thrown — only a true defect ever escapes up the stack.

03

Validated at the edges

Standard-Schema validation runs at every network boundary, so malformed data never makes it past the door of your service.

The packages

Three libraries, one stack.

amqp-contract logo Messaging
18

amqp-contract

@amqp-contract/contract

Type-safe contracts for AMQP & RabbitMQ. Define your exchanges, queues and messages once — get types and runtime validation on both ends.

  • End-to-end type safety
  • Reliable retry with Dead Letter Queues
  • AsyncAPI 3.0 generation
$ pnpm add @amqp-contract/contract
Repo Docs
temporal-contract logo Workflows
7

temporal-contract

@temporal-contract/contract

Type-safe contracts for Temporal.io. End-to-end types and automatic validation across workflows, activities and clients.

  • Zod validation at every boundary
  • Compile-time implementation checks
  • Result / Future error handling
$ pnpm add @temporal-contract/contract
Repo Docs
unthrown logo Errors
1

unthrown

unthrown

Explicit errors as values — with a separate defect channel for the unexpected. Only a true defect ever throws, and only at unwrap.

  • Errors as values, typed in E
  • A separate defect channel
  • Zero runtime dependencies
$ pnpm add unthrown
Repo Docs

Build backends you can trust the types of.

Star the projects, open an issue, or just read the docs. Everything is MIT-licensed and built in the open.

View on GitHub