Vercel backend clone is designed to automatically build and deploy sites based on a given URL, such as a GitHub repository URL. The clone is built using various technologies, including
- AWS ECS, ECR, and S3,
- Redis,
- Docker,
- Socket.io,
- JavaScript,
- Express.js,
- Node.js.
- reverse-proxy.
.
├── README.md
├── api-server - Express Server that will expose endpoint to fetch codebase.
│ ├── Dockerfile - Docker file
│ ├── index.js - Script file
│ ├── package-lock.json
│ └── package.json
├── build-server
│ ├── Dockerfile - Dockerfile
│ ├── main.sh - .sh file
│ ├── package-lock.json
│ ├── package.json
│ └── script.js - This Will build logs and publish it on redis server
├── s3-reverse-proxy
├── Dockerfile - Dockerfile
├── index.js - this will help us to view the webpage.
├── package-lock.json
└── package.json
3 directories, 15 files
To get started with the Vercel backend clone, follow these steps:
- Clone this repository to your local machine.
- Set up your ECR, ECS, and S3 configurations and update the script file accordingly.
- Start Docker on your machine.
- In the
build-server
directory, create a.env
file and save the required environment variables. - Start both servers.
- Open Postman and send a
POST
request tohttp://localhost:5000/project
with the following URL:
- Request Body:
GitURL
: Specify the URL of the GitHub page you want to publish.
- Go to the socket.io method and subscribe to
logs:<<YOUR_PROJECT_ID>>
, then click connect.
The following image provides a high-level overview of the design: