Skip to main content

Overview

Tesslate Studio’s internal dev environments (Docker or Kubernetes containers) are for development. For production hosting, you can deploy directly to external platforms using the built-in deployment system. The platform uses a factory pattern with provider-specific implementations, supporting OAuth authentication, automatic framework detection, and two deployment modes.

Vercel

Ideal for Next.js, React, and Vue. Automatic builds, edge caching, and serverless functions.

Netlify

Great for static sites. SHA-256 file deduplication, deploy previews, and serverless functions.

Cloudflare Workers

Edge computing on 300+ global locations. Ultra-low latency with KV storage and Durable Objects.

Architecture

The deployment system uses an abstract base class with provider-specific implementations:
BaseDeploymentProvider (Abstract)
  deploy(), get_deployment_status(), delete_deployment(), test_credentials()

VercelProvider      - Vercel REST API v13
NetlifyProvider     - Netlify API v1
CloudflareProvider  - Cloudflare Workers API

DeploymentManager   - Factory and orchestration
DeploymentBuilder   - Build process coordination
FrameworkDetector   - Automatic framework detection
All provider credentials are stored encrypted in the DeploymentCredential model using Fernet symmetric encryption.

Connecting Providers

Vercel Setup

1

Open Deployment Settings

Navigate to Settings > Deployment Providers
2

Connect via OAuth

Click Connect Vercel. You will be redirected to Vercel to authorize Tesslate Studio.The OAuth flow:
  1. Tesslate redirects to https://api.vercel.com/v2/oauth/access_token
  2. You authorize the application
  3. Vercel redirects back with an authorization code
  4. Tesslate exchanges the code for an access token
  5. The token is encrypted and stored in DeploymentCredential
3

Select Team (Optional)

If you belong to a Vercel team, select which team to deploy to. The team_id is stored in the credential’s provider_metadata.
4

Verify Connection

Tesslate calls test_credentials() to verify the token is valid. You will see “Vercel Connected” in your settings.

Netlify Setup

1

Open Deployment Settings

Navigate to Settings > Deployment Providers
2

Connect via OAuth

Click Connect Netlify and authorize Tesslate Studio. The OAuth flow works the same as Vercel, with tokens stored encrypted.
3

Verify Connection

Once connected, you will see “Netlify Connected” in your settings.

Cloudflare Workers Setup

1

Create a Cloudflare API Token

Go to dash.cloudflare.com/profile/api-tokens and create a token with:
  • Zone: Read permission
  • Cloudflare Pages: Edit permission (or Workers Scripts: Edit)
2

Get Your Account ID

Find your Account ID in the Cloudflare dashboard sidebar under Workers & Pages > Overview.
3

Add Credentials to Tesslate

Navigate to Settings > Deployment Providers > Cloudflare Workers.Enter:
  • API Token: Your Cloudflare API token
  • Account ID: Your Cloudflare account ID
  • Dispatch Namespace (optional): For Workers for Platforms
These are stored encrypted with the provider_metadata:
{
  "account_id": "your_account_id",
  "dispatch_namespace": "production"
}
4

Verify Connection

Tesslate validates the credentials with a test API call. You will see “Cloudflare Connected” in your settings.

Deployment Modes

Tesslate supports two deployment modes for each provider:
The provider builds your project
  1. Tesslate uploads your source code to the provider
  2. The provider installs dependencies and runs the build command
  3. The provider deploys the built output
Best for: Frameworks with provider-specific build optimizations (Next.js on Vercel, for example)Default for: Vercel and Netlify

Deploying a Project

Quick Deploy

1

Open Your Project

Navigate to the project you want to deploy
2

Click Deploy

Click the Deploy button in the top toolbar
3

Select Provider

Choose Vercel, Netlify, or Cloudflare Workers
4

Configure Deployment

Review and adjust:
  • Project Name: Name for the deployed site
  • Framework: Auto-detected, or choose manually
  • Build Command: Default is npm run build (override if needed)
  • Output Directory: Depends on framework (see table below)
  • Environment Variables: Add production-specific variables
  • Deployment Mode: Source or pre-built
5

Deploy

Click Deploy Now. The system:
  1. Fetches your OAuth credentials for the provider
  2. Detects the framework (if not specified)
  3. Builds the project (if pre-built mode)
  4. Creates the deployment via the provider API
  5. Streams build logs to the database
  6. Updates deployment status as it progresses
6

Access Your Site

Once the status reaches “ready,” your live URL is available (e.g., your-project-abc123.vercel.app).

Framework Detection

Tesslate automatically detects your project’s framework by analyzing package.json dependencies and framework-specific config files:
FrameworkBuild CommandOutput DirectoryDetection
Vite (React)npm run builddistvite.config.ts or vite in dependencies
Next.jsnpm run build.nextnext.config.js or next in dependencies
React (CRA)npm run buildbuildreact-scripts in dependencies
Vuenpm run builddistvue in dependencies
Angularnpm run builddist@angular/core in dependencies
Sveltenpm run buildbuildsvelte in dependencies
Static(none)publicNo framework files detected

