├── Crawlers ├── news_sites │ ├── __init__.py │ ├── dbs │ │ └── default.db │ ├── spiders │ │ ├── __init__.py │ │ ├── hotnews.py │ │ ├── hiru.py │ │ ├── hirufm.py │ │ ├── shaagossip.py │ │ ├── neth.py │ │ ├── adaDeranaSinhala.py │ │ ├── rg.py │ │ ├── adaDerana.py │ │ ├── lankahit.py │ │ ├── nfsinhala.py │ │ ├── am.py │ │ ├── roar.py │ │ ├── bizDerana.py │ │ ├── thepapare.py │ │ ├── lankadeepa.py │ │ ├── economynext.py │ │ ├── ft.py │ │ ├── reporter.py │ │ ├── dailymirror.py │ │ ├── rm.py │ │ ├── ctoday.py │ │ └── nf.py │ └── items.py ├── dbs │ └── default.db ├── .vscode │ └── settings.json ├── requirements.txt ├── crawl_all.bash └── scrapy.cfg ├── fact-bounty-flask ├── tests │ ├── __init__.py │ ├── fake_db.py │ ├── test_admin.py │ └── test_crawler.py ├── boot.sh ├── api │ ├── __init__.py │ ├── admin │ │ ├── __init__.py │ │ ├── views.py │ │ └── controller.py │ ├── user │ │ ├── __init__.py │ │ └── views.py │ ├── util │ │ ├── __init__.py │ │ ├── views.py │ │ └── controller.py │ ├── crawler │ │ ├── __init__.py │ │ ├── utils.py │ │ └── views.py │ ├── stories │ │ ├── __init__.py │ │ ├── views.py │ │ └── model.py │ ├── data-dev.sqlite │ ├── database.py │ ├── errors.py │ ├── helpers.py │ └── extensions.py ├── migrations │ ├── README │ ├── script.py.mako │ ├── versions │ │ ├── 8be924798f34_.py │ │ └── d2fc5d7ff47e_.py │ └── alembic.ini ├── app.yaml ├── docker.txt ├── prod.txt ├── .flake8 ├── docs │ ├── stories │ │ ├── get_all.yml │ │ ├── get_range.yml │ │ ├── get_by_id.yml │ │ ├── load_user_vote.yml │ │ └── change_vote_count.yml │ └── users │ │ ├── token_refresh.yml │ │ ├── logout_access.yml │ │ ├── logout_refresh.yml │ │ ├── login.yml │ │ ├── register.yml │ │ └── oauth.yml ├── .vscode │ └── settings.json ├── .idea │ ├── encodings.xml │ ├── vcs.xml │ ├── modules.xml │ ├── misc.xml │ └── fact-bounty-flask.iml ├── .pre-commit-config.yaml ├── Dockerfile ├── app.py ├── .gcloudignore └── requirements.txt ├── fact-bounty-client ├── jarvis │ └── .gitignore ├── src │ ├── components │ │ ├── TweetList │ │ │ ├── styles.sass │ │ │ ├── index.js │ │ │ └── TweetList.jsx │ │ ├── OAuthContainer │ │ │ ├── OAuthContainer.style.js │ │ │ ├── index.js │ │ │ ├── OAuthContainer.jsx │ │ │ ├── FacebookContainer.js │ │ │ ├── index.scss │ │ │ └── GoogleContainer.js │ │ ├── Toast │ │ │ ├── index.js │ │ │ └── Toast.jsx │ │ ├── Footer │ │ │ ├── index.js │ │ │ ├── style.sass │ │ │ └── Footer.jsx │ │ ├── NavBar │ │ │ ├── index.js │ │ │ ├── styles.sass │ │ │ ├── NavBar.style.js │ │ │ └── Links │ │ │ │ └── PublicLinks.js │ │ ├── PostItem │ │ │ ├── index.js │ │ │ └── style.sass │ │ ├── VotesBar │ │ │ ├── index.js │ │ │ ├── style.sass │ │ │ └── VotesBar.jsx │ │ ├── PostsList │ │ │ ├── index.js │ │ │ └── style.sass │ │ ├── TweetItem │ │ │ ├── index.js │ │ │ └── style.sass │ │ ├── PrivateRoute │ │ │ ├── index.js │ │ │ └── PrivateRoute.jsx │ │ ├── VoteButtons │ │ │ ├── index.js │ │ │ ├── style.sass │ │ │ └── VoteButtons.jsx │ │ ├── AsyncViewWrapper │ │ │ ├── style.sass │ │ │ ├── index.js │ │ │ └── AsyncViewWrapper.jsx │ │ ├── ContactUsForm │ │ │ ├── index.js │ │ │ └── style.sass │ │ ├── SwipeableDrawer │ │ │ ├── SwipeableDrawer.style.js │ │ │ ├── index.js │ │ │ ├── Links │ │ │ │ ├── PublicLinks.js │ │ │ │ └── PrivateLinks.js │ │ │ └── SwipeableDrawer.jsx │ │ └── DashboardSideNav │ │ │ ├── index.js │ │ │ ├── style.sass │ │ │ └── DashboardSideNav.jsx │ ├── pages │ │ ├── Login │ │ │ ├── index.js │ │ │ └── Login.style.js │ │ ├── Posts │ │ │ ├── index.js │ │ │ ├── style.sass │ │ │ └── Posts.jsx │ │ ├── Landing │ │ │ ├── index.js │ │ │ └── style.sass │ │ ├── Search │ │ │ ├── index.js │ │ │ └── style.sass │ │ ├── Tweets │ │ │ ├── index.js │ │ │ ├── style.sass │ │ │ └── Tweets.jsx │ │ ├── Register │ │ │ ├── index.js │ │ │ └── Register.style.js │ │ ├── notFound │ │ │ ├── index.jsx │ │ │ ├── index.css │ │ │ └── NotFound.jsx │ │ ├── Dashboard │ │ │ ├── index.js │ │ │ ├── style.sass │ │ │ └── Dashboard.jsx │ │ ├── TweetSearch │ │ │ ├── index.js │ │ │ └── style.sass │ │ ├── TwitterGraph │ │ │ ├── index.js │ │ │ └── styles.sass │ │ ├── KibanaDashboard │ │ │ ├── index.js │ │ │ ├── style.sass │ │ │ └── Search.jsx │ │ ├── ResetPassword │ │ │ ├── index.js │ │ │ └── ResetPassword.style.js │ │ ├── ForgotPassword │ │ │ ├── index.js │ │ │ └── ForgotPassword.style.js │ │ └── PostDetailView │ │ │ ├── index.js │ │ │ └── style.sass │ ├── assets │ │ ├── img │ │ │ ├── patch1.png │ │ │ ├── patch2.png │ │ │ ├── patch3.png │ │ │ ├── headerImg.png │ │ │ ├── placeholder.png │ │ │ └── placeholderWide.png │ │ └── logos │ │ │ ├── factbountyLogo.png │ │ │ └── factbountyLogoWhite.png │ ├── constants │ │ ├── ApiConstants.js │ │ └── KibanaConstants.js │ ├── redux │ │ ├── actions │ │ │ ├── errorActions.js │ │ │ ├── successActions.js │ │ │ ├── contactUsActions.js │ │ │ ├── actionTypes.js │ │ │ └── twitterActions.js │ │ ├── reducers │ │ │ ├── errorReducers.js │ │ │ ├── successReducers.js │ │ │ ├── index.js │ │ │ ├── authReducers.js │ │ │ ├── contactUsReducers.js │ │ │ └── twitterReducers.js │ │ └── store │ │ │ └── index.js │ ├── styles │ │ ├── style.sass │ │ ├── fonts.sass │ │ ├── global-styles.sass │ │ ├── variables.sass │ │ └── theme.js │ ├── App.test.js │ ├── services │ │ ├── ContactUsService.js │ │ ├── PostsService.js │ │ └── AuthService.js │ ├── index.js │ ├── helpers │ │ ├── AuthTokenHelper.js │ │ └── ApiBuilder.js │ ├── App.js │ └── AppRouter.js ├── prettier.config.js ├── public │ ├── favicon.ico │ ├── manifest.json │ └── static │ │ ├── config.js │ │ └── css │ │ └── widget.css ├── .env.example ├── .idea │ ├── encodings.xml │ ├── watcherTasks.xml │ ├── codeStyles │ │ ├── codeStyleConfig.xml │ │ └── Project.xml │ ├── misc.xml │ ├── vcs.xml │ ├── inspectionProfiles │ │ └── Project_Default.xml │ ├── modules.xml │ └── fact-bounty-client.iml ├── .dockerignore ├── Dockerfile ├── .vscode │ └── launch.json ├── .eslintrc.js └── package.json ├── .flake8 ├── .idea ├── encodings.xml ├── vcs.xml ├── modules.xml ├── misc.xml └── fact-Bounty.iml ├── .dockerignore ├── .vscode ├── settings.json └── launch.json ├── pyproject.toml ├── db ├── dump │ ├── users.json │ └── stories.json ├── add_es.py └── create_index.py ├── .dependabot └── config.yml ├── codefresh.yml ├── .travis.yml ├── .remarkrc.js ├── .github ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE.md ├── OAuthdSetup.md └── docker-compose.yml /Crawlers/news_sites/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fact-bounty-flask/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fact-bounty-client/jarvis/.gitignore: -------------------------------------------------------------------------------- 1 | config.local.js 2 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/TweetList/styles.sass: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fact-bounty-flask/boot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec flask run 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/OAuthContainer/OAuthContainer.style.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/__init__.py: -------------------------------------------------------------------------------- 1 | """Main application package.""" 2 | -------------------------------------------------------------------------------- /fact-bounty-flask/migrations/README: -------------------------------------------------------------------------------- 1 | Generic single-database configuration. -------------------------------------------------------------------------------- /fact-bounty-flask/api/admin/__init__.py: -------------------------------------------------------------------------------- 1 | from . import views # noqa: F401 2 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/user/__init__.py: -------------------------------------------------------------------------------- 1 | from . import views # noqa: F401 2 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/util/__init__.py: -------------------------------------------------------------------------------- 1 | from . import views # noqa: F401 2 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/crawler/__init__.py: -------------------------------------------------------------------------------- 1 | from . import views # noqa: F401 2 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/stories/__init__.py: -------------------------------------------------------------------------------- 1 | from . import views # noqa: F401 2 | -------------------------------------------------------------------------------- /fact-bounty-flask/app.yaml: -------------------------------------------------------------------------------- 1 | runtime: python37 2 | entrypoint: gunicorn -b :$PORT app:app -------------------------------------------------------------------------------- /fact-bounty-flask/docker.txt: -------------------------------------------------------------------------------- 1 | -r requirements.txt 2 | gunicorn==19.7.1 3 | pymysql==0.9.3 4 | -------------------------------------------------------------------------------- /fact-bounty-flask/tests/fake_db.py: -------------------------------------------------------------------------------- 1 | import tempfile 2 | 3 | db_fd, db_path = tempfile.mkstemp() -------------------------------------------------------------------------------- /Crawlers/dbs/default.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/Crawlers/dbs/default.db -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Login/index.js: -------------------------------------------------------------------------------- 1 | import Login from './Login' 2 | export default Login 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Posts/index.js: -------------------------------------------------------------------------------- 1 | import Posts from './Posts' 2 | export default Posts 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/Toast/index.js: -------------------------------------------------------------------------------- 1 | import Toast from './Toast' 2 | export default Toast 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Landing/index.js: -------------------------------------------------------------------------------- 1 | import Landing from './Landing' 2 | export default Landing 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Search/index.js: -------------------------------------------------------------------------------- 1 | import Search from './Search' 2 | export default Search 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Tweets/index.js: -------------------------------------------------------------------------------- 1 | import Tweets from './Tweets' 2 | export default Tweets 3 | -------------------------------------------------------------------------------- /fact-bounty-client/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | singleQuote: true 4 | } 5 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/Footer/index.js: -------------------------------------------------------------------------------- 1 | import Footer from './Footer' 2 | export default Footer 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/NavBar/index.js: -------------------------------------------------------------------------------- 1 | import NavBar from './NavBar' 2 | export default NavBar 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Register/index.js: -------------------------------------------------------------------------------- 1 | import Register from './Register' 2 | export default Register 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/notFound/index.jsx: -------------------------------------------------------------------------------- 1 | import NotFound from './NotFound' 2 | export default NotFound 3 | -------------------------------------------------------------------------------- /fact-bounty-flask/prod.txt: -------------------------------------------------------------------------------- 1 | -r requirements.txt 2 | gunicorn==19.7.1 3 | pymysql==0.9.3 4 | certifi==2019.3.9 5 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/PostItem/index.js: -------------------------------------------------------------------------------- 1 | import PostItem from './PostItem' 2 | export default PostItem 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/VotesBar/index.js: -------------------------------------------------------------------------------- 1 | import VotesBar from './VotesBar' 2 | export default VotesBar 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Dashboard/index.js: -------------------------------------------------------------------------------- 1 | import Dashboard from './Dashboard' 2 | export default Dashboard 3 | -------------------------------------------------------------------------------- /Crawlers/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.linting.pylintEnabled": true, 3 | "python.linting.enabled": true 4 | } -------------------------------------------------------------------------------- /fact-bounty-client/src/components/PostsList/index.js: -------------------------------------------------------------------------------- 1 | import PostsList from './PostsList' 2 | export default PostsList 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/TweetItem/index.js: -------------------------------------------------------------------------------- 1 | import TweetItem from './TweetItem' 2 | export default TweetItem 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/TweetList/index.js: -------------------------------------------------------------------------------- 1 | import TweetList from './TweetList' 2 | export default TweetList 3 | -------------------------------------------------------------------------------- /Crawlers/news_sites/dbs/default.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/Crawlers/news_sites/dbs/default.db -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/TweetSearch/index.js: -------------------------------------------------------------------------------- 1 | import TweetSearch from './TweetSearch' 2 | export default TweetSearch 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/TwitterGraph/index.js: -------------------------------------------------------------------------------- 1 | import TwitterGraph from './TwitterGraph' 2 | export default TwitterGraph 3 | -------------------------------------------------------------------------------- /fact-bounty-client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/public/favicon.ico -------------------------------------------------------------------------------- /fact-bounty-client/src/components/PrivateRoute/index.js: -------------------------------------------------------------------------------- 1 | import PrivateRoute from './PrivateRoute' 2 | export default PrivateRoute 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/VoteButtons/index.js: -------------------------------------------------------------------------------- 1 | import VoteButtons from './VoteButtons' 2 | export default VoteButtons 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/KibanaDashboard/index.js: -------------------------------------------------------------------------------- 1 | import KibanaDashboard from './Search' 2 | export default KibanaDashboard 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/ResetPassword/index.js: -------------------------------------------------------------------------------- 1 | import ResetPassword from './ResetPassword' 2 | export default ResetPassword 3 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/data-dev.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-flask/api/data-dev.sqlite -------------------------------------------------------------------------------- /fact-bounty-client/src/components/AsyncViewWrapper/style.sass: -------------------------------------------------------------------------------- 1 | .async-view-wrapper-container 2 | .loader 3 | text-align: center -------------------------------------------------------------------------------- /fact-bounty-client/src/components/ContactUsForm/index.js: -------------------------------------------------------------------------------- 1 | import ContactUsForm from './ContactUsForm' 2 | export default ContactUsForm 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/ForgotPassword/index.js: -------------------------------------------------------------------------------- 1 | import ForgotPassword from './ForgotPassword' 2 | export default ForgotPassword 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/PostDetailView/index.js: -------------------------------------------------------------------------------- 1 | import PostDetailView from './PostDetailView' 2 | export default PostDetailView 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/OAuthContainer/index.js: -------------------------------------------------------------------------------- 1 | import OAuthContainer from './OAuthContainer' 2 | export default OAuthContainer 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/SwipeableDrawer/SwipeableDrawer.style.js: -------------------------------------------------------------------------------- 1 | export default { 2 | list: { 3 | width: 250 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = E203, E266, E501, W503, F403, F401 3 | max-line-length = 79 4 | max-complexity = 18 5 | select = B,C,E,F,W,T4,B9 6 | -------------------------------------------------------------------------------- /fact-bounty-client/src/assets/img/patch1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/src/assets/img/patch1.png -------------------------------------------------------------------------------- /fact-bounty-client/src/assets/img/patch2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/src/assets/img/patch2.png -------------------------------------------------------------------------------- /fact-bounty-client/src/assets/img/patch3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/src/assets/img/patch3.png -------------------------------------------------------------------------------- /fact-bounty-client/src/components/SwipeableDrawer/index.js: -------------------------------------------------------------------------------- 1 | import SwipeableDrawer from './SwipeableDrawer' 2 | export default SwipeableDrawer 3 | -------------------------------------------------------------------------------- /Crawlers/requirements.txt: -------------------------------------------------------------------------------- 1 | attrs==19.2.0 2 | scrapy==1.6.0 3 | elasticsearch==6.2.0 4 | scrapyd==1.2.0 5 | Twisted==18.9.0 6 | python-dateutil==2.8.0 7 | -------------------------------------------------------------------------------- /fact-bounty-client/src/assets/img/headerImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/src/assets/img/headerImg.png -------------------------------------------------------------------------------- /fact-bounty-client/src/components/AsyncViewWrapper/index.js: -------------------------------------------------------------------------------- 1 | import AsyncViewWrapper from './AsyncViewWrapper' 2 | export default AsyncViewWrapper 3 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/DashboardSideNav/index.js: -------------------------------------------------------------------------------- 1 | import DashboardSideNav from './DashboardSideNav' 2 | export default DashboardSideNav 3 | -------------------------------------------------------------------------------- /Crawlers/crawl_all.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | source venv/bin/activate 3 | for crawler in $(scrapy list) 4 | do 5 | scrapy crawl $crawler 6 | done 7 | -------------------------------------------------------------------------------- /fact-bounty-client/.env.example: -------------------------------------------------------------------------------- 1 | REACT_APP_GOOGLE_CLIENT_ID="" 2 | REACT_APP_FACEBOOK_CLIENT_ID="" 3 | REACT_APP_OAUTHD_KEY="" 4 | REACT_APP_OAUTHD_URL="" 5 | -------------------------------------------------------------------------------- /fact-bounty-client/src/assets/img/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/src/assets/img/placeholder.png -------------------------------------------------------------------------------- /fact-bounty-client/src/assets/img/placeholderWide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/src/assets/img/placeholderWide.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /fact-bounty-client/src/assets/logos/factbountyLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/src/assets/logos/factbountyLogo.png -------------------------------------------------------------------------------- /fact-bounty-flask/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = E203, E266, E501, W503, F403, F401 3 | max-line-length = 79 4 | max-complexity = 18 5 | select = B,C,E,F,W,T4,B9 6 | -------------------------------------------------------------------------------- /fact-bounty-client/src/assets/logos/factbountyLogoWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorelab/fact-bounty/HEAD/fact-bounty-client/src/assets/logos/factbountyLogoWhite.png -------------------------------------------------------------------------------- /fact-bounty-flask/docs/stories/get_all.yml: -------------------------------------------------------------------------------- 1 | Retrieve stories 2 | --- 3 | tags: 4 | - Stories 5 | responses: 6 | 200: 7 | description: JSON object with all stories. 8 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Dashboard/style.sass: -------------------------------------------------------------------------------- 1 | @import '../../styles/variables.sass' 2 | 3 | .dashboard-container 4 | .left-section 5 | border-right: 1px solid $grey -------------------------------------------------------------------------------- /fact-bounty-flask/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "venv/bin/python", 3 | "python.linting.pylintEnabled": true, 4 | "python.linting.enabled": true 5 | } -------------------------------------------------------------------------------- /fact-bounty-client/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /fact-bounty-flask/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /fact-bounty-client/.idea/watcherTasks.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | Dockerfile* 4 | docker-compose* 5 | .dockerignore 6 | .git 7 | .gitignore 8 | .env 9 | */bin 10 | */obj 11 | README.md 12 | LICENSE 13 | .vscode -------------------------------------------------------------------------------- /fact-bounty-client/src/constants/ApiConstants.js: -------------------------------------------------------------------------------- 1 | const API_URL_LOCAL = 'http://127.0.0.1:5000' 2 | const API_URL_PROD = '' 3 | 4 | export const APIConstantsDev = { 5 | API_URL: API_URL_LOCAL 6 | } 7 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fact-bounty-client/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /Crawlers/news_sites/spiders/__init__.py: -------------------------------------------------------------------------------- 1 | # This package will contain the spiders of your Scrapy project 2 | # 3 | # Please refer to the documentation for information on how to create and manage 4 | # your spiders. 5 | -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/actions/errorActions.js: -------------------------------------------------------------------------------- 1 | import { UPDATE_ERRORS } from './actionTypes' 2 | 3 | export const updateError = payload => dispatch => 4 | dispatch({ type: UPDATE_ERRORS, payload }) 5 | -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/actions/successActions.js: -------------------------------------------------------------------------------- 1 | import { UPDATE_SUCCESS } from './actionTypes' 2 | 3 | export const updateSuccess = payload => dispatch => 4 | dispatch({ type: UPDATE_SUCCESS, payload }) 5 | -------------------------------------------------------------------------------- /fact-bounty-client/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | Dockerfile* 4 | docker-compose* 5 | .dockerignore 6 | .git 7 | .gitignore 8 | .env 9 | */bin 10 | */obj 11 | README.md 12 | LICENSE 13 | .vscode -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "fact-bounty-flask/venv/bin/python", 3 | "python.linting.pylintEnabled": false, 4 | "python.linting.flake8Enabled": true, 5 | "python.linting.enabled": true 6 | } -------------------------------------------------------------------------------- /fact-bounty-client/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /fact-bounty-client/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/PostsList/style.sass: -------------------------------------------------------------------------------- 1 | .post-list-wrapper 2 | .postLayout 3 | display: grid 4 | grid-template-rows: auto 5 | min-height: calc(100vh - 64px) 6 | .loader 7 | text-align: center 8 | 9 | -------------------------------------------------------------------------------- /fact-bounty-flask/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fact-bounty-client/src/styles/style.sass: -------------------------------------------------------------------------------- 1 | //Third Party Libs 2 | @import '~bootstrap/scss/bootstrap.scss' 3 | @import '~font-awesome/css/font-awesome.min.css' 4 | @import 'variables.sass' 5 | @import 'fonts.sass' 6 | @import 'global-styles.sass' 7 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/admin/views.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | from .controller import adminController 3 | 4 | adminprint = Blueprint("admin", __name__) 5 | 6 | adminprint.add_url_rule( 7 | "/system", view_func=adminController["system"], methods=["GET"] 8 | ) 9 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/database.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """Database module, including the SQLAlchemy database object \ 3 | and DB-related utilities.""" 4 | from .extensions import db 5 | 6 | # Alias common SQLAlchemy names 7 | Column = db.Column 8 | Model = db.Model 9 | -------------------------------------------------------------------------------- /fact-bounty-flask/docs/stories/get_range.yml: -------------------------------------------------------------------------------- 1 | Retrieve stories in range 2 | --- 3 | tags: 4 | - Stories 5 | parameters: 6 | - in: page 7 | name: page 8 | type: integer 9 | responses: 10 | 200: 11 | description: JSON object with range of stories. 12 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/Footer/style.sass: -------------------------------------------------------------------------------- 1 | @import '../../styles/variables.sass' 2 | 3 | .footer-container 4 | background-color: $primary_color 5 | margin-top: 80px 6 | padding: 30px 7 | text-align: center 8 | color: #fff 9 | .logo 10 | width: 200px -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 79 3 | include = '\.pyi?$' 4 | exclude = ''' 5 | /( 6 | \.git 7 | | \.hg 8 | | \.mypy_cache 9 | | \.tox 10 | | \.venv 11 | | _build 12 | | buck-out 13 | | build 14 | | migrations 15 | | dist 16 | | venv 17 | )/ 18 | ''' 19 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/util/views.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | from .controller import utilController 3 | 4 | utilprint = Blueprint('util', __name__) 5 | 6 | utilprint.add_url_rule( 7 | '/contact_us', 8 | view_func=utilController['contact_us'], 9 | methods=['POST'] 10 | ) 11 | -------------------------------------------------------------------------------- /fact-bounty-flask/.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/ambv/black 3 | rev: stable 4 | hooks: 5 | - id: black 6 | language_version: python3.6 7 | - repo: https://github.com/pre-commit/pre-commit-hooks 8 | rev: v1.2.3 9 | hooks: 10 | - id: flake8 11 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /fact-bounty-client/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | import App from './App' 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div') 7 | ReactDOM.render(, div) 8 | ReactDOM.unmountComponentAtNode(div) 9 | }) 10 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/NavBar/styles.sass: -------------------------------------------------------------------------------- 1 | .nav-bar-container 2 | background-color: #ffffff !important 3 | @media #{'only screen and (max-width: 960px)'} 4 | padding: 10px 5 | padding: 10px 60px 10px 60px 6 | .logo-container 7 | flex-grow: 1 8 | img 9 | width: 200px -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /fact-bounty-client/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /fact-bounty-client/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /fact-bounty-flask/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /fact-bounty-flask/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /fact-bounty-flask/docs/users/token_refresh.yml: -------------------------------------------------------------------------------- 1 | Token refresh 2 | --- 3 | tags: 4 | - User 5 | produces: 6 | - application/json 7 | parameters: 8 | - in: header 9 | name: Authorization 10 | description: an authorization header 11 | required: true 12 | type: string 13 | responses: 14 | 200: 15 | description: Token refreshed successfully. 16 | -------------------------------------------------------------------------------- /Crawlers/scrapy.cfg: -------------------------------------------------------------------------------- 1 | # Automatically created by: scrapy startproject 2 | # 3 | # For more information about the [deploy] section see: 4 | # https://scrapyd.readthedocs.io/en/latest/deploy.html 5 | 6 | [settings] 7 | default = news_sites.settings 8 | 9 | [scrapyd] 10 | bind_address = 0.0.0.0 11 | 12 | [deploy] 13 | #url = http://localhost:6800/ 14 | project = news_sites 15 | -------------------------------------------------------------------------------- /db/dump/users.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "_id": { 4 | "$oid": "5c47e646d0084e14fba25711" 5 | }, 6 | "name": "Oshan Mudannayake", 7 | "email": "oshan.ivantha@gmail.com", 8 | "password": "$2a$10$zPYmQ44u7IuJrH4iabccWu8A0lCZiZwG1WcBq4sBbUJCPEGFUv6EK", 9 | "date": { 10 | "$date": "2019-01-23T03:57:58.659Z" 11 | }, 12 | "__v": 0 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/DashboardSideNav/style.sass: -------------------------------------------------------------------------------- 1 | @import '../../styles/variables.sass' 2 | 3 | .dashboard-side-nav-container 4 | width: 100% 5 | .links 6 | list-style: none 7 | .link 8 | color: black 9 | text-decoration: none 10 | font-size: 20px 11 | .link:hover 12 | font-weight: bold 13 | -------------------------------------------------------------------------------- /fact-bounty-client/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8 2 | 3 | RUN mkdir -p /usr/fact-bounty/fact-bounty-client 4 | WORKDIR /usr/fact-bounty/fact-bounty-client 5 | 6 | ENV PATH /usr/app/node_modules/.bin:$PATH 7 | 8 | 9 | COPY package.json /usr/fact-bounty/fact-bounty-client 10 | RUN npm install --silent 11 | COPY . /usr/fact-bounty/fact-bounty-client 12 | 13 | EXPOSE 3000 14 | CMD ["npm", "start"] -------------------------------------------------------------------------------- /fact-bounty-flask/api/crawler/utils.py: -------------------------------------------------------------------------------- 1 | from flask import jsonify, current_app 2 | 3 | 4 | def cron_crawlers(): 5 | scrapyd = current_app.scrapy 6 | 7 | spiders = scrapyd.list_spiders('default') 8 | 9 | tasks = [] 10 | for spider in spiders: 11 | tasks.append(scrapyd.schedule('default', spider)) 12 | 13 | return jsonify({'tasks_data': tasks, 'status': 'started'}) 14 | -------------------------------------------------------------------------------- /fact-bounty-client/src/styles/fonts.sass: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700|Roboto:400,500,700') 2 | @import 'variables.sass' 3 | 4 | body 5 | font-family: 'Montserrat',sans-serif 6 | color: $text-color 7 | font-weight: 400 8 | font-size: 16px 9 | h1,h2,h3,h4,h5 10 | font-family: 'Montserrat',sans-serif 11 | font-weight: 400 12 | 13 | -------------------------------------------------------------------------------- /fact-bounty-client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Posts/style.sass: -------------------------------------------------------------------------------- 1 | .post-wrapper 2 | .header 3 | padding: 20px 0px 10px 0px 4 | display: flex 5 | justify-content: space-between 6 | align-items: center 7 | input 8 | width: 300px; 9 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .1) 10 | border: none 11 | border-radius: 3px 12 | padding: 10px 13 | .hr 14 | margin-bottom: 40px 15 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Tweets/style.sass: -------------------------------------------------------------------------------- 1 | .post-wrapper 2 | .header 3 | padding: 20px 0px 10px 0px 4 | display: flex 5 | justify-content: space-between 6 | align-items: center 7 | input 8 | width: 300px; 9 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .1) 10 | border: none 11 | border-radius: 3px 12 | padding: 10px 13 | .hr 14 | margin-bottom: 40px 15 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/KibanaDashboard/style.sass: -------------------------------------------------------------------------------- 1 | .kibana-dashboard-wrapper 2 | .header 3 | padding: 20px 0px 10px 0px 4 | display: flex 5 | justify-content: space-between 6 | align-items: center 7 | input 8 | width: 300px; 9 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .1) 10 | border: none 11 | border-radius: 3px 12 | padding: 10px 13 | .hr 14 | margin-bottom: 40px -------------------------------------------------------------------------------- /fact-bounty-flask/docs/users/logout_access.yml: -------------------------------------------------------------------------------- 1 | User logout 2 | --- 3 | tags: 4 | - User 5 | produces: 6 | - application/json 7 | parameters: 8 | - in: header 9 | name: Authorization 10 | description: an authorization header 11 | required: true 12 | type: string 13 | responses: 14 | 200: 15 | description: Access token has been revoked. 16 | 500: 17 | description: Something went wrong! 18 | -------------------------------------------------------------------------------- /fact-bounty-flask/docs/users/logout_refresh.yml: -------------------------------------------------------------------------------- 1 | User logout 2 | --- 3 | tags: 4 | - User 5 | produces: 6 | - application/json 7 | parameters: 8 | - in: header 9 | name: Authorization 10 | description: an authorization header 11 | required: true 12 | type: string 13 | responses: 14 | 200: 15 | description: Refresh token has been revoked. 16 | 500: 17 | description: Something went wrong! 18 | -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/reducers/errorReducers.js: -------------------------------------------------------------------------------- 1 | import { GET_ERRORS, UPDATE_ERRORS } from '../actions/actionTypes' 2 | 3 | const initialState = {} 4 | 5 | export default function(state = initialState, action) { 6 | switch (action.type) { 7 | case GET_ERRORS: 8 | return action.payload 9 | 10 | case UPDATE_ERRORS: 11 | return action.payload 12 | 13 | default: 14 | return state 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/reducers/successReducers.js: -------------------------------------------------------------------------------- 1 | import { GET_SUCCESS, UPDATE_SUCCESS } from '../actions/actionTypes' 2 | 3 | const initialState = {} 4 | 5 | export default function(state = initialState, action) { 6 | switch (action.type) { 7 | case GET_SUCCESS: 8 | return action.payload 9 | 10 | case UPDATE_SUCCESS: 11 | return action.payload 12 | 13 | default: 14 | return state 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.dependabot/config.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | 3 | update_configs: 4 | - allowed_updates: 5 | - match: 6 | update_type: "security" 7 | package_manager: "javascript" 8 | directory: "/fact-bounty-client" 9 | update_schedule: "weekly" 10 | 11 | - allowed_updates: 12 | - match: 13 | update_type: "security" 14 | package_manager: "python" 15 | directory: "/fact-bounty-flask" 16 | update_schedule: "weekly" 17 | -------------------------------------------------------------------------------- /fact-bounty-client/src/services/ContactUsService.js: -------------------------------------------------------------------------------- 1 | import ApiBuilder from '../helpers/ApiBuilder' 2 | 3 | /** 4 | * 5 | * POST : contactUsSubmit 6 | * 7 | */ 8 | const contactUsSubmit = (name, email, phone, subject, message) => { 9 | return ApiBuilder.API.post(`api/utils/contact_us`, { 10 | name, 11 | email, 12 | phone, 13 | subject, 14 | message 15 | }) 16 | } 17 | 18 | export default { 19 | contactUsSubmit 20 | } 21 | -------------------------------------------------------------------------------- /db/add_es.py: -------------------------------------------------------------------------------- 1 | from elasticsearch import Elasticsearch 2 | import json 3 | import os 4 | 5 | ELASTICSEARCH_URL = '127.0.0.1' 6 | 7 | es = Elasticsearch( 8 | [ELASTICSEARCH_URL], 9 | port=9200 10 | ) 11 | 12 | with open(os.path.join(os.path.dirname(__file__),'dump/stories.json'), 'r') as read: 13 | data = json.load(read) 14 | i = 1 15 | for row in data: 16 | es.index(index='factbounty', doc_type='story', id=i, body=row) 17 | i = i + 1 18 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/Footer/Footer.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import factbountyLogoWhite from '../../assets/logos/factbountyLogoWhite.png' 3 | import './style.sass' 4 | 5 | class Footer extends Component { 6 | render() { 7 | return ( 8 |
9 | logo 10 |
11 | ) 12 | } 13 | } 14 | 15 | export default Footer 16 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/crawler/views.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | from .controller import crawlerController 3 | 4 | blueprint = Blueprint('crawler', __name__) 5 | 6 | 7 | blueprint.add_url_rule( 8 | '/cron_job', 9 | view_func=crawlerController['setcronjob'], 10 | methods=['GET', 'POST', 'PUT', 'DELETE'] 11 | ) 12 | 13 | blueprint.add_url_rule( 14 | '/crawl_live', 15 | view_func=crawlerController['crawlbydate'], 16 | methods=['GET'] 17 | ) 18 | -------------------------------------------------------------------------------- /fact-bounty-flask/docs/users/login.yml: -------------------------------------------------------------------------------- 1 | User login 2 | --- 3 | tags: 4 | - User 5 | consumes: 6 | - "application/json" 7 | parameters: 8 | - in: "body" 9 | name: "body" 10 | schema: 11 | type: "object" 12 | properties: 13 | email: 14 | type: string 15 | example: abcd@xyz.com 16 | password: 17 | type: string 18 | example: asdf1234 19 | responses: 20 | 200: 21 | description: User successfully logged in. 22 | -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/store/index.js: -------------------------------------------------------------------------------- 1 | import { applyMiddleware, compose, createStore } from 'redux' 2 | import thunk from 'redux-thunk' 3 | import rootReducer from '../reducers' 4 | 5 | const initialState = {} 6 | const middleware = [thunk] 7 | const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose 8 | const store = createStore( 9 | rootReducer, 10 | initialState, 11 | composeEnhancers(applyMiddleware(...middleware)) 12 | ) 13 | 14 | export default store 15 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [{ 7 | "type": "chrome", 8 | "request": "launch", 9 | "name": "Launch Chrome against localhost", 10 | "url": "http://localhost:3000", 11 | "webRoot": "${workspaceFolder}" 12 | }] 13 | } -------------------------------------------------------------------------------- /fact-bounty-client/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [{ 7 | "type": "chrome", 8 | "request": "launch", 9 | "name": "Launch Chrome against localhost", 10 | "url": "http://localhost:3000", 11 | "webRoot": "${workspaceFolder}" 12 | }] 13 | } -------------------------------------------------------------------------------- /fact-bounty-client/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | import './styles/style.sass' 4 | import App from './App' 5 | import * as serviceWorker from './serviceWorker' 6 | 7 | ReactDOM.render(, document.getElementById('root')) 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: http://bit.ly/CRA-PWA 12 | serviceWorker.unregister() 13 | -------------------------------------------------------------------------------- /fact-bounty-client/.idea/fact-bounty-client.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/NavBar/NavBar.style.js: -------------------------------------------------------------------------------- 1 | export default theme => ({ 2 | root: { 3 | flexGrow: 1 4 | }, 5 | grow: { 6 | flexGrow: 1 7 | }, 8 | menuButton: { 9 | marginLeft: -12, 10 | marginRight: 20, 11 | [theme.breakpoints.up('md')]: { 12 | display: 'none' 13 | } 14 | }, 15 | linkButtonsContainer: { 16 | [theme.breakpoints.down('sm')]: { 17 | display: 'none' 18 | } 19 | }, 20 | navBar: { 21 | backgroundColor: '#ffffff', 22 | boxShadow: 'none' 23 | } 24 | }) 25 | -------------------------------------------------------------------------------- /fact-bounty-client/src/styles/global-styles.sass: -------------------------------------------------------------------------------- 1 | html 2 | scroll-behavior: smooth 3 | 4 | body 5 | margin: 0 6 | padding: 0 7 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 8 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 9 | sans-serif 10 | -webkit-font-smoothing: antialiased 11 | -moz-osx-font-smoothing: grayscale 12 | overflow-x: hidden 13 | 14 | code 15 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New' 16 | monospace 17 | -------------------------------------------------------------------------------- /codefresh.yml: -------------------------------------------------------------------------------- 1 | version: "1.0" 2 | stages: 3 | - "clone" 4 | - "build" 5 | - "integration" 6 | - "push" 7 | steps: 8 | main_clone: 9 | type: "git-clone" 10 | description: "Cloning main repository..." 11 | repo: "scorelab/fact-Bounty" 12 | revision: "${{CF_BRANCH}}" 13 | stage: "clone" 14 | build: 15 | title: "Building Docker Image" 16 | type: "build" 17 | image_name: "scorelab/fact-Bounty" 18 | tag: "${{CF_BRANCH_TAG_NORMALIZED}}" 19 | dockerfile: "fact-bounty-flask/Dockerfile" 20 | stage: "build" 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Config file for automatic testing at travis-ci.org 2 | language: python 3 | env: 4 | - FLASK_APP=app.py FLASK_CONFIG=testing ELASTIC_SEARCH_URL=127.0.0.1 5 | python: 6 | - 3.5 7 | - 3.6 8 | services: 9 | - elasticsearch 10 | install: 11 | - pip install -r fact-bounty-flask/requirements.txt 12 | - pip install -r Crawlers/requirements.txt 13 | before_script: 14 | - sleep 10 15 | - cd Crawlers 16 | - scrapyd > logfile_scrapy & 17 | - cd .. 18 | - python db/add_es.py 19 | script: 20 | - cd fact-bounty-flask 21 | - flask test 22 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/errors.py: -------------------------------------------------------------------------------- 1 | from flask import jsonify 2 | 3 | 4 | def bad_request(message): 5 | response = jsonify({'error': 'bad request', 'message': message}) 6 | response.status_code = 400 7 | return response 8 | 9 | 10 | def unauthorized(message): 11 | response = jsonify({'error': 'unauthorized', 'message': message}) 12 | response.status_code = 401 13 | return response 14 | 15 | 16 | def forbidden(message): 17 | response = jsonify({'error': 'forbidden', 'message': message}) 18 | response.status_code = 403 19 | return response 20 | -------------------------------------------------------------------------------- /fact-bounty-flask/Dockerfile: -------------------------------------------------------------------------------- 1 | from python:3.6-alpine 2 | 3 | RUN apk add --no-cache --virtual .pynacl_deps build-base python3-dev libffi-dev && pip3 install --upgrade pip 4 | 5 | ENV FLASK_APP app.py 6 | ENV FLASK_CONFIG docker 7 | 8 | RUN mkdir -p /usr/fact-bounty/fact-bounty-flask 9 | WORKDIR /usr/fact-bounty/fact-bounty-flask 10 | 11 | COPY requirements.txt requirements.txt 12 | COPY docker.txt docker.txt 13 | RUN pip install -r docker.txt 14 | COPY . . 15 | 16 | 17 | RUN dos2unix boot.sh 18 | RUN chmod +x boot.sh 19 | 20 | EXPOSE 5000 21 | 22 | ENTRYPOINT [ "./boot.sh" ] 23 | -------------------------------------------------------------------------------- /fact-bounty-client/src/styles/variables.sass: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700|Roboto:400,500,700'); 2 | 3 | //colors 4 | $primary_color: #1564c0 5 | $secondary_color: #FDA907 6 | $primary_color_dark: #265daf 7 | $light-blue: #2699FB 8 | $light-blue-o: rgba(38, 153, 251, 0.1) 9 | $grey: #d4d4d4 10 | $light_grey: #e8ecf2 11 | $light-grey: #F4F6F8 12 | $dark-grey: #8C96A9 13 | $text-color: #485460 14 | $green: #05C46B 15 | $red: #E01E5A 16 | $orange: #FFC048 17 | $true-color: #009688 18 | $fake-color: #f4511e 19 | $mix-color: #1564c0 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux' 2 | import authReducer from './authReducers' 3 | import errorReducer from './errorReducers' 4 | import postReducer from './postReducers' 5 | import contactUsReducer from './contactUsReducers' 6 | import twitterReducer from './twitterReducers' 7 | import successReducers from './successReducers' 8 | 9 | export default combineReducers({ 10 | auth: authReducer, 11 | errors: errorReducer, 12 | success: successReducers, 13 | posts: postReducer, 14 | contactUs: contactUsReducer, 15 | tweets: twitterReducer 16 | }) 17 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Posts/Posts.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component, Fragment } from 'react' 2 | import './style.sass' 3 | import PostsList from '../../components/PostsList' 4 | 5 | class Posts extends Component { 6 | render() { 7 | return ( 8 | 9 |
10 |
11 |

