![](https://raw.githubusercontent.com/alexQi/gitrec/master/assets/logo.png)
![Twitter Follow](https://camo.githubusercontent.com/196c021595c47e1ca736aad43afeb333cb4be0c67e9b67828f678653614ce836/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f676f7273655f696f3f6c6162656c3d466f6c6c6f77267374796c653d736f6369616c)
GitRec is the missing recommender system for GitHub repositories based on Gorse.
![](https://raw.githubusercontent.com/alexQi/gitrec/master/assets/gitrec.png)
![](https://raw.githubusercontent.com/alexQi/gitrec/master/assets/architecture.png)
- The trending crawler crawls trending repositories and insert them into Gorse as new items.
- The user starred crawler crawls user starred repositories and insert them into Gorse as new feedback.
- GitRec web service pulls recommendations from Gorse and show to users. It also submits a crawling request to the user
starred crawler when a new user signed in.
- First, clone the repository and enter the folder.
git clone https://github.com/zhenghaoz/gitrec.git
cd gitrec
GORSE_DASHBOARD_USER_NAME=xxxxxxxx
GORSE_DASHBOARD_PASSWORD=xxxxxxxx
GITHUB_ACCESS_TOKEN=xxxxxxxx
GITHUB_OAUTH_CLIENT_ID=xxxxxxxx
GITHUB_OAUTH_CLIENT_SECRET=xxxxxxxx
SECRET_KEY=xxxxxxxx
GITHUB_ACCESS_TOKEN=xxxxxxxx # personal access token
- Create a GitHub OAuth app. The authorization callback URL should
be
http://127.0.0.1:5000/login/github/authorized
. Then, fill following variables
in the .env
file.
GITHUB_OAUTH_CLIENT_ID=xxxxxxxx # client ID
GITHUB_OAUTH_CLIENT_SECRET=xxxxxxxx # client secret
SECRET_KEY=xxxxxxxx # random string
- Start the cluster using Docker Compose.
- Download the SQL file github.sql and import to the MySQL instance.
mysql -h 127.0.0.1 -u gorse -pgorse_pass gorse < github.sql
- Restart the master node to apply imported data.