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.
-
Clone the repository.
git clone https://github.com/scorelab/fact-Bounty.git
-
Change directory to the folder.
cd fact-Bounty/
-
Run npm install in fact-bounty-client folder.
cd fact-bounty-client npm install
-
Duplicate and rename the
.env.example
file as.env
inside thefact-bounty-client
folder. Set up environment values in.env
in order to use the twitter search function and Google, Facebook login (OAuth).cp .env.example .env
- 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.
-
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
Error: If you encounter the following error, then follow the fix below
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ...
sudo -H pip install virtualenv
-
-
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
-
-
-
Change directory to the folder
$ cd fact-bounty-flask
-
Create a .env file in the
fact-bounty-flask
folder and add the following:export FLASK_APP="app.py" export SECRET_KEY="some-very-long-string-of-random-characters-CHANGE-TO-YOUR-LIKING" export FLASK_ENV="development" export FLASK_CONFIG="development" export DEV_DATABASE_URL="" export TEST_DATABASE_URL="" export DATABASE_URL="" export ELASTIC_SEARCH_URL="" export ELASTIC_SEARCH_USERNAME="" export ELASTIC_SEARCH_PASSWORD="" export TZ="Asia/Colombo" export MAIL_USERNAME="" export MAIL_PASSWORD="" export FACTBOUNTY_ADMIN="" export MAIL_PORT="587" export MAIL_USE_TLS="true" export MAIL_SERVER="smtp.gmail.com"
Save the file.
-
-
(venv)$ pip install -r requirements.txt
-
(venv)$ pre-commit install
-
On your terminal, run the server using this one simple command:
(venv)$ flask run
-
Browse to db folder inside
fact-Bounty
and run:(venv)$ cd db (venv)$ python add_es.py
-
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.0-amd64.deb wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.0-amd64.deb.sha512 shasum -a 512 -c elasticsearch-7.6.0-amd64.deb.sha512 sudo dpkg -i elasticsearch-7.6.0-amd64.deb
If you're an Arch Linux user, install it using the package manager, pacman
sudo pacman -S elasticsearch
-
ps -p 1
-
-
Use the update-rc.d command to configure Elasticsearch to start automatically when the system boots up:
sudo update-rc.d elasticsearch defaults 95 10
-
Elasticsearch can be started and stopped using the service command:
sudo -i service elasticsearch start sudo -i service elasticsearch stop
-
-
-
To configure Elasticsearch to start automatically when the system boots up, run the following commands:
sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service
-
Elasticsearch can be started and stopped using the service command:
sudo systemctl start elasticsearch.service sudo systemctl stop elasticsearch.service
-
If you're facing issues in starting
elasticsearch.service
, check your system default Java version as Elasticsearch requires at least OpenJDK 10.
-
-
CURL
request:(venv)$ curl -X GET "localhost:9200/"
or open localhost:9200
-
Use two terminals, one for
fact-bounty-flask
and the other forfact-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 install the extension -> Redux Dev Tools in chrome extension library.
-
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
-
Create a .env file inside fact-bounty-flask and add the following:
FLASK_APP="app.py" SECRET_KEY="some-very-long-string-of-random-characters-CHANGE-TO-YOUR-LIKING" FLASK_ENV="development" FLASK_CONFIG="development" DEV_DATABASE_URL="" TEST_DATABASE_URL="" DATABASE_URL="" ELASTIC_SEARCH_URL="" ELASTIC_SEARCH_USERNAME="" ELASTIC_SEARCH_PASSWORD="" TZ=“Asia/Colombo”
Save the file.
- 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.