Posts

12 |
13 |
14 | 15 |
16 |
17 | ) 18 | } 19 | } 20 | 21 | Posts.propTypes = {} 22 | 23 | export default Posts 24 | -------------------------------------------------------------------------------- /.remarkrc.js: -------------------------------------------------------------------------------- 1 | // .remarkrc.js 2 | exports.plugins = [ 3 | require('remark-frontmatter'), 4 | [ 5 | require('remark-retext'), 6 | require('unified')().use({ 7 | plugins: [ 8 | require('retext-english'), 9 | require('retext-syntax-urls'), 10 | [require('retext-sentence-spacing'), { preferred: 1 }], 11 | require('retext-repeated-words'), 12 | require('retext-usage'), 13 | ], 14 | }), 15 | ], 16 | require('remark-preset-lint-consistent'), 17 | require('remark-preset-lint-recommended'), 18 | require('remark-preset-lint-markdown-style-guide'), 19 | ]; -------------------------------------------------------------------------------- /fact-bounty-flask/app.py: -------------------------------------------------------------------------------- 1 | import os 2 | from dotenv import load_dotenv 3 | from flask import render_template 4 | 5 | from api.app import create_app 6 | from api.extensions import db 7 | 8 | dotenv_path = os.path.join(os.path.dirname(__file__), ".env") 9 | if os.path.exists(dotenv_path): 10 | load_dotenv(dotenv_path) 11 | 12 | app = create_app(os.getenv("FLASK_CONFIG") or "default") 13 | 14 | 15 | @app.route("/", defaults={"path": ""}) 16 | @app.route("/") 17 | def default_route(path): 18 | return render_template('index.html') 19 | 20 | 21 | if __name__ == "__main__": 22 | app.run(host="0.0.0.0", port=5000) 23 | -------------------------------------------------------------------------------- /fact-bounty-flask/migrations/script.py.mako: -------------------------------------------------------------------------------- 1 | """${message} 2 | 3 | Revision ID: ${up_revision} 4 | Revises: ${down_revision | comma,n} 5 | Create Date: ${create_date} 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | ${imports if imports else ""} 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = ${repr(up_revision)} 14 | down_revision = ${repr(down_revision)} 15 | branch_labels = ${repr(branch_labels)} 16 | depends_on = ${repr(depends_on)} 17 | 18 | 19 | def upgrade(): 20 | ${upgrades if upgrades else "pass"} 21 | 22 | 23 | def downgrade(): 24 | ${downgrades if downgrades else "pass"} 25 | -------------------------------------------------------------------------------- /fact-bounty-flask/api/helpers.py: -------------------------------------------------------------------------------- 1 | from threading import Thread 2 | from flask import current_app 3 | from flask_mail import Message 4 | from api.extensions import mail 5 | 6 | 7 | def send_async_email(app, msg): 8 | with app.app_context(): 9 | mail.send(msg) 10 | 11 | 12 | def send_email(to, subject, body): 13 | app = current_app._get_current_object() 14 | msg = Message(app.config['FACTBOUNTY_MAIL_SUBJECT_PREFIX'] + subject, 15 | sender=app.config['FACTBOUNTY_MAIL_SENDER'], recipients=[to]) 16 | msg.body = body 17 | thr = Thread(target=send_async_email, args=[app, msg]) 18 | thr.start() 19 | return thr 20 | -------------------------------------------------------------------------------- /fact-bounty-flask/.gcloudignore: -------------------------------------------------------------------------------- 1 | # This file specifies files that are *not* uploaded to Google Cloud Platform 2 | # using gcloud. It follows the same syntax as .gitignore, with the addition of 3 | # "#!include" directives (which insert the entries of the given .gitignore-style 4 | # file at that point). 5 | # 6 | # For more information, run: 7 | # $ gcloud topic gcloudignore 8 | # 9 | .gcloudignore 10 | # If you would like to upload your .git directory, .gitignore file or files 11 | # from your .gitignore file, remove the corresponding line 12 | # below: 13 | .git 14 | .gitignore 15 | 16 | # Python pycache: 17 | __pycache__/ 18 | # Ignored by the build system 19 | /setup.cfg -------------------------------------------------------------------------------- /fact-bounty-client/src/components/ContactUsForm/style.sass: -------------------------------------------------------------------------------- 1 | @import '../../styles/variables.sass' 2 | 3 | .contact-us-form-container 4 | margin: 150px 0px 0px 0px 5 | display:flex 6 | flex-direction:column 7 | text-align: center 8 | form 9 | display: flex 10 | flex-direction: column 11 | justify-content: center 12 | margin: 30px 10px 20px 10px 13 | input, textarea 14 | z-index: 1 15 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .1) 16 | border: none 17 | border-radius: 3px 18 | padding: 10px 19 | margin: 20px 15% 0px 15% 20 | resize: none 21 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/notFound/index.css: -------------------------------------------------------------------------------- 1 | .notFoundContainer { 2 | display: flex; 3 | justify-content: center; 4 | background: linear-gradient(to bottom, #1d858a 0%, #1baeb8 4%, #13d4e2 100%); 5 | } 6 | 7 | .notFoundContainer div { 8 | margin: 4em; 9 | } 10 | 11 | .notFoundImg { 12 | height: 20%; 13 | width: 20%; 14 | } 15 | 16 | .notFoundSpan { 17 | color: #ffe600; 18 | font-size: 3.5em; 19 | margin: 20px; 20 | } 21 | 22 | .notFoundSpan1 { 23 | color: #ffe600; 24 | font-size: 2em; 25 | margin: 20px; 26 | } 27 | 28 | .notFoundSpan2 { 29 | color: #ffe600; 30 | font-size: 1.3em; 31 | margin: 20px; 32 | } 33 | -------------------------------------------------------------------------------- /.idea/fact-Bounty.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /fact-bounty-client/src/styles/theme.js: -------------------------------------------------------------------------------- 1 | import { createMuiTheme } from '@material-ui/core/styles' 2 | 3 | const theme = createMuiTheme({ 4 | palette: { 5 | primary: { 6 | main: '#1564c0' 7 | }, 8 | secondary: { 9 | main: '#FDA907' 10 | } 11 | }, 12 | typography: { 13 | fontFamily: [ 14 | '-apple-system', 15 | 'BlinkMacSystemFont', 16 | 'Segoe UI', 17 | 'Roboto', 18 | 'Helvetica Neue', 19 | 'Arial', 20 | 'sans-serif', 21 | 'Apple Color Emoji', 22 | 'Segoe UI Emoji', 23 | 'Segoe UI Symbol' 24 | ].join(','), 25 | useNextVariants: true 26 | } 27 | }) 28 | 29 | export default theme 30 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/AsyncViewWrapper/AsyncViewWrapper.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import PropTypes from 'prop-types' 3 | import CircularProgress from '@material-ui/core/CircularProgress' 4 | import './style.sass' 5 | 6 | const AsyncViewWrapper = ({ loading, children }) => { 7 | return ( 8 |
9 | {loading ? ( 10 |
11 | 12 |
13 | ) : ( 14 | children 15 | )} 16 |
17 | ) 18 | } 19 | 20 | AsyncViewWrapper.propTypes = { 21 | loading: PropTypes.bool, 22 | children: PropTypes.node 23 | } 24 | 25 | export default AsyncViewWrapper 26 | -------------------------------------------------------------------------------- /Crawlers/news_sites/items.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Define here the models for your scraped items 4 | # 5 | # See documentation in: 6 | # https://doc.scrapy.org/en/latest/topics/items.html 7 | 8 | import scrapy 9 | 10 | 11 | class NewsSitesItem(scrapy.Item): 12 | # define the fields for your item here like: 13 | # name = scrapy.Field() 14 | title = scrapy.Field() 15 | author = scrapy.Field() 16 | content = scrapy.Field() 17 | date = scrapy.Field() 18 | imageLink = scrapy.Field() 19 | source = scrapy.Field() 20 | approved_count = scrapy.Field() 21 | fake_count = scrapy.Field() 22 | mixedvote_count = scrapy.Field() 23 | news_url = scrapy.Field() 24 | -------------------------------------------------------------------------------- /fact-bounty-flask/docs/stories/get_by_id.yml: -------------------------------------------------------------------------------- 1 | Update vote-count 2 | --- 3 | tags: 4 | - Stories 5 | produces: 6 | - "application/json" 7 | parameters: 8 | - in: path 9 | name: id 10 | responses: 11 | 200: 12 | description: JSON object containing success message 13 | schema: 14 | type: object 15 | properties: 16 | message: 17 | type: string 18 | example: Story fetched successfully 19 | 404: 20 | description: JSON object containing error message 21 | schema: 22 | type: object 23 | properties: 24 | message: 25 | type: string 26 | example: Please provide correct story id. 27 | 28 | 29 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/OAuthContainer/OAuthContainer.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import PropTypes from 'prop-types' 3 | import FacebookContainer from './FacebookContainer' 4 | import GoogleContainer from './GoogleContainer' 5 | import './index.scss' 6 | 7 | class OAuthContainer extends Component { 8 | render() { 9 | return ( 10 |
11 | 12 | 13 |
14 | ) 15 | } 16 | } 17 | 18 | OAuthContainer.propTypes = { 19 | button_type: PropTypes.string 20 | } 21 | 22 | export default OAuthContainer 23 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/notFound/NotFound.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import spider from '../spider.svg' 3 | import '../styles/index.css' 4 | 5 | const NotFound = () => { 6 | return ( 7 |
8 |
9 | 404 10 |
11 | 404 12 |
13 | We have crawled everywhere, 14 |
15 | but that seems to be lost. 16 |
17 |
18 |
19 | ) 20 | } 21 | 22 | export default NotFound 23 | -------------------------------------------------------------------------------- /fact-bounty-client/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/reducers/authReducers.js: -------------------------------------------------------------------------------- 1 | import { SET_CURRENT_USER, USER_LOADING } from '../actions/actionTypes' 2 | 3 | // eslint-disable-next-line prettier/prettier 4 | const isEmpty = require('is-empty') 5 | const initialState = { 6 | isAuthenticated: false, 7 | user: {}, 8 | loading: false 9 | } 10 | 11 | export default function(state = initialState, action) { 12 | switch (action.type) { 13 | case SET_CURRENT_USER: 14 | return { 15 | ...state, 16 | isAuthenticated: !isEmpty(action.payload), 17 | user: action.payload 18 | } 19 | case USER_LOADING: 20 | return { 21 | ...state, 22 | loading: true 23 | } 24 | default: 25 | return state 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /fact-bounty-flask/.idea/fact-bounty-flask.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 19 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please provide enough information so that others can review your pull request: 2 | 3 | 4 | 5 | Explain the **details** for making this change. What existing problem does the pull request solve? 6 | 7 | 8 | 9 | **Test plan (required)** 10 | 11 | Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. 12 | 13 | 14 | **Code formatting** 15 | 16 | 17 | **Closing issues** 18 | 19 | Put `closes #XXXX` in your comment and commit message to auto-close the issue that your PR fixes (if such). -------------------------------------------------------------------------------- /fact-bounty-client/src/components/PrivateRoute/PrivateRoute.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Redirect, Route } from 'react-router-dom' 3 | import { connect } from 'react-redux' 4 | import PropTypes from 'prop-types' 5 | 6 | const PrivateRoute = ({ component: Component, auth, ...rest }) => ( 7 | 10 | auth.isAuthenticated === true ? ( 11 | 12 | ) : ( 13 | 14 | ) 15 | } 16 | /> 17 | ) 18 | 19 | PrivateRoute.propTypes = { 20 | auth: PropTypes.object.isRequired, 21 | component: PropTypes.any 22 | } 23 | 24 | const mapStateToProps = state => ({ 25 | auth: state.auth 26 | }) 27 | 28 | export default connect(mapStateToProps)(PrivateRoute) 29 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/PostDetailView/style.sass: -------------------------------------------------------------------------------- 1 | @import '../../styles/variables.sass' 2 | 3 | .post-detail-view-wrapper 4 | .header 5 | display: flex 6 | margin-top: 20px 7 | justify-content: space-between 8 | align-items: center 9 | .left 10 | flex: 3.5 11 | .right 12 | text-align: right 13 | flex: 1 14 | .info 15 | label 16 | margin: 3px 17 | a 18 | margin-left: 5px 19 | .hr 20 | margin-bottom: 20px 21 | .image 22 | text-align: center 23 | margin-bottom: 20px 24 | position: relative 25 | img 26 | width: 100% 27 | .content 28 | text-align: justify 29 | margin-bottom: 40px 30 | .votes-bar-section 31 | margin: 20px 0px 20px 0px 32 | .vote-buttons-container 33 | opacity: 1 34 | -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/actions/contactUsActions.js: -------------------------------------------------------------------------------- 1 | import { 2 | START_CONTACT_FORM_SUBMIT, 3 | CONTACT_FORM_SUBMIT_SUCCESS, 4 | CONTACT_FORM_SUBMIT_FAIL 5 | } from './actionTypes' 6 | import ContactUsService from '../../services/ContactUsService' 7 | 8 | export const submitForm = ( 9 | name, 10 | email, 11 | phone, 12 | subject, 13 | message 14 | ) => dispatch => { 15 | dispatch({ type: START_CONTACT_FORM_SUBMIT }) 16 | ContactUsService.contactUsSubmit(name, email, phone, subject, message) 17 | .then(res => { 18 | console.log(res) 19 | dispatch({ type: CONTACT_FORM_SUBMIT_SUCCESS }) 20 | }) 21 | .catch(err => { 22 | dispatch({ type: CONTACT_FORM_SUBMIT_FAIL, payload: err }) 23 | console.error('Server response invalid:', err) 24 | }) 25 | } 26 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Search/style.sass: -------------------------------------------------------------------------------- 1 | .search-wrapper 2 | .header 3 | padding: 20px 0px 10px 0px 4 | display: flex 5 | justify-content: space-between 6 | align-items: center 7 | input 8 | width: 300px; 9 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .1) 10 | border: none 11 | border-radius: 3px 12 | padding: 10px 13 | .hr 14 | margin-bottom: 40px 15 | .search-form-container 16 | text-align: center 17 | form 18 | display: flex 19 | flex-direction: row 20 | input 21 | z-index: 1 22 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .1) 23 | border: none 24 | border-radius: 3px 25 | padding: 12px 26 | resize: none 27 | width: 500px 28 | margin-right: 15px -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/Tweets/Tweets.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component, Fragment } from 'react' 2 | import './style.sass' 3 | import TweetList from '../../components/TweetList' 4 | 5 | class Tweets extends Component { 6 | render() { 7 | return ( 8 | 9 |
10 |
11 |

