Check out cool metrics for any GitHub user, org or repository ๐
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.
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.
- 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
- Clone this repository
- Create a
.env
file in the root folder of the cloned repository, and copy the contents of the.env.sample
file. - Paste your personal access token into the
GH_TOKEN
variable in your.env
- Run
docker-compose build
in your root folder - Run
docker-compose up
- Run
npm install
in the root folder - Run
npm run dev
- In another terminal/tab,
cd client && npm install
- Run
npm run dev
Navigate to http://localhost:3000
and start searching!
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 trigger2500
REST
calls. They have to wait an hour for the rate limit to reset to make any moreREST
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 have2500
REST
calls left.
If you choose to run the app locally, the rate limit will also be set to your GitHub account.
Node.js
andExpress
backend acting as a wrapper around GitHub'sREST
andGraphQL
endpointsReact
Chart.js
for pretty charts ๐๐๐Bootstrap
- GitHub's
REST
andGraphQL
API endpoints Octokit.js
- GitHub's handy js library for interacting with the GitHub APIPassport.js
for GitHubOauth
Docker