Skip to content

Vue / Node / Socket.io. Measure and publish in real time "hate words" from Twitter

Notifications You must be signed in to change notification settings

ojoven/odiometro

Repository files navigation

HATE-O-METER (aka odiometro)

An app to measure in real time the hate in Spanish - from Spain - Twitter.

If you want to check the README in Spanish, please check the README-ES.md file.

Available in https://odiometro.es

The goal of this project is to make us conscious of the debate level in Spain, and the amount of insults that are posted to Twitter.

We're using the following technologies:

  • Vue
  • NodeJS / Express
  • Socket.io
  • MySQL
  • SASS

Installation

  1. Clone the repository

git clone git@github.com:ojoven/odiometro.git

  1. From the root of the project (this will install express, socket and other libraries)

npm install

  1. From the /public folder (this will install Vue, Grunt and plugins)

cd public && npm install

  1. Create a database and import the dump from db/odiometro.sql

mysql -u [username] -p [dbname] < db/odiometro.sql

4.2 Configure your DB in /config/database_odiometro.json or if you're creating an hatemeter in your own country: database_odiometro.country.json

mysql -u [username] -p [dbname] < db/odiometro.sql

  1. Run grunt from /public

grunt

  1. Run the app

node app.js

6.2. Or if you've created your own version:

node app.js [botname]

IMPORTANT

You must create an app in Twitter and fill the consumer key and secret, access_token and secret in twitter_odiometro.json or twitter_odiometro.country.json.

Twitter's API has changed since I started with this project and they started adding more restrictions that may not affect older apps but newer ones. If you have any problem or you don't know how it works, please write an Issue.

Development additional notes

  • Vue's components can be found in public/js/src/app/components.
  • Other interesting files are:
    • bus.js -> Event bus to emit / receive events.
    • lib.js -> Vue instance that serves as a function library for functionalities shared between components.
    • socket.js -> Initializes socket.io in the frontend.
    • store.js -> Store class for states shared between components.
    • vue-instance.js -> Initializes the main Vue instance.
  • in vendor/smoothie.js we have the library that renders the real time graph.
  • if you have suggestions on how to optimize the code, make it more readable, refactors, etc. suggestions and pull requests are always welcome.

Contact

If you have any doubt, suggestion, criticism or hate word you can contact me in https://twitter.com/ojoven or post an Issue.

About

Vue / Node / Socket.io. Measure and publish in real time "hate words" from Twitter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •