https://sentify-kth.herokuapp.com/
Sentify is an application that provides sentiment analysis based on user-chosen string and geographical area. The string will be able to contain hashtags/words/sentences for which the app will generate sentimental analysis within the chosen geographical area. The user will be able to explore specific countries by looking for information of a certain region, or explore differences between countries if he or she chooses a continent.
Go to this site: https://marvelapp.com/867200h to explore the prototyped app, and press the settings symbol in the top right corner (only certain screens) to display the annotations.
This is the file structure of our project:
~
- contains the/node_modules
setup for the back-end,index.js
which is responsible for making the API calls (implemented to solve the CORS problem)/client
- contains the react application/client/public/index.html
- this is the static html file/client/src/components
- contains all the presentation components that we use in our application/client/src/containers
- includes the container components responsible for fetching and changing the data shown in the presentation components/media
- contains icons and loaders/styles
- contains the css files for our containers and componentsdiscover.js
,my-searches.js
andwelcome.js
correspond to the pages the user can visit, they reference container components
-
Get an account at apps.twitter.com to get a consumer key and consumer secret for twitter API calls.
-
Set twitter key and secret environment variables by adding the following lines to your ~/.bash_profile:
export TW_CONSUMER_KEY=<your key> export TW_CONSUMER_SECRET=<your secret> export TW_TOKEN_KEY=<your key> export TW_TOKEN_SECRET=<your secret>
Restart your shell and make sure that the environment variables are set, for example using this command
echo $TW_CONSUMER_KEY
. -
Make sure that you have node.js installed. To check if you have Node.js installed, run this command in your terminal:
node -v
. -
Make sure that you have Node Package Manager (npm) installed on your system. To confirm that you have npm installed you can run this command in your terminal:
npm -v
. To update your npm, type this into your terminal:npm install npm@latest -g
-
Make sure you have yarn installed on your machine.
npm i yarn -g
. If you need more help: https://yarnpkg.com/lang/en/docs/install/ -
Install nodemon globally:
yarn global add nodemon
. -
Install server dependencies by running
yarn
in home folder. -
Go into the /client directory and run
yarn
to install all the dependencies for the client application. -
Go back to the root folder and run
yarn dev
to start both user client and server. -
It can take a while to build the app. When it's done a tab should pop up and you're good to go! IMPORTANT If you add dependencies, make sure to also add them to package.json. This can be done when installing a package with
yarn add <pkg>
. Make sure to run this command in the correct directory, client/ if you're adding dependencies for the client app and home/ otherwise.