Vercel is a cloud platform optimized for frontend frameworks and static sites. Opal Editor integrates with Vercel’s API to provide instant deployments to their global edge network.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rbbydotdev/opal/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before deploying to Vercel:- A Vercel account (sign up at vercel.com)
- A Vercel API token or OAuth authentication
- A completed build ready for deployment
Authentication Setup
Opal Editor supports two authentication methods for Vercel:API Token (Recommended)
Create an API token
- Go to Vercel Account Settings > Tokens
- Click “Create Token”
- Give it a descriptive name (e.g., “Opal Editor”)
- Select the appropriate scope (Full Account or specific projects)
- Copy the generated token
OAuth
Use OAuth for streamlined authentication:- Automatic token refresh
- No manual token management
- Secure credential storage
Destination Configuration
Configure your Vercel deployment destination:Configuration Fields
- project (required): Your Vercel project name
- Must be lowercase
- Can include letters, digits,
.,_, and- - Cannot contain the sequence
--- - Maximum 100 characters
Project names are automatically validated against Vercel’s naming requirements. Invalid names will show an error message.
Deployment Process
Create or select a project
Specify a Vercel project name:
- If the project doesn’t exist, it will be created automatically
- Existing projects can be selected from your account
Build your site
Complete a build in Opal Editor:
- Markdown is converted to HTML
- Templates are rendered
- Assets are prepared
- Files are optimized for deployment
Deploy to Vercel
Start the deployment:
- Files are uploaded to Vercel’s edge network
- Deployment progress is tracked in real-time
- Build status is monitored
How It Works
The Vercel deployment agent (RemoteAuthVercelAgent) manages:- Project Validation: Checks if the project exists or creates it
- File Upload: Converts files to Vercel’s deployment format
- Deployment Creation: Initiates a new deployment
- Status Polling: Monitors deployment progress until completion
- URL Generation: Returns both destination and deployment-specific URLs
File Preparation
Opal Editor converts your build output:- Text files use UTF-8 encoding
- Binary files use base64 encoding
- All file types are supported
Features
Instant Global Deployment
Vercel deploys to their global edge network:- Content served from the nearest edge location
- Sub-second initial page loads
- Automatic CDN caching
Deployment URLs
Each deployment receives unique URLs:- Production URL:
https://{project}.vercel.app - Deployment Preview:
https://{deployment-id}.vercel.app - Perfect for testing before going live
Automatic HTTPS
All deployments include:- Automatic SSL certificates
- HTTPS enforced by default
- No configuration needed
Zero Configuration
No build configuration required:- Deploy pure static files
- No framework detection needed
- Works with any static site
Team Projects
Deploy to team projects:- The API automatically detects team membership
- Team projects are accessible with appropriate permissions
- Team ID is resolved automatically
Ensure your API token has access to the team you want to deploy to.
Troubleshooting
Project Name Validation Errors
Solution: Update your project name to meet these requirements.Authentication Failures
If authentication fails:- Verify your API token is correct
- Check token hasn’t expired
- Ensure token has necessary scopes
- Try regenerating the token
Deployment Timeout
If deployment takes too long:- Check Vercel’s status page for outages
- Verify your internet connection
- Try deploying again
- Check deployment logs for specific errors
Invalid Token Scope
If you see scope errors:- Ensure your token has access to the project
- Check team permissions if deploying to a team
- Create a new token with appropriate scopes
Best Practices
- Use meaningful project names: Choose descriptive, lowercase names
- Test deployments: Use deployment preview URLs to test before production
- Monitor deployment status: Watch the logs for any issues
- Leverage preview URLs: Share deployment-specific URLs for review
- Configure custom domains: Add custom domains in the Vercel dashboard
Advanced Configuration
Custom Domains
Add custom domains in the Vercel dashboard:- Go to your project settings
- Navigate to Domains
- Add your custom domain
- Configure DNS as instructed
Environment Variables
While Opal Editor deploys static files, you can configure environment variables in Vercel for build-time usage:- Set in the Vercel dashboard
- Available during Vercel’s build process
- Not applicable to Opal Editor’s local builds
Edge Configuration
Optimize edge delivery:- Add
vercel.jsonto your build output - Configure headers, redirects, and rewrites
- Set caching policies
vercel.json:
Deployment Polling
Opal Editor polls Vercel’s API to track deployment status:- Checks every 2.5 seconds by default
- Continues until deployment completes
- Shows real-time status updates
- Handles both success and failure states