Neon | Dyad

Neon

Use Neon for a serverless Postgres database with auth and branching.

What is Neon

Neon is a serverless, fully-managed Postgres platform with built-in auth. What makes it stand out:

Neon integration is currently available for Next.js and Vite projects.

Setup

Connecting to Neon only takes a couple of minutes.

Prompt Dyad for a database

Just start chatting. When you request a backend or database feature, Dyad asks if you'd like to connect a database, the fastest way to kick off setup:

Add a database to store my todos

Choose Neon in the integration selector

When prompted to add a backend, pick Neon from the integration selector. You're taken to its connector in the Configure panel, where you can set everything up.

Connect your Neon account

Not connected yet? Click Connect Neon. Your browser opens to authorize Dyad via OAuth.

Only you can access your Neon resources through Dyad. Your access token is securely stored locally on your computer.

Once authorized, you're redirected back to Dyad and the connection is complete.

Choose or create a project

Pick an existing Neon project for your app, or create a new one. You can reuse one project across apps, but a separate project per app is simpler and safer.

Choose a branch

Next, pick which branch your app should use:

The development branch is recommended for most apps. Just remember that you'll have to migrate your schema to production when it's time to deploy.

(Optional) Enable required email verification

Using Neon Auth? You can require users to verify their email on sign-up. Toggle it in your project settings for an extra layer of verification.

Development

Setup done. Now just keep chatting. Dyad handles your schema, queries, and auth using Neon.

On the development branch, every change stays isolated from production, so you can iterate freely. Open the Neon Console anytime to inspect tables and data.

Time to deploy

When your app is ready to go live, follow these steps.

If you chose the development branch

  1. Open the Publish panel.
  2. Choose which branch to deploy. It's recommended to choose production.
  3. For production, click Migrate to Production. This copies your schema from the development branch to production so the live database matches what you built.

Make sure you have database backups enabled before migrating, otherwise the migration can't be undone.

If you chose the production branch

No migration needed. Your app is already on the production branch, so it deploys directly.

Publish your app

Publish your app by following the steps in the Publishing your app guide. During publishing:

Once that's done, your app is deployed and fully functional. 🎉

Keeping Vercel in sync

When you later change an environment variable or switch the deployment branch, click Sync to Vercel in the Database section. It pushes your database env vars to Vercel and adds your deployment domain to Neon's auth redirect allowlist.

After syncing, a redeployment is still required for your live app to pick up the new configuration.