Connect and Deploy to Vercel
Authorize Vercel, choose where your app ships, and check the variables before you deploy.
Connect Vercel to deploy a Next.js, Vite, or React app from Cloud Studio to Vercel’s global edge network. Use a preview deployment to test changes and a production deployment when you’re ready to release them. Authorize the personal account or team that should own the Vercel project before you deploy.
Authorize Vercel and deploy
Open the Vercel connector
In the BhaiCode dashboard, go to Connectors and select Connect on the Vercel card.
Approve the account or team
Complete the OAuth authorization in Vercel. Select your personal account for your own project or the team scope for a shared project. Check the scope before returning to Studio so the deployment goes to the intended owner.
Pick Vercel in Studio
Open Deploy in Cloud Studio and select Vercel as the target. Check the framework and configure any required variables in Vercel before starting the deployment.
Open the resulting URL
Follow the deployment status and open the URL when the release is ready. Confirm the page loads, then try a route or action that uses the app’s backend if the deployment depends on one.
Use the right deployment URL
Use a preview domain for a change you want to test without sending users to it. Share that URL with reviewers so they can see the deployed app rather than testing against your Studio session. Use the production domain for the release your users should visit. When checking a reported issue, confirm which URL the reporter used before comparing results.
Check the deployment’s environment in Vercel before sharing or releasing it. Don’t infer that it’s production or preview from the project name alone.
Check environment variables in Vercel
Set required database URLs and API keys in the Vercel project’s environment settings. Don’t assume a variable set in BhaiCode was copied to Vercel. Check that each variable goes to the intended project and environment. For example, a preview used to validate database changes should point to a test database rather than production. If the deployment built successfully but an app action fails, check the configuration and runtime logs for that specific deployment.
Treat database URLs and API keys as secrets. Configure them as environment variables instead of putting their values in code or a pull request.