Deploy your app to Vercel

Last updated 2026-08-05

How do I put an AI-built app on the internet?

Once code exists for a branch of your Leefy plan, you need a host. Vercel is the fastest path for many modern web apps (especially Next.js): connect a GitHub repo, set environment variables, and every push can get a live URL.

You will do every step in Vercel (and GitHub). Nothing deploys automatically from Leefy. We never claim “Deployed” until you have a URL you can open and a success check you trust.

About 20–40 minutes for the minimal path if the repo already builds locally.

What do I need before I start?

Required

  • A GitHub repository that contains the app (see Put your project on GitHub). Other git hosts work with Vercel too; this guide’s clicks assume GitHub.
  • A free Vercel account (GitHub login is the easy path).
  • The app builds on your machine or in CI, or you are ready to fix the first failed deploy log.
  • Your project’s .env.example (or a written list of secrets) if the app needs API keys, database URLs, etc.

Optional (only if your app uses them)

  • Supabase (or another database/auth provider) with a cloud project — not only local.
  • Stripe live mode if you take real payments.
  • PostHog / Sentry if you want analytics or error tracking on day one.

Minimal path — get a URL online

Do this first. Skip advanced sections until you have a green deploy.

1. Sign in to Vercel

  1. Open vercel.com and sign in (GitHub is fine).
  2. You should reach a dashboard where you can Add New… → Project.

2. Import the GitHub repository

  1. Click Add New… → Project (wording may be Import Project).
  2. Install or authorize the Vercel GitHub app if asked — allow access to the repo (or all repos, if you prefer).
  3. Find your repository in the list and click Import.
  4. Framework preset — Vercel usually detects Next.js or similar. Leave defaults unless you know you need a different root directory or build command.
  5. Do not add every env var yet if you are unsure — you can deploy once, fail on missing env, then add them. Or paste from .env.example now under Environment Variables for Production (and Preview if you use PR previews).
  6. Deploy.

You’re done with this section when the deploy finishes Ready and Vercel shows a .vercel.app URL.

3. Open the live URL

  1. Click the visit URL on the deployment.
  2. Confirm the homepage loads (even if login or data is incomplete).
  3. Copy that production URL.

4. Bring the URL back to Leefy

Until Leefy has a dedicated deploy field:

  1. Paste the URL into the fruit / ship node description, root notes, or soil (“Live: https://…”) so the tree records what is online.
  2. Do not mark the product “launched” in your own mind until post-deploy checks pass for your app.

How do I fix a failed first deploy?

  1. Open the failed deployment → Building / Logs.
  2. Common causes:
    • Missing environment variables — add them under Project → Settings → Environment Variables, then Redeploy.
    • Wrong root directory — monorepo apps need the folder that contains package.json.
    • Build command / Node version — match what works locally; set Node in Project Settings if needed.
  3. Redeploy from the Deployments tab after each fix.

Optional — database and auth (e.g. Supabase)

Only if your app needs a cloud database or hosted auth.

  1. Create a cloud project in your provider (e.g. Supabase).
  2. Copy URL and keys into Vercel Environment Variables (Production and Preview as appropriate). Never commit service-role keys to git.
  3. Apply schema the way your project documents (often supabase db push or migrations in CI) — prefer migrations over hand-editing production tables.
  4. Set auth redirect URLs to your Vercel production domain and https://your-domain/auth/callback (plus preview URL patterns if previews must log in).
  5. Redeploy after env changes.

Optional — payments (e.g. Stripe)

  1. Use test mode for previews and local work.
  2. For real money: live mode prices and a live webhook to https://<your-domain>/api/… as your app expects.
  3. Put live secrets only in Production env on Vercel.
  4. Run one real purchase and refund yourself before inviting customers.

Optional — analytics and errors

  • PostHog — project key (and host if self-hosted) as env vars.
  • Sentry — DSN as env var; source maps optional for v1.

What should I check right after deploying?

  • Homepage loads on the production URL.
  • Sign-in works end to end if you have auth.
  • One core product flow works live (not only on localhost).
  • A nonsense path shows a real 404, not a blank error.
  • Env-specific behaviour (test vs live Stripe, etc.) matches what you intended.

If something goes wrong

SymptomWhat to try
Deploy fails on install/buildRead the build log; fix dependency or TypeScript errors locally first
Site loads but API routes 500Missing server env vars — compare .env.example to Vercel Production
Auth redirect errorsAdd the exact production callback URL to your auth provider
“Works on my machine” onlyConfirm the GitHub branch Vercel builds is the branch you pushed
I need a custom domainVercel → Project → Settings → Domains; then update auth allowed URLs

What Leefy does not do (on purpose)

  • Leefy does not create a Vercel project or push deploys for you.
  • Leefy does not store your Vercel tokens.
  • Leefy does not mark a fruit deployed until you complete a success check yourself (or a future integration confirms it).