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.
Why btravstack
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.
Declare your interface once. Types, autocompletion and validation flow to every call site — publisher, consumer, worker and client.
Model failure in the type system. Anticipated errors are returned, not thrown — only a true defect ever escapes up the stack.
Standard-Schema validation runs at every network boundary, so malformed data never makes it past the door of your service.
The packages
@amqp-contract/contract
Type-safe contracts for AMQP & RabbitMQ. Define your exchanges, queues and messages once — get types and runtime validation on both ends.
@temporal-contract/contract
Type-safe contracts for Temporal.io. End-to-end types and automatic validation across workflows, activities and clients.