Giter Club home page Giter Club logo

gh-stats-viewer's Introduction

Gh Stats Viewer

Check out cool metrics for any GitHub user, org or repository ๐Ÿ“Š

How to use it

Using the deployed instance

The easiest way to use Gh Stats Viewer is to use the deployed Railway instance that is linked in this GitHub repo.

You can start Gh Stats Viewer immediately without signing in with GitHub, but you may want to sign in if:

  • You would like to see metrics for your private repositories
  • You hit a rate limit.

Accessing private repositories

Signing in with GitHub will authorize the Gh Stats Viewer GitHub App, however, it will not automatically grant access to your private repositories.

To allow access to private repositories, you will also need to install the GitHub App here: https://github.com/apps/gh-profile-stats to your account. On installation, you can choose which repositories you wish to grant the app access to. You can always revoke access or uninstall the app through Settings > Integrations > Applications on your GitHub account.

Running it locally

  1. Generate a personal access token for your GitHub account. Follow this guide: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token
  2. Clone this repository
  3. Create a .env file in the root folder of the cloned repository, and copy the contents of the .env.sample file.
  4. Paste your personal access token into the GH_TOKEN variable in your .env

With docker

  1. Run docker-compose build in your root folder
  2. Run docker-compose up

With npm

  1. Run npm install in the root folder
  2. Run npm run dev
  3. In another terminal/tab, cd client && npm install
  4. Run npm run dev

Navigate to http://localhost:3000 and start searching!

Rate Limits

Because Gh Stats Viewer is powered by GitHub's APIs, it is also limited by the rate limits set by GitHub.

At the moment, the rate limits are as follows:

  • 5000 REST calls per hour
  • 5000 GraphQL calls per hour
  • 30 search (user or repo) calls per minute

This rate limit is shared for all unauthenticated users in the deployed instance, e.g.:

  • Bob and Alice are both accessing Gh Stats Viewer as unauthenticated users, and they each trigger 2500 REST calls. They have to wait an hour for the rate limit to reset to make any more REST calls.

For logged in users, the rate limit is set to their individual GitHub account, e.g.:

  • Bob and Alice are both logged in, and they each trigger 2500 REST calls. They both each still have 2500 REST calls left.

If you choose to run the app locally, the rate limit will also be set to your GitHub account.

Tech Stack ๐Ÿ”จ

  • Node.js and Express backend acting as a wrapper around GitHub's REST and GraphQL endpoints
  • React
  • Chart.js for pretty charts ๐Ÿ“ˆ๐Ÿ“Š๐Ÿ“‰
  • Bootstrap
  • GitHub's REST and GraphQL API endpoints
  • Octokit.js - GitHub's handy js library for interacting with the GitHub API
  • Passport.js for GitHub Oauth
  • Docker

gh-stats-viewer's People

Contributors

dependabot[bot] avatar mdamnjan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.