Clone-All-Repos-Server is a backend service that allows users to download all public repositories from a specific GitHub user. The service clones repositories, stores them temporarily on the server, creates a ZIP file, and sends it to the frontend for download. The temporary folder and the ZIP file are automatically deleted after 2 minutes.
The server receives a GitHub username and performs the following steps:
- Fetch Public Repositories: It sends a request to the GitHub API to retrieve up to 100 public repositories for the provided username.
- Clone Repositories: The server clones the repositories into a temporary directory on the server using
simple-git
. - Create a ZIP File: After all repositories are cloned, the server compresses them into a single ZIP file using the
archiver
module. - Send ZIP for Download: The ZIP file is made available for download via a response to the frontend.
- Automated Cleanup: After 2 minutes, both the temporary folder and the ZIP file are deleted from the server to ensure efficient resource management.
Node.js | Express | Archiver (File Compression) | Axios | FS (File System Operations) | Simple-Git (Git Integration)
- Send a POST request to
/
with a JSON body containing the GitHub username. (string) - Receive a downloadable ZIP file containing all the public repositories.
{
"user": "username"
}
The foundation of the open source community are the contributions, them inspire us to learn and create. Any contributions are greatly appreciated.
This project is licensed under the MIT License. See the LICENSE.md file for details.