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
- Open vercel.com and sign in (GitHub is fine).
- You should reach a dashboard where you can Add New… → Project.
2. Import the GitHub repository
- Click Add New… → Project (wording may be Import Project).
- Install or authorize the Vercel GitHub app if asked — allow access to the repo (or all repos, if you prefer).
- Find your repository in the list and click Import.
- Framework preset — Vercel usually detects Next.js or similar. Leave defaults unless you know you need a different root directory or build command.
- 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.examplenow under Environment Variables for Production (and Preview if you use PR previews). - Deploy.
You’re done with this section when the deploy finishes Ready and Vercel shows a .vercel.app URL.
3. Open the live URL
- Click the visit URL on the deployment.
- Confirm the homepage loads (even if login or data is incomplete).
- Copy that production URL.
4. Bring the URL back to Leefy
Until Leefy has a dedicated deploy field:
- Paste the URL into the fruit / ship node description, root notes, or soil (“Live: https://…”) so the tree records what is online.
- 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?
- Open the failed deployment → Building / Logs.
- 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.
- 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.
- Create a cloud project in your provider (e.g. Supabase).
- Copy URL and keys into Vercel Environment Variables (Production and Preview as appropriate). Never commit service-role keys to git.
- Apply schema the way your project documents (often
supabase db pushor migrations in CI) — prefer migrations over hand-editing production tables. - Set auth redirect URLs to your Vercel production domain and
https://your-domain/auth/callback(plus preview URL patterns if previews must log in). - Redeploy after env changes.
Optional — payments (e.g. Stripe)
- Use test mode for previews and local work.
- For real money: live mode prices and a live webhook to
https://<your-domain>/api/…as your app expects. - Put live secrets only in Production env on Vercel.
- 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
| Symptom | What to try |
|---|---|
| Deploy fails on install/build | Read the build log; fix dependency or TypeScript errors locally first |
| Site loads but API routes 500 | Missing server env vars — compare .env.example to Vercel Production |
| Auth redirect errors | Add the exact production callback URL to your auth provider |
| “Works on my machine” only | Confirm the GitHub branch Vercel builds is the branch you pushed |
| I need a custom domain | Vercel → 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).
Related guides
- Put your project on GitHub — precondition for this path
- Hand off a branch to Claude Code — how the code usually gets written