ShiftAPI

Write Go.
TypeScript keeps up.

A motherf*ckin' Go framework that turns your handler types into an OpenAPI 3.1 spec at runtime and a typed TypeScript client on every save, believe that.

$npm create shiftapi@latest
or read the motherf*ckin' quickstart
main.goyou write this
type Greeting struct {
	  `json:"hello" `
	SentAt time.Time `json:"sent_at"`
}

func greet(
	r *http.Request, in *Person,
) (*Greeting, error) {
	// ...
}

api.Handle("POST /greet", greet)
api.d.tsregenerated on goddamn every save
export interface Greeting {
  hello: string;
  sent_at?: string;
}

const { data } = await client.POST(
  "/greet", { body },
);
data.hello
//   ^? string
  1. When you compile

    Registering a goddamn handler captures its input and output structs. Field tags say where each value is read from.

  2. When the damn server starts

    Those muthaf*ckin' types become an OpenAPI 3.1 document served by the same process, so the spec cannot drift from the motherf*ckin' code.

  3. When you save

    The Vite or Next.js plugin fetches the spec and rewrites the client. I ain't playin'. Types update in your editor without a muthaf*ckin' reload. Hell yeah.

Validation tags, typed errors, file uploads, server-sent events, WebSockets, and a muthaf*ckin' Scalar reference at /docs come along with it. The API is still an http.Handler, so your middleware and deployment stay the same. Read the motherf*ckin' docs for the damn rest.