Deployment Status Flow

Deployments progress through these states:
queued  >  building  >  deploying  >  ready
                                       |
queued  >  error   (if build fails)
You can poll the status at any time:
GET /api/deployments/{deployment_id}/status
The frontend polls this endpoint automatically and shows a progress indicator.

Provider-Specific Features

Features:
  • Automatic framework detection and build optimization
  • Edge caching and CDN
  • Serverless functions
  • Preview deployments per commit
  • Custom domains with automatic SSL
API: Vercel REST API v13 Auth: OAuth token (stored encrypted) File size limit: 100MB per deployment

Environment Variables

Set production environment variables for your deployed app:
1

Open Project Settings

Go to the project’s deployment configuration
2

Add Variables

Add environment variables (e.g., VITE_API_URL=https://api.example.com)
3

Deploy or Redeploy

Variables are injected during the build process
Never expose sensitive keys like API secrets in client-side environment variables. Use the VITE_ prefix only for values that are safe to be visible in the browser.

Custom Domains

After deployment, configure custom domains through the provider:
  1. Go to your Vercel dashboard
  2. Select the project
  3. Navigate to Settings > Domains
  4. Add your custom domain
  5. Configure DNS: Add a CNAME record pointing to cname.vercel-dns.com

Managing Deployments

Viewing Deployments

GET /api/deployments/
Filter by project, provider, or status. See deployment history with URLs and timestamps.

Redeploying

POST /api/deployments/{deployment_id}/redeploy
Triggers a new deployment using the same configuration. Useful after code changes or to retry a failed deployment.

Deleting a Deployment

DELETE /api/deployments/{deployment_id}
Removes the deployment from the provider. The database record is kept with status set to “deleted” for audit history.

Viewing Build Logs

GET /api/deployments/{deployment_id}/logs
Returns timestamped build and deployment logs for debugging failed builds.

Deployment Limits by Tier

TierMax Active DeploymentsAdditional Slots
Free1N/A
Basic3$10 each
Pro5$10 each
Ultra20$10 each
You can purchase additional deployment slots from Settings > Billing for $10 per slot.

Security

The deployment system includes several security measures:
FeatureDescription
Credential EncryptionOAuth tokens encrypted at rest with Fernet symmetric encryption
Token RefreshAutomatic token refresh when expired (OAuth providers)
Project OwnershipOnly the project owner can deploy
Environment Variable EncryptionSensitive env vars encrypted in transit and at rest
Build IsolationEach build runs in an isolated container environment
Session OwnershipVerify-checkout confirms the authenticated user matches the deployment

Troubleshooting

Common causes:
  • Missing dependencies in package.json
  • TypeScript errors
  • Missing environment variables
Solutions:
  1. Test the build locally by running npm run build in your project container
  2. Check the deployment logs at GET /api/deployments/{id}/logs
  3. Verify all required environment variables are set
  4. Fix errors and redeploy
Cause: Build taking longer than 10 minutesSolutions:
  • Use pre-built mode to build locally and upload only the output
  • Optimize the build process (tree shaking, code splitting)
  • Check for infinite loops in build scripts
  • Reduce bundle size by removing unused dependencies
Cause: OAuth token expired or was revokedSolutions:
  1. Go to Settings > Deployment Providers
  2. Disconnect the provider
  3. Reconnect and re-authorize
  4. For Cloudflare, verify the API token has not expired and has correct permissions
Cause: Build succeeded but the site shows errorsSolutions:
  1. Check the browser console for JavaScript errors
  2. Verify all environment variables are set for production
  3. Check the deployment logs in the provider’s dashboard
  4. Ensure API endpoints are accessible from the deployed domain
Cause: File collection or upload failureSolutions:
  • Check file size limits (Vercel: 100MB, Netlify: 200MB per deploy)
  • Verify the build output directory exists and contains files
  • Check network connectivity to the provider API
  • Try the pre-built mode if source mode fails

Best Practices

Always test your build locally with npm run build in the project container before deploying. This catches most build errors before they reach the provider.
Use the provider’s dashboard to set sensitive environment variables rather than including them in your code. Never use the VITE_ prefix for secret values.
Pre-built deployments are faster because the build happens in your Tesslate container (which already has dependencies installed) rather than on the provider’s build infrastructure.
After making changes in the editor, click Redeploy to push the latest version to production. The previous deployment remains accessible until the new one is ready.

Next Steps

GitHub Integration

Connect GitHub for automated CI/CD deployment workflows

Billing

Manage deployment limits and purchase additional slots

API Keys

Set up deployment provider credentials

Projects

Configure project build settings