Tweets

12 |
13 |
14 | 15 | 16 | 17 | 18 |
19 |
20 | ) 21 | } 22 | } 23 | 24 | Tweets.propTypes = {} 25 | 26 | export default Tweets 27 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/TweetSearch/style.sass: -------------------------------------------------------------------------------- 1 | .search-wrapper 2 | .header 3 | padding: 20px 0px 10px 0px 4 | display: flex 5 | justify-content: space-between 6 | align-items: center 7 | input 8 | width: 300px; 9 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .1) 10 | border: none 11 | border-radius: 3px 12 | padding: 10px 13 | .hr 14 | margin-bottom: 40px 15 | .search-form-container 16 | text-align: center 17 | form 18 | display: flex 19 | flex-direction: row 20 | input 21 | z-index: 1 22 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .1) 23 | border: none 24 | border-radius: 3px 25 | padding: 12px 26 | resize: none 27 | width: 500px 28 | margin-right: 15px -------------------------------------------------------------------------------- /fact-bounty-client/src/redux/reducers/contactUsReducers.js: -------------------------------------------------------------------------------- 1 | import { 2 | START_CONTACT_FORM_SUBMIT, 3 | CONTACT_FORM_SUBMIT_SUCCESS, 4 | CONTACT_FORM_SUBMIT_FAIL 5 | } from '../actions/actionTypes' 6 | 7 | const initialState = { 8 | loading: false, 9 | error: null 10 | } 11 | 12 | export default function(state = initialState, action) { 13 | switch (action.type) { 14 | case START_CONTACT_FORM_SUBMIT: 15 | return { 16 | ...state, 17 | loading: true 18 | } 19 | case CONTACT_FORM_SUBMIT_SUCCESS: 20 | return { 21 | ...state, 22 | loading: false 23 | } 24 | case CONTACT_FORM_SUBMIT_FAIL: 25 | return { 26 | ...state, 27 | loading: false, 28 | error: action.payload 29 | } 30 | default: 31 | return state 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /fact-bounty-flask/migrations/versions/8be924798f34_.py: -------------------------------------------------------------------------------- 1 | """empty message 2 | 3 | Revision ID: 8be924798f34 4 | Revises: 28906f0ff936 5 | Create Date: 2020-03-09 13:46:18.009784 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "8be924798f34" 14 | down_revision = "28906f0ff936" 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.add_column( 22 | "user", sa.Column("role", sa.String(length=10), nullable=True) 23 | ) 24 | # ### end Alembic commands ### 25 | 26 | 27 | def downgrade(): 28 | # ### commands auto generated by Alembic - please adjust! ### 29 | op.drop_column("user", "role") 30 | # ### end Alembic commands ### 31 | -------------------------------------------------------------------------------- /fact-bounty-client/src/components/VotesBar/style.sass: -------------------------------------------------------------------------------- 1 | @import '../../styles/variables.sass' 2 | 3 | .votes-bar-container 4 | .vote-status 5 | height: 18px 6 | transition: 0.2s ease 7 | display: flex 8 | position: relative 9 | .votes 10 | display: flex 11 | justify-content: center 12 | align-items: center 13 | transition: 0.2s ease 14 | opacity: 1 15 | .true-votes 16 | background-color: $true-color 17 | .fake-votes 18 | background-color: $fake-color 19 | .mix-votes 20 | background-color: $mix-color 21 | .vote-value 22 | font-size: 0.8rem 23 | font-weight: 600 24 | color: #fafafa 25 | opacity: 1 26 | transition: 0.2s ease 27 | -------------------------------------------------------------------------------- /fact-bounty-client/src/pages/KibanaDashboard/Search.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component, Fragment } from 'react' 2 | import { 3 | KIBANA_DEV_DASHBOARD, 4 | KIBANA_PROD_DASHBOARD 5 | } from '../../constants/KibanaConstants' 6 | import './style.sass' 7 | 8 | class KibanaDashboard extends Component { 9 | render() { 10 | return ( 11 | 12 |
13 |
14 |

Visualizations

15 |
16 |
17 |