Getting started

Connecting services

Let changes send email and store data: connect Resend and a Neon database in your Vercel team, set keys where your app runs, and paste the rest once.

Some changes need an outside service: sending email ("email the form's answers to me"), storing data (a waitlist, a contact form), or a key for something else (a Stripe account). This guide covers all three: Resend for email, Neon for a database, and the secret field for any other key. For email, Revyse handles the request in one of three ways:

  • Your project already sends email (Resend, Nodemailer/SMTP, SendGrid, Postmark, Mailgun or Amazon SES): Revyse writes the code against what you have. If the change needs new variables, it names them for you to set.
  • It doesn't, and your organization has connected Resend in Revyse: Revyse does three things. It adds the Resend SDK, writes server-side code that sends the email, and names the variables. You set them where the app runs with one confirmation.
  • It doesn't, and nothing is connected: Revyse stops and asks you to connect a service first, so the change isn't left half-working.

The first sections connect Resend (email) and Railway (where your app runs) and set the variables; then a database, then keys a change needs, then rotating and disconnecting.

You need

  • The agent engine, every project's default (not "engine": "classic"; see supported changes).
  • The owner role in the organization. Only owners connect, rotate and disconnect services, set variables on hosts, and pull them to a machine.
  • If your app deploys on Vercel: the Revyse Vercel integration installed and the project mapped under Previews (see the cloud quickstart). The integration needs its environment-variable permission. If you installed it before that was added, approve the updated permissions in Vercel.

1. Connect Resend

  1. Create a Resend account at resend.com.

  2. In Resend, open Domains → Add domain. Add the domain you send from, then add the DNS records it lists, and wait until it shows as verified.

  3. In Resend, open API Keys → Create. Give the key Sending access only, for that one domain. A full-access key also works, but Revyse will suggest the narrower one.

  4. In Revyse, open the organization's Integrations and choose Resend:

    • Paste the key into Resend key.
    • Enter the Sender, an address on the verified domain, such as Acme <hello@acme.com>.
    • Press Connect Resend.

    Revyse checks the key with Resend before saving it, using a read-only call. You'll see "The key works, with sending access only."

From then on, the card shows "Connected, key ending abcd". The key itself is never shown again.

Enter keys on the dashboard only. Revyse refuses a request, an answer or feedback that contains a key, and the overlay never asks for one.

2. Connect Railway (if your app runs there)

  1. In Railway, open the project, then Settings → Tokens. Create a project token for the environment the app runs in, for example production. An account token won't work.
  2. In Revyse, under Integrations → Railway, paste the token into Railway key and press Connect Railway. Revyse checks it and learns which project and environment it is for.
  3. Under Service that runs the app, pick the Railway service that runs your app, then press Use this service.

3. Set the variables where your app runs

In the project's Settings, under Service variables → Resend:

  1. Tick where to set them: Vercel (production and preview, as encrypted variables), Railway (the service you picked), or both.
  2. Tick Set RESEND_API_KEY and EMAIL_FROM on the places ticked above.
  3. Press Set the variables.

Each host succeeds or fails on its own, and a failure says what to fix (see Troubleshooting). Settings then lists where the variables are set and when. Your app picks them up on its next deployment.

4. Use them on your machine

In the project directory:

npx revyse env pull

It shows the variable names and asks before writing them to .env.local. It writes only if git ignores .env.local, and refuses otherwise, so the key can't be committed by accident. The file is readable by you only. Use --file .env.development.local to write elsewhere. Restart your dev server afterwards.

Pulling is for owners only, and each pull is recorded in the organization's audit trail, by variable name.

5. Ask for the change

Select an element and describe the change, for example:

Add a catering enquiry form under this section: name, email, event date and number of guests. When it's submitted, email the details to orders@example.com and show a thank-you message.

The plan lists the variables the change uses (RESEND_API_KEY, EMAIL_FROM). When you approve it, Revyse:

  • adds resend at the version Revyse supports, through your package manager, with an exact version and lifecycle scripts off. package.json and the lockfile become part of the change, and revert with it;
  • writes the sending code to run on the server (a server action or a route handler), so the key never reaches the browser;
  • runs your checks. In the cloud, checks get placeholder values for the keys, never the real ones.

If nothing is connected yet, the overlay shows This needs an email service, with a link to connect it on the dashboard. Once you've connected it, press I've connected it: plan again.

Databases

