
You will need the following installed and accessible via the CLI:
First, start by cloning this repo into a directory you can easily get to with your terminal.
git clone https://github.com/jaxcksn/CS3365-MBS.git
then, navigate inside this directory once it's finished cloning:
cd CS3365-MBS
Run the following commands to start the backend (you only have to do this once):
cd ..
cd backend
pip install --no-cache-dir -r requirements.txt
Note: The port must be 5050 to properly connect with the frontend.
First, install the requirements for the frontend (you only have to do this once):
cd ..
cd frontend
npm install
If you don't have these options in your VSCode, trying running git pull
in the root directory (on the main branch).
There are launch configurations built into VSCode to help you run the services faster:
First, open VSCode in the root folder:
Then, press Ctrl + Shift + ` to open the integrated terminal (you can also do View > Terminal), and run the following commands:
cd dev-compose
docker compose up -d
cd ..
After this is finished, open up the Run and Debug symbol by clicking on the icon on the left activity bar:
From the dropdown at the top of the panel that pops out, select "Launch Backend" and click the green run button or press F5:
Once that finishes launching, select "Launch Frontend" from that same dropdown and press the green run button or press F5:
This should launch the frontend in a new chrome window connected to the debugger, where you can login to the program:
Whenever you are done developing, you can stop the processes by going back into the "Run & Debug" tab, opening the "Call Stack" section and clicking the red stop symbol that appear after you hover over the name, you can also just press Shift + F5 twice to stop them:
First, start the database by running the following (from the repo root directory):
cd dev-compose
docker compose up -d
cd ..
Once that is finished, we can start the backend service:
cd backend
fastapi dev server/main.py --port 5050
Now, leaving the backend terminal open, open a new terminal window and navigate to the repo root directory. Then run the following commands:
cd frontend
npm run dev
Then, in your browser go to the following url: http://localhost:5173/
Whenever you're done with developement, just press Ctrl + C in the terminals to stop the processes, and run the following to stop the database:
cd dev-compose
docker compose down
To contribute, first create a branch off the main branch. The name of your branch should match with your Jira task number. For example, if you are creating a branch for task MBS-22 you would name the branch MBS-22-new-feature
git checkout branch -b mbs-<task_number>-<some_description> main
As you make changes, you will do so in your branch and commit to the branch.
Once you think your branch is ready to be merged back into the main branch, you'll want to open up a pull request (PR) for the branch.
Important: To make sure your PR properly links with Jira, the first word of the PR title must be the issue tag i.e. MBS-XX.
When you create a PR, GitHub will automatically start reviewing your code for vulnerabilities & will make sure it builds/lints. You can see the status of the checks in the PR. After checks are complete, message one of the other contributers for a review.
All code must be reviewed by another dev through GitHub, once your changes have been approved, and all conversations resolved on the PR, it will let you press the merge button.
While you are waiting for a code review, you can move your Jira task over to the 'Code Review' lane.
After you press the merge button, your feature goes live! In a few minutes, a build will trigger automatically and upload to the testing environment.