Skip to content

A backend service that clones all public GitHub repositories from a specific user, stores them temporarily, creates a ZIP file, and sends it to the frontend. The temporary files are deleted after 2 minutes.

License

Notifications You must be signed in to change notification settings

gabrielpenteado/clone-all-repos-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clone-All-Repos-Server

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.

How it Works

The server receives a GitHub username and performs the following steps:

  1. Fetch Public Repositories: It sends a request to the GitHub API to retrieve up to 100 public repositories for the provided username.
  2. Clone Repositories: The server clones the repositories into a temporary directory on the server using simple-git.
  3. Create a ZIP File: After all repositories are cloned, the server compresses them into a single ZIP file using the archiver module.
  4. Send ZIP for Download: The ZIP file is made available for download via a response to the frontend.
  5. Automated Cleanup: After 2 minutes, both the temporary folder and the ZIP file are deleted from the server to ensure efficient resource management.

Technologies

Node.js | Express | Archiver (File Compression) | Axios | FS (File System Operations) | Simple-Git (Git Integration)

How to Use

  1. Send a POST request to / with a JSON body containing the GitHub username. (string)
  2. Receive a downloadable ZIP file containing all the public repositories.

Example Request

{
  "user": "username"
}

🤝 Contributions

PRs Welcome
The foundation of the open source community are the contributions, them inspire us to learn and create. Any contributions are greatly appreciated.

📄 License

This project is licensed under the MIT License. See the LICENSE.md file for details.

Gabriel Penteado

Full Stack Software Engineer

LinkedIn GitHub Gmail

About

A backend service that clones all public GitHub repositories from a specific user, stores them temporarily, creates a ZIP file, and sends it to the frontend. The temporary files are deleted after 2 minutes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published