Skip to content
fact-Bounty - Fact Bounty is a crowd sourced fact checking platform.
Branch: master
Clone or download
root5533 and ivantha Handle multiple vote requests
Refactor and clean code
Latest commit 39f1f3b Apr 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.dependabot
.github Add general contributing guidelines. Feb 24, 2019
.vscode
Crawlers Reformat crawlers Mar 2, 2019
db fixed elasticsearch endpoints Mar 19, 2019
fact-bounty-client Handle multiple vote requests Apr 16, 2019
fact-bounty-flask Handle multiple vote requests Apr 16, 2019
.dockerignore Dockerize project Feb 27, 2019
.gitignore pycache should not be present in git repository Feb 18, 2019
.travis.yml
LICENSE
README.md
docker-compose.yml docker-compose integrated in travis build Apr 1, 2019
package-lock.json Reinstated key.example.js closes #133 Mar 13, 2019

README.md

Fact Bounty

Codacy Badge FOSSA Status

The recent decade has witnessed the birth of social media ecosystems that brings social organizations, media content and various stakeholders together, and now it appears significant advantages of comprehensiveness, diversity and wisdom that provide users with higher quality of experiences. Meanwhile, social media ecosystems suffer from security, privacy and trustworthiness threats. How to leverage the power of intelligent crowds to improve the ecosystem’s efficacy and efficiency, as well as ensure its security and privacy become burning and challenging issues.

Fact Bounty is a crowd sourced fact checking platform.

User Guide

How to Setup

Clone the repository.

git clone https://github.com/scorelab/fact-Bounty.git

Change directry to the folder.

cd fact-Bounty/

Set up react server

Run npm install in fact-bounty-client folder.

 cd fact-bounty-client/
 npm install

Set up flask server

Technologies required

  • Python3 - A programming language that lets you work more quickly (The universe loves speed!).
  • Flask - A microframework for Python based on Werkzeug, Jinja 2 and good intentions
  • Virtualenv - A tool to create isolated virtual environments
  • SQLite - An in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine
  • Elasticsearch - A search engine based on the Lucene library
  • Minor dependencies can be found in the requirements.txt file.

Installation / Usage

  • First ensure you have python3 globally installed in your computer. If not, you can get python3 here.

  • After this, ensure you have installed virtualenv globally as well. If not, run this:

    $ pip install virtualenv
    
  • Dependencies

    1. Create and fire up your virtual environment in python3:
        $ virtualenv -p python3 venv
        $ source venv/bin/activate
    
     For *Windows* you can use - 
    
        $ venv/Scipts/activate.bat
    
  • Environment Variables

    Create a .env file and add the following:

       export FLASK_APP="app.py"
       export FLASK_ENV="development"
       export SECRET_KEY="some-very-long-string-of-random-characters-CHANGE-TO-YOUR-LIKING"
       export FLASK_CONFIG="development"
    

    Save the file.

  • Install your requirements

        (venv)$ pip install -r requirements.txt
    
  • Running It

    On your terminal, run the server using this one simple command:

        (venv)$ flask run
    
  • Add sample data

    Browse to db folder and run:

        (venv)$ python add_es.py
    

How to install Elasticsearch and start elasticsearch server

  • Elasticsearch v6.7.0 can be installed as follows:

        (venv)$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.0.deb
        (venv)$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.0.deb.sha512
        (venv)$ shasum -a 512 -c elasticsearch-6.7.0.deb.sha512 
        (venv)$ sudo dpkg -i elasticsearch-6.7.0.deb
    
    
  • Check whether your system uses init or systemd by running command:

        (venv)$ ps -p 1
    
  • Running Elasticsearch with SysV init

    Use the update-rc.d command to configure Elasticsearch to start automatically when the system boots up:

        (venv)$ sudo update-rc.d elasticsearch defaults 95 10
    

    Elasticsearch can be started and stopped using the service command:

        (venv)$ sudo -i service elasticsearch start
        (venv)$ sudo -i service elasticsearch stop
    
  • Running Elasticsearch with SysV systemd

    To configure Elasticsearch to start automatically when the system boots up, run the following commands:

        (venv)$ sudo /bin/systemctl daemon-reload
        (venv)$ sudo /bin/systemctl enable elasticsearch.service
    

    Elasticsearch can be started and stopped using the service command:

        (venv)$ sudo systemctl start elasticsearch.service
        (venv)$ sudo systemctl stop elasticsearch.service
    
  • Check Elasticsearch server is running by:

    CURL request:

        (venv)$ curl -X GET "localhost:9200/"
    

    or open https://localhost:9200

How to Use

Use two terminals, one for fact-bounty-flask and the other for fact-bounty-client.

Run the flask server in the fact-bounty-flask folder:

(venv)$ flask run

start the npm server in fact-bounty-client directory.

npm start

And use localhost:3000 to browse.

NOTE: This version is only supporting for Chrome browser. And make sure to instal the extension -> Redux Dev Tools in chrome extension library.

Running with Docker

  1. Set DEV_DATABASE_URL as environment variable in fact-bounty-flask else it will connect to default i.e data-dev.sqlite.
  2. In the root of the project directory, run docker-compose build
    • If you are on Linux machine, execute the following steps to install compose.
      sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
      sudo chmod +x /usr/local/bin/docker-compose
      
  3. Once build completes, run docker-compose up

How to Contribute

  • First fork the repository and clone it.
  • You can open issue regarding any problem according to the given issue template.
  • Make changes and do the PR according to the given template.

License

FOSSA Status

You can’t perform that action at this time.