Demo Application

Let's explore the use of the GitHub REST API with the help of a ReactJS application.

We’ll use React, a JavaScript framework, to implement an application that uses the GitHub REST API. We’ve implemented some of the endpoints in this course to perform operations on repositories, projects, and search features. 

Workflow

  1. When we run the application, the first page we see is the home page. The home page has a main component using the API endpoints—the navigation bar.

  2. The various options shown on the top-left side of the webpage are discussed below:

    1. “Repositories” shows a drop-down menu which contains the list with the following options:

      1. Create Repository

      2. Update Repository Name

      3. Delete Repository

      4. List Repositories

      5. Create Repository Project

      6. List Repository Projects

      7. List Branches

      8. List Commits

      9. List Collaborators

    2. "Projects" shows a drop-down menu which contains the list with the following options:

      1. Create a User Project

      2. List User Project

    3. There is a search bar on the top-right side of the webpage for the user to search for existing repositories.

  • Search

    • Search repositories /src/components/layout/MyNav.js (lines 12–41)

Demo application

The demo application can be run by clicking the “Run” button in the widget below. The application can be viewed by clicking the link given against "Your app can be found at:" at the bottom of the widget.

Note: The following widget only shows the necessary files required to run the application on our platform.

Get hands-on with 1200+ tech skills courses.