- Vercel account
- Node.js installed locally
- Git repository with your code
Set these environment variables in your Vercel project settings:
REACT_APP_API_URL=https://3.142.93.250:8000/api
REACT_APP_MASTRA_URL=https://3.142.93.250:4111
- Install Vercel CLI:
npm i -g vercel- Navigate to the frontend directory:
cd refnet/frontend- Login to Vercel:
vercel login- Deploy:
vercel- Follow the prompts:
- Set up and deploy?
Y - Which scope? (select your account)
- Link to existing project?
N - Project name:
refnet-frontend(or your preferred name) - Directory:
./(current directory) - Override settings?
N
- Set up and deploy?
- Push your code to GitHub
- Go to vercel.com
- Click "New Project"
- Import your GitHub repository
- Set the root directory to
refnet/frontend - Add environment variables in project settings
- Deploy
The following files have been created/updated for Vercel deployment:
vercel.json- Vercel configurationcedar.config.js- Updated with production URLspackage.json- Already configured with build scripts
The project uses:
- Build Command:
npm run build - Output Directory:
build - Install Command:
npm install
If you encounter CORS issues with your backend, ensure your Flask app allows requests from your Vercel domain.
Make sure all environment variables are set in Vercel dashboard under Project Settings > Environment Variables.
Check the build logs in Vercel dashboard for specific error messages. Common issues:
- Missing dependencies
- TypeScript errors
- Environment variable issues
- Go to Project Settings > Domains
- Add your custom domain
- Configure DNS records as instructed by Vercel
- Enable SSL certificate
- Check deployment status in Vercel dashboard
- Monitor function logs for any runtime errors
- Use Vercel Analytics for performance insights