Deploying with Vercel
Swipe to show menu
Vercel takes your code from GitHub and publishes it as a live website. Every time you push an update to GitHub, Vercel automatically redeploys it. You do not need to do anything manually after the first setup.
Your code is on GitHub. This chapter gets it live on the internet with a real URL you can share with anyone.
The steps
Go to vercel.com and sign up. Connect your GitHub account when prompted. This is what allows Vercel to see your repositories.
Once you are on the Vercel dashboard, click Add New and select Project. You should see your GitHub repository listed. Click Import.
This is the most important step. Your API key is not on GitHub because it was excluded by .gitignore. That means Vercel does not have it either. You need to give it to Vercel directly.
On the project setup page, open the Environment Variables section. You need to add your API key here before deploying.
| Field | What to enter |
|---|---|
| Key | ANTHROPIC_API_KEY |
| Value | Your actual API key from .env.local |
You can also click Import .env and select your .env.local file directly. Vercel will read the key and value from it automatically. This is the easiest option.
Once the environment variable is added, click Deploy. Vercel will pull all your code files from GitHub and publish them. This takes two to five minutes.
When you see the congratulations screen, your app is live! Vercel gives you a URL you can open in any browser and share with anyone.
Why the environment variable step matters
Your app will build and appear to work without the API key. But the moment someone submits an idea, it will fail because the app has no way to call the AI. Adding the key to Vercel is what makes the core feature actually work in production.
Local .env.local file stays on your computer. Vercel environment variables are your .env.local for the live web version.
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat