This is a simple service api to compare quality of differente open source libraries available in GitHub.
This tool collects data from GitHub, the first time the user chooses a repository he wants to store, after that the service API starts an automatic data collection on GitHub with a scheduled task that fetches new data every 10 minutes, collecting only new issues and updated issues.
The main technologies used to build this API were:
Before downloading and running the project, it is necessary to have Node.js already installed and then install the following tools:
Open your operating system terminal and run the following commands:
# Clone the repository
git clone https://github.com/marcioper/libquality.git
# Enter in directory
cd libquality
# Install it globally via npm like so:
npm i -g @adonisjs/cli
# Install the dependencies
npm installAt the root of the project you can get the file .env.example. From there, create another file called .env using the same structure.
Run command below to create mysql database
docker-compose up -dFor more information, check the config/database.js file.
Run command below to create tables in mysql database
adonis migration:runRun command below to execute server
adonis serve --devRun command below to start schedule task to collect data automatic from GitHub
adonis run:schedulerRun command below to test service api
adonis testTo test the routes, you can use the Insomnia. The whole workspace this API is available for use, just download the file Insomnia_LibQuality.json in project root.
If desired, use another way to perform as requests, as available routes are:
GET /api/v1/projects/sync: Collect Data From GitHub.GET /api/v1/projects/average: Average Statistics Libs Issues.GET /api/v1/projects/statistics: Daily Statistics Lib Issues.
Or, case desired, you can use Swagger opening http://localhost:3333/docs in your browser, ayeey 🎉 But before, execute the follow command below in root project
# Export config file & swagger-ui assets
adonis swagger:exportDeveloped with 💜 by Marcio Pinto 🧑🏽🚀

