D5. Code

cReddit Hours Repository

Description of application

The cReddit Hours project is web-based application that provides the users the overall sentiment analysis of the UNC subreddit community based on the sentiment analysis per post.

How to use

To use this application, the client must have Python 3.9 installed and ready to use.

Go to the repository, click the green “Code” button (where you can clone the repository), and copy the HTTPS link to use for when cloning. In your terminal, go to your directory where you wish to clone the repository and run the command:

git clone https://github.com/COMP523-Team-O/demo.git

After doing so, you should see the code appear in your environment. Once accessed, open another terminal and make sure you are in the backend directory of the application. If you are in the demo directory, you can go into the backend directory by doing:

cd backend

After going to the backend, you will need to run a virtual environment to install all of the dependencies. To do this, you can run:

python -m venv venv

inside of the same terminal. To activate this environment, you can run:

source venv/bin/activate

Once inside of your virtual environment, run the following command within the same terminal to install all of the dependencies:

pip install fastapi uvicorn praw nltk

After installing all of the dependencies, run the following command to open the backend server:

uvicorn main:app - - reload


After this runs, open up a new terminal within the application directory, and go to the subreddit-app directory:

cd subreddit-app

Once you are in this directory, run:

npm install

to install all of the packages for the frontend, and then to start the application run:

npm start