You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A self-hosted deployment platform that demonstrates a Vercel-like workflow. Deploy your static sites with Git integration, real-time build logs, and automatic subdomain routing.
Overview
Mini-Vercel consists of four main services working together:
Service
Port
Description
api-server
9000
Control plane API - handles projects, deployments, and build orchestration
frontend
5173
React dashboard for managing projects and viewing deployment logs
reverse-proxy
8001
Routes subdomain requests to deployed static assets
build-project
Container
Clones repos, runs builds, uploads artifacts to storage
Architecture
+------------------+
| Frontend |
| (React UI) |
+--------+---------+
|
v
+---------------+ Deploy Request +------------------+
| User | ------------------> | API Server |
+---------------+ | (Express) |
+--------+---------+
|
+--------------------+--------------------+
| | |
v v v
+--------------+ +--------------+ +--------------+
| PostgreSQL | | Kafka | | AWS ECS |
| (Supabase) | | | | (Fargate) |
+--------------+ +------+-------+ +------+-------+
| |
| +-----v------+
| | Build |
| | Container |
| +-----+------+
| |
v v
+--------------+ +--------------+
| ClickHouse | |Cloudflare R2 |
| (Logs) | | (Storage) |
+--------------+ +------+-------+
|
+---------------+ subdomain.localhost:8001 +------------------v--------+
| End User | <---------------------------- | Reverse Proxy |
+---------------+ +---------------------------+
Features
Git-based Deployments - Deploy directly from GitHub repositories
Real-time Build Logs - Stream build output via Kafka to ClickHouse
Automatic Subdomains - Each project gets a unique subdomain
Deployment Status Tracking - Track builds through QUEUED -> IN_PROGRESS -> READY/FAIL
User Authentication - Supabase-powered auth with protected routes
Rate Limiting - Production-grade API protection
Input Validation - Express-validator for request validation
# Clone the repository
git clone https://github.com/yourusername/mini-vercel.git
cd mini-vercel
# Install dependencies for all servicescd api-server && npm install
cd ../frontend && npm install
cd ../reverse-proxy && npm install
cd ../build-project && npm install
# Generate Prisma clientcd api-server
npx prisma generate
# Push schema to database
npx prisma db push
# Repeat for reverse-proxycd ../reverse-proxy
npx prisma generate
Running Locally
# Terminal 1: Start infrastructure (Kafka, ClickHouse)cd api-server
docker-compose up
# Terminal 2: Start API servercd api-server
npm run dev
# Terminal 3: Start Reverse Proxycd reverse-proxy
npm run dev
# Terminal 4: Start Frontendcd frontend
npm run dev
# Run API Server
docker run -d \
--name mini-vercel-api \
-p 9000:9000 \
--env-file .env \
mini-vercel-api:latest
# Run Reverse Proxy
docker run -d \
--name mini-vercel-proxy \
-p 8001:8001 \
--env-file .env \
mini-vercel-proxy:latest
Pushing to Registry
# Tag and push to your registry
docker tag mini-vercel-api:latest your-registry/mini-vercel-api:latest
docker push your-registry/mini-vercel-api:latest
docker tag mini-vercel-proxy:latest your-registry/mini-vercel-proxy:latest
docker push your-registry/mini-vercel-proxy:latest
docker tag mini-vercel-build:latest your-registry/mini-vercel-build:latest
docker push your-registry/mini-vercel-build:latest
API Endpoints
Health
Method
Endpoint
Description
GET
/health
Health check
Projects
Method
Endpoint
Description
GET
/projects
List all projects
GET
/projects/:id
Get project details
POST
/projects
Create new project
DELETE
/projects/:id
Delete project
Deployments
Method
Endpoint
Description
GET
/projects/:projectId/deployments
List deployments
GET
/deployments/:id
Get deployment details
GET
/deployments/:id/logs
Get deployment logs
POST
/deploy
Trigger new deployment
Deployment Flow
User triggers deployment via frontend or API
API server creates deployment record with status QUEUED
AWS ECS task spawns build container with project config
Build container:
Clones Git repository
Runs npm install and npm run build
Streams logs to Kafka
Uploads dist/ to Cloudflare R2
API server consumes Kafka logs:
Updates status to IN_PROGRESS on build start
Updates status to READY on success
Updates status to FAIL on error
Stores logs in ClickHouse
Reverse proxy routes traffic to the deployed assets