Start here
ContractSpec gives an operation an explicit contract for its inputs, outputs and policy. Your handler supplies the behavior. Start with one operation you can run locally, then connect it to the surfaces your application needs.
Run your first operation
Make a shipping label preview that returns a label for a valid order and rejects invalid input. The example runs in one TypeScript file. You need a terminal, Bun and access to the public npm registry for installation. The guide was verified with Bun 1.4.2.
Bring a contract into your project
If you already have an application, choose an existing endpoint whose inputs and outputs are easy to check. The Next.js guide walks through adding a contract to one endpoint. The CLI guide covers setup and repo-local guidance for teams using the CLI.