Giter VIP home page Giter VIP logo

openrepositoryscore's Introduction

CommunityScoreApp!

About

Welcome! CommunityScoreApp (title WIP) is a react app that analyzes the sentiment within a GitHub project interaction.

Open Source can get quite overwhelming if one is just starting out, especially choosing where to begin since the list of projects and technology are endless. An uncomfortable first experience could discourage one from contributing again. It would make it easier to choose once you know you are welcome at the community.

Our app helps developers and open source maintainers understand the quality of interactions on their project and community by a “community score”. This score is assigned based on the sentiment analysis of various documents like the Code of Conduct, GitHub Templates, Readme as well as Pull Request and Issue conversations. We hope this encourages everyone in open source to maintain a high standard of community health and help maintainers ensure their project is welcoming as it starts to grow.

Contributing & Feedback

You are very welcome to open an issue or pull request on this repository! This project is a Work in Progress, and we don't have everything right, if you feel we need improvement in any way, please reach out!

Details

CommunityScoreApp scrapes data from GitHub’s community APIs (experimental) as well as Pull request and Issue comments RESTful apis to fetch text data of the code of conduct, readme, pull request and issue comments. This text is then sent to a pre-trained Tensorflow.js Sentiment Analyzer and Toxicity Model built on an LSTM and Universal Sentence Encoder, to obtain sentiment scores on a scale of 1 to 10. The models are fetched from Google Cloud Storage and cached in IndexedDb for better load performance. The sentiment scoring happens entirely in the browser and does not use a backend. These scores are then computed in a weighted average, with a higher weight given to GitHub health percentage. All this data, including “sentiment labels” such as “beginner friendly”, is stored in a Hasura.io backend service. Hasura provides the GraphQL service on top of PostgreSQL that stores the repository analysis data.

We then use Shields.io to generate repository badges that maintainers can add to their repository.

The main app uses Next.js by Zeit and is deployed on Zeit Now using Serverless SSR. The Hasura backend service is hosted on Heroku.

Tutorial

  • Deploy Postgres and GraphQL Engine on Heroku:

    Deploy to heroku

    Please checkout our docs for other deployment methods

  • Get the Heroku app URL (say my-app.herokuapp.com)

  • Run the app:

    npm run dev
  • Test the app Visit http://localhost:3000 to view the app

Serverless Mode

With Next.js 8, each page in the pages directory becomes a serverless lambda. To enable serverless mode, we add the serverless build target in next.config.js.

module.exports = {
  target: "serverless",
};

That's it! Now build the serverless app by running the following command:

npm run build

In the .next folder, you will see a serverless folder generated after the build. Inside that there is a pages folder, which will have outputs of lambda per page.

pages/index.js => .next/serverless/pages/index.js
pages/about.js => .next/serverless/pages/about.js

Deploy to now.sh

Deploy it to the cloud with now (download):

npm install -g now
now

Note: Older versions of now-cli doesn't support serverless mode. Once the deployment is successful, you will be able to navigate to pages / and /about, with each one internally being a lambda function which now manages.

openrepositoryscore's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.