GatorGuide documentation
An app for building your UF Schedule!
Intro
This project heavily utilizes SQLModel and SQL in general, but ideally (through the DB_Engine class) you should have all of that fully obfuscated!!
Users of this (which should primarily be the backend of the project) should instantiate one (1) object of the class DB_Engine class (having several within one program may lead to concurrency issues).
If there are things you would like from this object that do not yet exist, add a git issue (or solve it yourself if you want to join as a maintainer).
This project is very much open source, and we support, appreciate, and ask for anyone to provide their skills on this project!!!
Environment
Important
Must have Python and Node/NPM installed!!!
Install python dependencies
python -m venv .venv
./.venv/Scipts/Activate
pip install -e ./backend
Important
If you are building the docs, don’t forget to pip install -r requirements.dev.txt!!!!
Install Node dependencies
cd frontend
npm install .
- Environment files
- Create a .env file in
/frontend VITE_API_HOST={full_url_to_backend}
- Create a .env file in
Building
Build the DB
cd backend/src/GatorGuide/database
python build_db.py
Build the frontend
cd frontend
npm run build
Build the docs
cd backend/docs
./make.bat html
Important
This will create an index.html file in the docs/build directory, serve this!!
Running
Dev Mode
Start frontend server
cd frontend
npm run start
Start backend server
./.venv/scripts/Activate
cd backend/src/GatorGuide/api
fastapi dev --port {port} main.py
Production Mode
./.venv/scripts/Activate
cd backend/src/GatorGuide/api
fastapi run --port {port} main.py
Usage
The items in this database are pydantic models, this provides a lot of functionality but most will not be needed.
Use the
DB_Engineto read the Courses/MajorOr create your own the same way you would a normal object
Use these objects as you would normally
When done working with them, save them with
DB_Engine.write()Or delete them with
DB_Engine.delete()
Note
You can use the .model_dump() method provided by pydantic to convert any of these DB objects to JSON
Guides
Classes
Endpoints
Libraries