You can contribute to this open-source project by suggestions to the issues of the server and client app. The project needs to improve it's performance, stability, and user interface of both server scripts and client app. Adding more countries to the project helps other to discover it's contribution to the GitHub.
Getting started the contribution you need to Fork
the project by your own to make sure you can Merge
it with a Pull request
later to complete the contribution.
You can clone
your fork
by using git clone repository
from the command prompt tool or
using an IDE like Web Storm, Visual Code and etc. After you clone
the repository you can see the files
in the directory.
Create new country array object server.js#L62.
The array structure is {city: ["Country_Name", "CountryName", "City", "City"]}
You can add five most populated cities. These cities should be supported by GitHub (Sometimes the native languages may not work).
After you have done the changes you can create a Create request and name it Add Country Name
for an example Add Austria
. After the review, if there are no errors your contribution will be displayed in GitHubStats with a link to your GitHub profile.
The root directory of the repository contains several folders and files. The server is a Node.js app.
To start the server node server.js
.
githubstats/ ├── client/ │ ├── public/ │ └── ... ├── GraphQuery.js ├── server.js └── util.js
GraphQuery is a class which is used to fetch data from the GitHub GraphQL API. It fetches 1000 users with most followers based on the locations.
This script is running the server. It calls the API, and requests user data from GitHub based on the locations of the Javascript arrays.
This contains some basic functions such as check_file(path)
, parse(String)
, and locations(array)
.
The root directory of the client repository contains several folders and files.
The client app is written using React.js. To start the client app, go to client directory cd client
and npm run start
.
githubstats/ ├── client/ │ ├── public/ │ │ ├── favicon.ico │ │ ├── github-log64.ico │ │ ├── index.html │ │ └── ... │ ├── src/ │ │ ├── components/ │ │ │ ├── About.js │ │ │ ├── Country.js │ │ │ └── Home.js │ │ ├── App.js │ │ ├── setupProxy.js │ │ └── ... │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ └── package.json └── ...
The folder contains the .ico
files, and index.html file.
The folder contains the components
folder which contains Country.js
file.
This React Component fetches the list of users and render the list as a range.
It has several methods like compare(a, b)
, check_username(value)
, limit(value)
, and renderMyData(param)
.
This React Component fetches the list of countries and render it in a table.
The main React App component which is used to display the content of the React Component and the UI.
The app connects to the server through the API.