Skip to main content
Add Corsair Hub to a TypeScript app in five steps. Your app registers itself with Hub the first time it serves a request, so there is no delivery URL to type into the dashboard — the App sync indicator in the header turns green when it connects.
Prefer to hand this to a coding agent? Point it at this page: “Set up Corsair Hub in this app. Follow https://docs.corsair.dev/hub/setup.md end to end.” It works through the same five steps below.

Prerequisites

A Hub project. Open your project’s Keys tab in the dashboard to copy its API key and signing secret. Secrets are shown once — never log or commit them.

1. Install Corsair and a plugin

@corsair-dev/github is an example — swap it for the integration your app needs. Browse the integrations catalog for plugin ids.
corsair.ts
Pass your app’s database as database. Corsair persists connections and synced data there — Hub stores none of it (see Hub overview).

3. Add the /api/corsair route

The handler serves Hub delivery — OAuth callbacks, connect pages, and self-registration — plus the management API, at its base path. Mount the adapter for your server:
app/api/corsair/[[...path]]/route.ts
Pages Router? Export a catch-all API route at pages/api/corsair/[...path].ts and forward req/res through the same toNextJsHandler. The App Router is the supported default.
You do not put the delivery URL in your hub config — it is resolved per environment (see Delivery URLs).

4. Add your keys to .env

Copy the values from your project’s Keys tab. Never commit them.
.env
The env var names are your choice — the dashboard uses CORSAIR_DEV_* for development and CORSAIR_PROD_* for production so both can coexist. Match whatever you reference in corsair.ts.

5. Start your app

The first request to /api/corsair registers this app’s delivery URL with Hub automatically. The App sync indicator in the dashboard header turns green — you are connected.
The delivery URL is derived from your app’s own config (CORSAIR_DELIVERY_URLPORT), never from an inbound request, and only development keys self-register. See Delivery URLs for detection order and production setup.

What’s next

Delivery URLs

How development and production delivery differ.

Environments

Development vs production keys.

Connect / OAuth

Mint a connect link so users can sign in.

Dashboard

Manage keys, connections, and delivery URLs.