Skip to main content
By the end of this guide you’ll have a working Next.js app with a live Google Calendar dashboard — and you’ll have written almost none of the UI yourself.

Corsair context prompt for your agent

Paste this before your feature prompt so the agent knows how Corsair works:
1

Scaffold the T3 app

2

Install

3

Generate your encryption key

Corsair encrypts stored credentials with a Key Encryption Key. Click Regenerate for a new one, or run the command yourself:
Keep this key safe If you lose it, you lose access to all stored credentials. Treat it like a root password.
4

Migrate the database

Corsair needs five tables. Install the driver, then run the migration:
migration.sql
5

Create src/server/corsair.ts

src/server/corsair.ts
6

Connect Google Calendar

Google Calendar uses OAuth2. You’ll need a GCP OAuth app first:
  1. Go to the Google Cloud Console, create a project, and enable the Google Calendar API.
  2. Under APIs & Services → Credentials, create an OAuth 2.0 Client ID (Application type: Web application). No redirect URI needed — Corsair handles it locally.
  3. Copy your Client ID and Client Secret, then store them:
If pnpm corsair isn’t found, add this to your package.json so pnpm builds the native dependency correctly:
package.json
Then re-run pnpm install and retry the setup command.
  1. Start the OAuth flow:
Open the authUrl printed in the terminal. Once you authorize in the browser, tokens are saved automatically and the command exits.
7

Vibe code the dashboard

Paste this prompt into Claude, Cursor, or any AI coding agent:
Run pnpm dev when it’s done.

What’s next

Google Calendar Plugin

Full API reference — create events, check availability, and handle webhook notifications.

Webhooks

React to calendar changes in real time — new events, updates, and deletions pushed to your server.

Workflows

Chain calendar events to other plugins — meeting created → Slack notification → Linear task.

Multi-Tenancy

Building a product? Each user gets their own calendar credentials and isolated data.