About

Why we built Kizuna.js

The goal is simple: make it impossible to ship a client that has drifted from your API.

The problem

Every API change meant editing the same shapes in several places.

Sooner or later you miss one and it drifts. On Swift one renamed field fails the whole decode, and a client that does not handle that failure crashes.

  • ServerfullName: string
  • Swift clientlet name: String
  • DecodekeyNotFound("name")

Where it started

ts-rest solved the TypeScript half properly.

Routes first, declared once, typed on both sides. The research and most of the syntax started with ts-rest, so if you know it you already know most of Kizuna.js.

  • Servertyped
  • TypeScript clienttyped
  • Swift and Kotlinwritten by hand

What Kizuna.js adds

Swift and Kotlin clients generated from the same routes.

ts-rest stopped at the edge of TypeScript. Kizuna.js carries the same routes into Swift and Kotlin, so a route deprecated once shows up deprecated in all three.

  • TypeScript@deprecated
  • Xcode@available
  • Android Studio@Deprecated

The name

絆 (kizuna) is the Japanese word for a lasting bond between people.

Japan has long inspired us, and 絆 is one of the words we hold close. It is strongest between people who stand by each other through hard times. We chose it for a smaller bond. Every app trusts its API to hold, and Kizuna.js exists to make sure it does.

It solved a real problem for us. I hope it does the same for you, and there is a lot more coming.

Sondre Ørland

Full-stack developer & UX/UI-designer

CreatorNorwaysondreorland

Ready to build?

8 minutes from an empty file to a typed client calling a real endpoint.