Deployment
Deploy A²D to production using Vercel or other hosting platforms.
Overview
A²D is optimized for serverless deployment with automatic scaling and global distribution.
Recommended platform: Vercel (native Next.js support)
Time required: ~15-20 minutes for first deployment
Deployment Options
A²D can be deployed to various platforms:
| Platform | Difficulty | Cost | Best For |
|---|---|---|---|
| Vercel | Easy | Free tier available | Recommended - native Next.js |
| Netlify | Easy | Free tier available | Alternative serverless |
| Railway | Medium | Paid | Simplified cloud deployment |
| AWS/GCP/Azure | Hard | Variable | Enterprise custom deployment |
| Docker | Medium | Variable | Self-hosted containers |
This guide focuses on Vercel, the recommended platform.
Prerequisites
Before deploying:
| Name | Type | Description |
|---|---|---|
Production Supabase | required | Separate Supabase project for production with all migrations run |
Git Repository | required | Code pushed to GitHub, GitLab, or Bitbucket |
Vercel Account | required | Free account at vercel.com |
Domain (Optional) | optional | Custom domain if not using Vercel’s .vercel.app subdomain |
Checklist:
- Production Supabase project created
- All database migrations run successfully
- Production API keys copied
- Code pushed to Git repository
- Vercel account created
Option 1: One-Click Deploy ⚡
The fastest way to deploy A²D to Vercel.
Step 1: Click Deploy Button
Click the deploy button below or visit the repository README:
Step 2: Connect GitHub
- Authorize Vercel to access your GitHub account
- Choose repository location:
- Create new repository, or
- Use existing repository
Step 3: Configure Project
| Name | Type | Description |
|---|---|---|
Project Name | string | Choose a name (e.g., |
Framework Preset | auto-detected | Next.js (automatically detected) |
Root Directory | string |
|
Step 4: Add Environment Variables
Enter your production Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=https://your-prod-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOi...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOi...
NEXT_PUBLIC_APP_URL=https://your-app.vercel.appUse production Supabase credentials, not development ones! Create a separate Supabase project for production.
Step 5: Deploy
- Click “Deploy”
- Wait 2-3 minutes for build to complete
- Your app is live! 🎉
Deployment URL: https://your-project.vercel.app
Option 2: Manual Deploy 🛠️
For more control over the deployment process.
Step 1: Push to GitHub
# Initialize git (if not already)
git init
# Add remote repository
git remote add origin https://github.com/your-username/ma2d.git
# Stage all changes
git add .
# Commit
git commit -m "Initial commit - A²D production ready"
# Push to GitHub
git push -u origin mainStep 2: Import to Vercel
- Go to vercel.com/dashboard
- Click “Add New…” → “Project”
- Select “Import Git Repository”
- Choose your A²D repository
- Click “Import”
Step 3: Configure Build Settings
Vercel auto-detects Next.js. Verify settings:
| Name | Type | Description |
|---|---|---|
Framework Preset | auto | Next.js (automatically detected) |
Build Command | command |
|
Output Directory | path |
|
Install Command | command |
|
Node.js Version | version | 18.x or 20.x (recommended) |
Step 4: Add Environment Variables
In project settings, add all required variables:
- Go to Settings → Environment Variables
- Add each variable:
| Variable Name | Value | Environments |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL | Production Supabase URL | Production, Preview, Development |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Production anon key | Production, Preview, Development |
SUPABASE_SERVICE_ROLE_KEY | Production service role key | Production, Preview, Development |
NEXT_PUBLIC_APP_URL | https://your-app.vercel.app | Production |
- Click “Save” for each variable
The NEXT_PUBLIC_APP_URL will be your Vercel deployment URL. You can update this later if you add a custom domain.
Step 5: Deploy
- Click “Deploy” button
- Watch build logs in real-time
- Wait for deployment to complete (~2-3 minutes)
- Visit your deployment URL
Post-Deployment Setup
Step 1: Update Supabase Auth URLs
Configure authentication redirects in your production Supabase project:
- Go to Authentication → URL Configuration
- Update these values:
https://your-app.vercel.apphttps://your-app.vercel.app/**
https://your-app.vercel.app/auth/callback- Click “Save”
If you add a custom domain later, update these URLs accordingly.
Step 2: Test Authentication
Verify the authentication flow works:
- Visit your deployed app
- Click “Sign Up”
- Create test account:
- Email:
test@yourdomain.com - Password: Strong password
- Organization: Test Organization
- Email:
- Verify redirect to dashboard
- Test login/logout
Expected: ✅ Smooth authentication flow
Step 3: Test MCP Endpoints
Verify MCP endpoints are accessible:
- Create a test MCP server in the dashboard
- Copy the endpoint URL
- Test with curl:
curl -X POST https://your-app.vercel.app/api/platform/[server-id]/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'Expected: JSON response with tools list
Step 4: Configure Custom Domain (Optional)
Add your own domain to the deployment:
- Go to project Settings → Domains
- Click “Add Domain”
- Enter your domain:
ma2d.yourdomain.com(subdomain), oryourdomain.com(apex domain)
- Follow DNS configuration instructions:
Type: CNAME
Name: ma2d
Value: cname.vercel-dns.comType: A
Name: @
Value: 76.76.21.21- Wait for DNS propagation (~5-60 minutes)
- SSL certificate provisioned automatically
Vercel provides free SSL certificates via Let’s Encrypt for all domains.
Continuous Deployment
Vercel automatically deploys on every git push.
Deployment Workflow
Automatic Deployments:
- Push to
mainbranch → Production deployment - Push to other branches → Preview deployment
- Pull requests → Preview deployment with unique URL
Example Workflow
# Make changes locally
git add .
git commit -m "feat: Add new MCP tool builder"
# Push to GitHub
git push origin main
# Vercel automatically:
# 1. Detects push
# 2. Runs build
# 3. Deploys to production
# 4. Sends deployment notificationDeployments typically complete in 2-3 minutes. You’ll receive email notifications for each deployment.
Production Checklist
Before announcing your production deployment:
Infrastructure:
- Production Supabase project configured
- All database migrations run
- Environment variables set correctly
- Custom domain configured (if using)
- SSL certificate active
Testing:
- Authentication tested end-to-end
- MCP endpoints tested
- Agent Cards tested (if using)
- Publishing to Exchange tested (if using)
- Mobile responsive design verified
Security:
- Service role key secure (not in git)
- RLS policies verified in Supabase
- Auth redirect URLs configured
- No sensitive data in logs
Monitoring (Optional):
- Error tracking configured (Sentry, etc.)
- Analytics enabled (Vercel Analytics, GA)
- Uptime monitoring (UptimeRobot, etc.)
Monitoring & Maintenance
Vercel Analytics
Enable built-in analytics:
- Go to project Analytics tab
- Click “Enable Web Analytics”
- View real-time metrics:
- Page views
- Unique visitors
- Core Web Vitals
- Top pages
View Deployment Logs
Access logs for debugging:
- Go to Deployments tab
- Click on any deployment
- View:
- Build Logs: Compilation output
- Function Logs: Runtime logs from API routes
- Static Logs: Static asset serving
Performance Monitoring
Check Core Web Vitals:
- Analytics → Web Vitals
- Monitor:
- LCP (Largest Contentful Paint)
- FID (First Input Delay)
- CLS (Cumulative Layout Shift)
- Optimize as needed
Vercel automatically optimizes images, fonts, and static assets for best performance.
Environment Management
Multiple Environments
Set up staging and production environments:
| Environment | Branch | Domain | Supabase |
|---|---|---|---|
| Production | main | ma2d.yourdomain.com | Production project |
| Staging | staging | staging-ma2d.vercel.app | Staging project |
| Preview | Feature branches | Auto-generated URLs | Development project |
Environment-Specific Variables
Configure different values per environment:
- Go to Settings → Environment Variables
- Click on a variable to edit
- Set different values for:
- Production: Live data
- Preview: Staging/dev data
- Development: Local dev data
Example:
# Production
NEXT_PUBLIC_APP_URL=https://ma2d.yourdomain.com
# Preview
NEXT_PUBLIC_APP_URL=https://staging-ma2d.vercel.app
# Development
NEXT_PUBLIC_APP_URL=http://localhost:3000Troubleshooting Deployment
Build fails with errors
Common causes:
- TypeScript errors
- Missing dependencies
- Environment variables not set
Solutions:
- Test build locally:
npm run build - Fix TypeScript errors
- Verify all dependencies in
package.json - Check environment variables are set in Vercel
npm run build
# Should complete without errorsnpm run type-check
# Or
npx tsc --noEmit500 errors after deployment
Common causes:
- Service role key incorrect or missing
- Supabase project paused
- Database migrations not run
Solutions:
- Verify
SUPABASE_SERVICE_ROLE_KEYin Vercel settings - Check Supabase project is active (not paused)
- Verify all migrations ran successfully
- Check function logs in Vercel for detailed errors
Authentication not working
Common causes:
- Auth redirect URLs not configured
- Wrong
NEXT_PUBLIC_APP_URL - Email provider not enabled
Solutions:
- Update Supabase auth URLs to include Vercel domain
- Verify
NEXT_PUBLIC_APP_URLmatches deployment URL - Enable email provider in Supabase Authentication → Providers
- Check Supabase auth logs
MCP endpoints returning errors
Common causes:
- Server not enabled
- Tools/resources disabled
- Database query errors
Solutions:
- Verify server exists and is enabled
- Check tools/resources/prompts are enabled
- Test database queries in Supabase SQL editor
- Check Vercel function logs for errors
Slow cold starts
Cause: Serverless functions have cold start latency
Solutions:
- Upgrade to Vercel Pro for faster cold starts
- Minimize bundle size:
npm run build -- --analyze - Use edge functions for critical paths (Vercel Pro)
- Keep functions warm with uptime monitoring
Scaling Considerations
Automatic Scaling
Vercel handles scaling automatically:
- Unlimited serverless function instances
- Global CDN for static assets
- Automatic load balancing
- No configuration needed
Database Scaling
As usage grows, consider:
Supabase Free Tier (~100 concurrent users):
- 500 MB database
- 2 GB bandwidth
- 50,000 monthly active users
Supabase Pro (~1,000 concurrent users):
- 8 GB database
- 50 GB bandwidth
- 100,000 monthly active users
- Database backups
- Read replicas
Supabase Enterprise (unlimited):
- Custom resources
- Dedicated support
- SLA guarantees
Performance Optimization
Frontend:
- Leverage Next.js image optimization
- Use static generation where possible
- Minimize JavaScript bundle size
- Enable caching headers
Backend:
- Add database indexes
- Use connection pooling (Supabase automatic)
- Optimize complex queries
- Cache frequently accessed data
Cost Optimization
Vercel Free Tier Limits
- 100 GB bandwidth per month
- 6,000 build minutes per month
- Unlimited team seats
- Automatic HTTPS
Typical usage: Free tier covers small to medium applications
When to Upgrade to Pro
Consider Pro ($20/month per user) when you need:
- More bandwidth (1 TB)
- Faster builds (concurrent builds)
- Edge functions
- Analytics
- Password protection
- Commercial use support
Supabase Costs
Free tier: Sufficient for development and small production
Pro tier ($25/month): Upgrade when you need:
- More database storage
- More bandwidth
- Daily backups
- Better performance
Next Steps
Your A²D instance is deployed! 🎉
Configure the application:
- Set up Design Rules - Configure compliance standards
- Add Anypoint Credentials - Enable Exchange publishing
- Invite team members - Add users (future feature)
Create content:
- Create MCP Servers - Build production servers
- Create Agent Cards - Design A2A interactions
- Publish to Exchange - Share your work
Need Help? See Deployment Troubleshooting or open an issue.