Giter Site home page Giter Site logo

aristotleh / vibecheck-mirror Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 31.38 MB

Team-built sentiment analysis search engine accessed through a web application. Built with React, Flask, and MySQL. Mirrored version of repository.

Python 31.31% HTML 3.49% CSS 2.85% JavaScript 62.36%

vibecheck-mirror's Introduction

VIBECHECK

Requirements:

Make sure to have installed Yarn before proceeding

To do this:

Run brew install yarn,

Run choco install yarn,

or visit https://classic.yarnpkg.com/en/docs/install/#windows-stable

There are two parts to this repository: a React web app in /vibecheck-client and a Flask web server in /vibecheck-server.

MySQL Database

By default, the Flask server is set up to work with a database that's locally hosted and accessed with a passwordless root account. If you'd like to change this, edit the URI that is assigned to app.config['SQLALCHEMY_DATABASE_URI'] in station.py.

Additionally, you can add a password to the root account if you'd like. Just keep in mind that you'll have to add :[PASSWORD] after the username in the MySQL URI.

First, install MySQL on your computer if you don't have it.

macOS: brew install mysql Windows: choco install mysql

Both of these sources set the root account of the locally-hosted MySQL server to be passwordless by default.

Now, start up a local MySQL server with mysql.server start or "C:\Program Files\MySQL\MySQL Server 5.7\bin\vibecheck_db" if using Powershell. On the first run of this server, you'll need to follow some extra steps. Otherwise, you're done! You can stop the server with mysql.server stop or move forward with starting the Flask server.

If this is the first time the MySQL server's been run, you'll want to run mysql -u root to access the MySQL monitor. Then, run the instruction CREATE DATABASE vibecheck_db;, semicolon and upper/lower case included.

Now that the database has been created, run exit. The server will still be runnning and you can now start the Flask server.

Web Server

First, cd into vibecheck/vibecheck-server; then set up the Python virtual environment with python3 -m venv venv.

Then, launch the virtual environment:

For Mac: source venv/bin/activate

For Windows: source venv/Scripts/activate (Git Bash) or .\venv\Scripts\activate (cmd)

While the venv is active, run pip install -r requirements.txt and to get the required NLTK modules run python -m nltk.downloader stopwords punkt averaged_perceptron_tagger

Run pip install python-dotenv to include the .flaskenv/.env files.

You should also set the environmental variable FLASK_APP to station.py

export FLASK_APP=station.py (in Bash) $env:FLASK_APP = "station.py" (in Powershell)

Run yarn start-api to start flask localhost on Windows
Run yarn start-api-m to start flask localhost on Mac

If you need to add a new dependency, run pip install [module] and then run pip freeze > requirements.txt.

React App

In a new terminal window:

To be able to run the React web app, you need to have npm installed (included with Node.js).

First, cd into vibecheck/vibecheck-client.

Run npm install.

Then, run yarn start to start the react localhost.

If you need to add a new dependency, run npm install [module] --save

API Limits

A number of the APIs used in this project have limits on daily use because of the user tier we're currently using. This especially applies to Reddit search, which utilizes the Google Search API upon every request. This can be helped by changing the API key to one associated with a developer account with more access, but this would cost money. Upon a proper product release, this would be trivial, but the current behavior is suitable for the class project and is free. If too many searches are made in one day, for Reddit especially, a search might not complete, but the application otherwise works as intended. This behavior will not occur upon the use of developer accounts with billing.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.