Github Create Repo

What it does?

  • Github Create Repo is a small website made using NestJS in the backend and basic HTML CSS in the frontend.
  • It allows anyone to authorize their github account and the code will create a sample repo with some files in their account.
  • On clicking on Create Repo button, it will take the user to their Github account where they can grant permissions to their account.
  • After authorisation is complete, it will create a repo named sample-code in the user’s account with some sample code.

Website Live Link

Website Link

Demo Video

Demo Video {YouTube Unlisted Video}

App Flow

untitled@2x (1)

Software Installations

  • Install Node.js from here.

Instructions

Github App setup

  • Click on New OAuth App button to create a Github App from here
  • Provide Application name of your choice
  • Add http://localhost:3000/ as Homepage URL and http://localhost:3000/github/callback as Authorization callback URL
  • Click on Register Application to complete the creation process.
  • Then copy the Client ID and generate a new client secret and save them somwhere for future use.

NestJS App Setup

  • Open Terminal and run the following code to clone the repository
git clone https://github.com/anubhutigupta2409/github-create-repo.git 
  • Change directory (cd) into the project directory and run the following command to install all the dependencies
 npm install
  • Inside the project directory create a .env file with the following contents
 GITHUB_CLIENT_ID= *paste your client id*  
 GITHUB_CLIENT_SECRET= *paste your client secret*  
 GITHUB_SCOPES= repo
  • You can also edit the templateRepo.json file to change the template repo from which the new repo is created

How to run the project

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser

References