A database lives in your own Vercel team, through the Vercel Marketplace: Neon Postgres, billed by Vercel. Revyse never holds its credentials.

  1. On the project's settings in Revyse, under Database, click Connect Neon through Vercel. It opens Neon on the Vercel Marketplace; install it in the team that owns the project and connect it to the Vercel project. Under Advanced Options → Deployments Configuration, turn on Preview: each preview deployment then gets its own database branch, and Revyse's previews can save and list data without touching production.
  2. Back in Revyse, click Check again. Revyse reads the variable names on the Vercel project (never their values) and records the connection, and whether previews branch.
  3. In the app, run npx revyse db setup once. It shows every file as a diff and asks once, then adds the Drizzle client on Neon's driver, an empty schema, Drizzle Kit's config, the db:generate and db:migrate scripts, and drizzle-kit migrate before the build, so migrations run on every deploy. An app that already uses Prisma or Drizzle keeps its setup: Revyse's changes work with it as it is.

From then on, a change that needs data writes the schema, a migration and the code against that database; DATABASE_URL comes from the Vercel project (locally, paste it into .env.local).

Migrations. Revyse writes them additive by default: new tables and columns rather than dropped or narrowed ones. A change with a migration always waits for an approval on its change page, whatever the project's release setting, and the approval shows the migration's SQL. One that loses data (a dropped table or column, a narrowed type, a truncate or a delete) is marked Destructive with what it loses, and a reminder that reverting the code doesn't bring that data back. The preview runs the migration on its own database branch as it deploys; production runs it when the change ships. Revyse itself never runs anything against a database.

Keys a change needs

When a plan needs a variable the catalogue doesn't cover (a Stripe key, say), Revyse names it on the plan and shows a secret field for it: in the overlay, and on the change page in the dashboard. Paste the value there, never in the chat.

  • On the live site and in the dashboard: the value goes straight to the project's Vercel project, for the environments you tick (production and previews by default), through the Vercel integration. Revyse doesn't store, log or show it, and the model never sees it, so to change it later you paste it again. The Vercel project must be connected under the project's settings first.
  • On your machine: the overlay hands it to the local agent, which writes it into .env.local (and refuses if git tracks that file). It never leaves your machine.
  • In the chat: a message that looks like a key is refused before it goes anywhere, and the message says where to paste it instead.

The audit trail records that a variable was set, by name and environments, never its value.

Rotating a key

  1. Create a new key in Resend, as in step 1.
  2. Under the organization's Integrations, paste it into New Resend key and press Replace the key.
  3. The project's settings mark each host that still has the old key: "Vercel still has the old key: set them again". Set the variables again (step 3) and run npx revyse env pull on each machine.
  4. Delete the old key in Resend.

Disconnecting

Under the organization's Integrations, press Disconnect Resend. To remove RESEND_API_KEY and EMAIL_FROM from every host Revyse set them on, first tick Also remove the variables Revyse set from your hosts. Revyse deletes the stored key at once. Copies in .env.local files on developers' machines are theirs to delete.

Where your keys go

Goes to Never goes to
The service itself, once, to check the key The AI model, in any form
The hosts you tick (Vercel, Railway) Cloud workspaces: their checks get placeholder values
.env.local on an owner's machine, through revyse env pull Logs, the audit trail (names only), diffs, pull requests, check output

Catalogue keys (Resend, Railway) are stored encrypted, scoped to the organization. A key you paste into a change's secret field is not stored at all: it goes to the Vercel project or to .env.local in that one request, and Revyse keeps nothing; to change it later, paste it again. A database's connection string is never seen by Revyse: Neon sets it on your Vercel project, and Revyse reads only the variable's name. Revyse also recognises a key in places it shouldn't be: if your app prints one in a check's output, Revyse redacts it. If a file in your project has a key hard-coded, Revyse leaves that file alone and suggests moving the key to an environment variable. More in how Revyse handles your code and data.

Troubleshooting

You see What to do
"Resend didn't accept the key: …" Copy the whole key again; check in Resend that it wasn't deleted.
"Railway didn't accept the token" Use a project token (project → Settings → Tokens), not an account or team token.
"Vercel answered 403 … environment-variable permission" Approve the Revyse integration's updated permissions in Vercel, then set the variables again.
"Pick the Vercel project that deploys this project first" Map the Vercel project in the project's settings, under Previews.
"Pick the Railway service that runs the app under the organization's Integrations first" Choose it under Integrations → Railway (step 2.3).
".env.local isn't ignored by git, so the keys could be committed" Add .env.local (or .env*.local) to .gitignore, then run npx revyse env pull again.
"Only project owners can pull service variables." Ask an owner to pull, or to make you an owner.
"That looks like an API key or token. Don't paste keys into a request…" Remove the key from your request. Paste it into the secret field the plan shows for its variable, or connect the service under the organization's Integrations.