A full-stack application that clones GitHub repositories and deploys them as static websites, similar to Vercel's functionality. Built with React, Node.js, TypeScript, and AWS services.
This project follows a microservices architecture with four main services:
- Technology: React + TypeScript + Vite + Tailwind CSS + AWS
- Purpose: User interface for uploading GitHub repository URLs
- Port: 5173 (Vite dev server)
- Technology: Node.js + Express + TypeScript
- Purpose: Handles repository cloning, file upload to S3, and deployment queue management
- Port: 3000
- Technology: Node.js + TypeScript
- Purpose: Background service that processes deployment queue, builds projects, and uploads built files
- Port: N/A (Background service)
- Technology: Node.js + Express + TypeScript
- Purpose: Serves deployed static websites by fetching files from S3
- Port: 3003
- GitHub Repository Cloning: Automatically clones repositories from GitHub URLs
- Static Site Deployment: Builds and deploys React/Vite projects
- Real-time Status Updates: Tracks deployment progress with status updates
- Custom Domains: Each deployment gets a unique subdomain
- AWS Integration: Uses S3 for file storage, SQS for queue management, and DynamoDB for status tracking
- React 19.1.1
- TypeScript 5.8.3
- Vite 7.1.2
- Tailwind CSS 4.1.11
- Axios for API calls
- ShadCN UI components
- AWS
- Node.js
- Express.js 5.1.0
- TypeScript 5.9.2
- AWS SDK v3
- S3: File storage for repository files and built assets
- SQS: Message queue for deployment processing
- DynamoDB: Deployment status tracking
- Simple Git: Repository cloning
vercel_clone/
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # UI components
β β β βββ form.tsx # Main deployment form
β β β βββ ui/ # Reusable UI components
β β βββ App.tsx # Main app component
β βββ package.json
βββ upload_service/ # Repository upload and queue service
β βββ src/
β β βββ index.ts # Main server file
β β βββ S3.ts # S3 upload functionality
β β βββ sqs.ts # SQS queue operations
β β βββ dynamoDB.ts # DynamoDB operations
β β βββ output/ # Cloned repositories
β βββ package.json
βββ deploy_service/ # Background deployment processor
β βββ src/
β β βββ index.ts # Main service file
β β βββ aws.ts # AWS operations
β β βββ utils.ts # Utility functions
β βββ package.json
βββ request-handler-service/ # Static file server
β βββ src/
β β βββ index.ts # Main server file
β β βββ aws.ts # S3 file retrieval
β βββ package.json
βββ .gitignore
- Node.js (v18 or higher)
- AWS Account with configured credentials
- AWS Services: S3, SQS, DynamoDB
Create .env files in each service directory with the following variables:
# AWS Configuration
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=us-east-2
AWS_BUCKET_NAME=your_s3_bucket_name
AWS_SQS_URL=your_sqs_queue_url
# DynamoDB
DYNAMODB_TABLE_NAME=your_dynamodb_table_name-
Clone the repository
git clone <repository-url> cd vercel_clone
-
Install dependencies for all services
# Frontend cd frontend npm install # Upload Service cd ../upload_service npm install # Deploy Service cd ../deploy_service npm install # Request Handler Service cd ../request-handler-service npm install
-
Start the services
Terminal 1 - Frontend:
cd frontend npm run devTerminal 2 - Upload Service:
cd upload_service npm run devTerminal 3 - Deploy Service:
cd deploy_service npm run devTerminal 4 - Request Handler Service:
cd request-handler-service npm run dev
- Repository Upload: User enters a GitHub repository URL in the frontend
- Cloning: Upload service clones the repository locally
- File Upload: All repository files are uploaded to S3
- Queue Processing: Deployment request is added to SQS queue
- Background Processing: Deploy service picks up queue messages
- Building: Project is built using
npm installandnpm run build - Deployment: Built files are uploaded to S3 with unique identifiers
- Serving: Request handler service serves the deployed files
- Status Updates: Deployment status is tracked in DynamoDB
- Open the frontend application (http://localhost:5173)
- Enter a GitHub repository URL (must be a React/Vite project)
- Click "Deploy"
- Wait for the deployment to complete
- Access your deployed site at
http://{deployment-id}.glider.com:3003/index.html
POST /upload- Upload and queue a repository for deploymentGET /status/:projectId- Get deployment statusGET /dequeue- Manually dequeue a message (for testing)
GET /{*any}- Serve deployed static files
This project follows a microservices architecture with four main services:
Frontend:
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
All Backend Services:
npm run dev- Start development servernpm run build- Build TypeScriptnpm start- Start production server
- The system is designed for React/Vite projects
- Each deployment gets a unique ID for isolation
- Built files are stored in S3 with the pattern
dist/{deployment-id}/ - The request handler service expects files to be served from the
distdirectory - Make sure your GitHub repository has a valid
package.jsonwith build scripts
This project is licensed under the ISC License.
Note: This is a simplified Vercel clone for educational purposes. For production use, consider additional features like authentication, custom domains, environment variables, and more robust error handling.
