Vercel Deployment
Deploy the SHIELD frontend to Vercel’s edge network.Prerequisites
- Vercel account
- Project connected to GitHub
- Environment variables ready
Deployment Steps
1. Connect Repository
- Go to Vercel Dashboard
- Click “Add New Project”
- Import your SHIELD repository
- Select the
frontenddirectory as root
2. Configure Project
Build Settings:| Setting | Value |
|---|---|
| Framework | Next.js |
| Root Directory | frontend |
| Build Command | npm run build |
| Output Directory | .next |
| Install Command | npm install |
3. Environment Variables
Add in Project Settings → Environment Variables:4. Deploy
Click “Deploy”. Vercel will:- Install dependencies
- Run build
- Deploy to edge
5. Custom Domain
- Go to Project Settings → Domains
- Add
app.shieldhq.xyz - Configure DNS:
- Type: CNAME
- Name: app
- Value: cname.vercel-dns.com
6. Preview Deployments
Every PR gets a preview deployment at:Production Checklist
- Environment variables set
- Database accessible from Vercel IPs
- Contract addresses correct
- Custom domain configured
- Analytics enabled
- Rate limiting configured
- Security headers set
Vercel.json Configuration
Createfrontend/vercel.json:
Monitoring
Enable in Vercel Dashboard:- Analytics
- Speed Insights
- Logs
- Alerts
Troubleshooting
| Issue | Solution |
|---|---|
| Build fails | Check Node version (18+) |
| DB connection fails | Whitelist Vercel IPs |
| 404 on routes | Check next.config.mjs |
| Slow cold starts | Optimize API routes |

