What is Vercel For Frontend?
Vercel For Frontend is a self-hosted deployment platform that automates the entire lifecycle of frontend application deployments. Built with Bun for blazing-fast performance, it provides a Vercel-like experience for deploying frontend applications from GitHub repositories with zero configuration. Simply provide a GitHub repository URL, and the platform handles everything: cloning, building, and hosting your application on AWS S3 with automatic CDN distribution.Key Benefits
Zero Configuration
Deploy React, Vue, or any frontend framework without configuration files or build scripts.
Automated Builds
Dockerized build environment ensures consistent builds across all projects.
S3 Hosting
Static files are automatically uploaded to S3 for reliable, scalable hosting.
Fast Runtime
Built on Bun for superior performance in file operations and HTTP handling.
Architecture Overview
The platform consists of two primary microservices working in concert:Upload Service
The upload service is the entry point for all deployments. It accepts GitHub repository URLs via REST API and orchestrates the initial deployment phase. Key responsibilities:- Accept GitHub repository URLs via
/get/urlendpoint - Clone repositories using
simple-git - Scan project files while respecting
.gitignorepatterns - Upload source files to S3 under
output/{id}prefix - Queue build jobs in Redis for processing
Deploy Service
The deploy service is a background worker that processes build jobs from the Redis queue. It downloads source files from S3, builds them in isolated Docker containers, and uploads the production-ready files back to S3. Key responsibilities:- Poll Redis queue for pending build jobs using
blPop - Download project source from S3
output/{id}prefix - Build projects in isolated Docker containers
- Support both
/buildand/distoutput directories - Upload production builds to S3 under
dist/{id}prefix
Docker Build Process
Each project is built in a fresh Docker container using Node.js 20 Alpine. The build process dynamically creates a Dockerfile, executes the build, extracts the output, and cleans up all resources:The build process automatically detects whether your framework outputs to
/build or /dist directories, supporting React, Vue, Vite, and other popular frameworks.Data Flow
Repository Submission
Client sends GitHub repository URL to Upload Service via POST request to
/get/url.Clone & Upload
Upload Service clones the repository, scans files respecting
.gitignore, and uploads to S3 output/{randomId} bucket.Queue Job
Upload Service pushes deployment job to Redis
build-queue and returns the unique deployment ID to the client.Build Processing
Deploy Service polls Redis queue, downloads source from S3, and builds in a Docker container.
Technology Stack
Runtime & Framework:- Bun - JavaScript runtime for both services
- Express - HTTP server framework
- TypeScript - Type-safe development
- AWS S3 - Object storage for source files and production builds
- Redis - Message queue for build job coordination
- Docker - Isolated build environments
simple-git- Git operations (upload-service/src/server.ts:3)aws-sdk- S3 operations (upload-service/src/utils/uploadFiles.ts:1)redis- Queue management (upload-service/src/utils/buildQueue.ts:1)ignore- Gitignore pattern matching (upload-service/src/utils/getAllFiles.ts:2)
Deployment Identifiers
Each deployment receives a unique 10-character alphanumeric identifier generated using a cryptographically random selection:- S3 source path:
output/{id}/ - S3 production path:
dist/{id}/ - Docker container names:
frontend-build-{id}
S3 Storage Structure
Next Steps
Quick Start
Get your platform running in 10 minutes
API Reference
Explore the REST API endpoints