Skip to content
@bidirekt

bidirekt

Bidirekt

Know which service your deploy breaks. Contract testing for microservices, in both directions, without the test environment.

Each service declares, in one YAML file, what it provides and what it reads. A broker you host compares the declarations, and can-i-deploy answers before the deploy. When the answer is no, it names the field, the side and the fix. Nothing runs. Works with REST and GraphQL.

$ curl -sL bidirekt.com/demo | sh

Runs the petstore demo with Docker: a breaking change, can-i-deploy catching it, and the fix.

petstore_api 2.0.0 cannot be deployed to production

petstore_web (1.0.0, deployed):
  Pet.status — petstore_api doesn't provide it, but petstore_web reads it
    → petstore_api: provide it
    → petstore_web: stop reading it, or handle its absence in the code and mark it optional there

In CI

bidirekt publish ./contracts/*.yaml --participant petstore_web --version $SHA
bidirekt can-i-deploy petstore_web --version $SHA --environment production
./deploy.sh
bidirekt record-deployment petstore_web --version $SHA --environment production

The exit code of can-i-deploy is the gate.

Repositories

Repository What it is License
broker Stores the contracts and answers can-i-deploy. One Docker image and a Postgres database. BSL 1.1
cli The bidirekt command line client. Apache 2.0
typescript-sdk Writes the contract from TypeScript or JavaScript code. MIT
php-sdk Writes the contract from PHP attributes or docblock tags. MIT
go-sdk Writes the contract from Go code and struct tags. MIT
skills Agent skill that writes and fixes contract files from your code. Apache 2.0
petstore-example The petstore demo, runnable locally with Docker. Apache 2.0
site bidirekt.com and its docs. Apache 2.0

Links

Pinned Loading

  1. broker broker Public

    Source-available contract testing broker — compatibility verdicts for consumer/provider contracts

    Go 7

  2. petstore-example petstore-example Public

    Run the Bidirekt petstore example locally with Docker

    Shell 1

  3. cli cli Public

    CLI for the Bidirekt broker

    Go 1

  4. typescript-sdk typescript-sdk Public

    TypeScript and JavaScript SDK that writes your Bidirekt contract from your code

    TypeScript 1

  5. php-sdk php-sdk Public

    Generate a service's Bidirekt contract from PHP attributes or docblock tags

    PHP

  6. go-sdk go-sdk Public

    Generate a service's Bidirekt contract from Go code and struct tags

    Go

Repositories

Showing 10 of 10 repositories

Top languages

Loading…

Most used topics

Loading…