This repo is one project of maybe
. It has two parts: search on GitHub, clone from GitHub. The search part is implemented by Meteor, the clone part is an ordinary Node.js
application.
The Meteor app is located in ./app
. It has two main parts:
- Web UI, easy to start a new search and show previous search result
- Backend query to GitHub search API
To use the Meteor app, you have to install Meteor and read the guide of Meteor first.
cd app
meteor --setting settings.json
Because ordinary GitHub account/token/application is not able to search on the whole GitHub, you have to have a privileged account/token/application.
We do have a privileged application: https://github.com/organizations/blue-systems-group/settings/applications/327067, please make sure you are a member of the blue Systems Research Group and login if you see a 404
page.
You have to learn how to setup OAuth Authorizations if you want to use your own account. Otherwise, please ask xcv58 for an existing token.
You need to put your token in ./app/settings.json
:
{
"GITHUB_TOKEN": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
The Meteor app follows the Mantra Specification. Please read the Mantra Specification and sample app.
The Meteor app only search the GitHub and store the search result. So we have to clone the repos of result somewhere. Do it inside Meteor app is not a good idea. Because git clone
contains heavy I/O operations. So we use Meteor app to provide a queue and clone repos from other clients. That's why we have clone worker.
The clone worker locates at ./git_workers
. It is a client of vsivsi:job-collection.
As an ordinary Node.js
application, you can use npm install
to install dependencies and npm start
to run the app.
There're a few methods located in ./app/server/lib/jobs.js
to manipulate the job collection. In the future, we should integrate related function with Web UI.
The clone worker will automatic subscribe the job collection and process the clone operation.