Hey Munchers, this is the Bruin Glutton website! We aim to make UCLA's dining menu clearer, easier to access, and better! With the final pursue to allow fellow food lovers to truly find and navigate through the number one dining hall in America.
To get a copy of backend running locally on your machine, you'll need python with a version >= 3.13. To get a copy of frontend running locally on your machine, you'll need node.js.
If you are unsure, check your python by these command
python -v
npm -v
If you see a version return, make sure it's the correct version, if not, install using the following link. Download Python Here Download Node Here
First, clone the project with git, and install dependencies.
git clone https://github.com/ChococupC/bruin-glutton.git
cd bruin-glutton
Then, we are going to create and activate the virtual environment
# goes into backend
cd backend
# Window 💻
python -m venv .venv
.venv/Scripts/activate
# Mac 🍎 & Linux 🐧
python3 -m venv .venv
source .venv/bin/activate
Now infront of your terminal, you will see a (.venv) that means you are now under the correct environment.
now we are going to install poetry and our dependencies
# Install poetry
pip install poetry
# Install dependencies
poetry install
Now your dependencies are all installed!
Last step is to set up the .env file. Please refer to .env.example for the format of your .env file KEYS and DATABASE information will be stored in the project docs. If you can't access the docs, please contact to get that information!
Do:
uvicorn main:app --reload
# INFO: Started server process [10844]
# INFO: Waiting for application startup.
# INFO: Application startup complete.
# INFO: Uvicorn running on https://localhost:8000 (Press CTRL+C to quit)
Your site will be running locally at https://localhost:8000. You may also visit the server address line in your browser.
DEV READ THIS To better access the api after your url insert /docs. (ex: https://localhost:8000/docs) This is a fastapi build-in page.
After your files have been setup, you can now reboot the site with simply two command.
# activate virtual environment
# Window 💻
.venv/Scripts/activate
# Mac 🍎 & Linux 🐧
source .venv/bin/activate
# start server
uvicorn main:app --reloadMake sure Node.js is installed. Make sure to run the following command once to install all dependencies:
npm installTo locally run the website, run these commands in your terminal:
cd frontend
npm run devThe website will then be running locally at http://localhost:5173/
To set up the FRONTEND Virtual Environment, make sure you check for your node Setup
now we are going to add our dependencies
# go into frontend
cd frontend
# Install package
npm install
Do:
npm run dev
# ➜ Local: http://localhost:5173/
# ➜ Network: use --host to expose
# ➜ press h + enter to show helpNow you will have the website running!
To make a change to the website, follow these steps:
- Either make a new branch or a fork of this repository.
masteris a protected branch, so don't push to it. - Make your changes!
- Before you push, make sure your app builds with
bundle exec jekyll build. If there are any errors, our CI/CD service will reject your build. - Once you're ready, stage and commit your changes!
If any error or trouble comes up, whether with tools or during build, or just want something to improve, please contact me:
Email: Qiaokebei123@ucla.edu