Platform to like and comment on user events.
Database: MySQL Backend: Flask (python3) Frontend: ReactJS Other: Data supplied through GitHub API
Welcome! This is a short introductory CS project designed to help you learn full-stack fundamentals in under 20 hours. As a high level overview, this project is meant to be a copy of GitHub, except that you can view, like, and comment on user activity.
Currently, the only functionality is to view and like activity. The first task will be to add the functionality to add comments. Along any step of the way if you have questions, please ask!!! This is the first time that this project has been implemented, so I anticipate there may be a couple of bumps along the way.
-
Fork the repository and clone it to your desktop. Click "Fork" in the upper right corner. Then, on your own repository, click the green "clone" button on the upper right of the repository. Copy the link, and in terminal enter
git clone <link>
in your desired directory. -
Navigate into the repository. (
cd github-social
) -
Create a virtual environment and activate it.
python3 -m venv venv
. venv/bin/activate
You will know if this is successful if the terminal command is prepended by (venv)
.
-
Install the required dependencies.
pip install -r requirements.txt
-
Start the python server, enter
python3 run.py
. If there are no errors, you should see a number of lines, including this one:
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Then, you can enter http://127.0.0.1:5000/
(your link may be different) into your browser URL to view the platform.
I recommend you open it on incognito (to prevent caching where the display doesn't reflect current changes). Then, upon making changes on the frontend, you should use a hard reload instead (cmd
+ shift
+ r
)
-
Open a new terminal window (
ctrl
+t
) -- This should be in the same directory -
Navigate to the frontend files (
cd templates/static
) -
Install frontend dependencies (
npm install
) -
Run this command so that the frontend updates automatically (
npm run watch
).
You may need to install several dependencies such as python3. You may also need to install libraries such as node, which you can install via HomeBrew.
If you closed the program and need to reopen it, follow these steps:
-
Navigate to the repository. (
cd github-social
) -
Activate the python virtual environment. (
. venv/bin/activate
) -
Start the python server, enter
python3 run.py
. -
Open a new terminal window (
ctrl
+t
) -- This should be in the same directory -
Navigate to the frontend files (
cd templates/static
) -
Run this command so that the frontend updates automatically (
npm run watch
).