yoink/ contains the scraping + structuring pipeline that feeds the frontend. Below is the workflow for keeping the data fresh.
tip: hi friend, if you're cloning the repo and playing around you DON'T need to run anything in yoink. The structured data is already committed, you can skip steps 1-4 and simply build the frontend and run the backend.
cd yoink
python3 -m venv venv
source venv/bin/activate
pip install google-genai requests beautifulsoup4Place your Gemini API key (plaintext) in yoink/key.
cd yoink
python fetch_courses.pyThis writes raw department JSON files into yoink/courses/.
cd yoink
source venv/bin/activate
python structure_courses.pyThe script:
- Reads every file under
yoink/courses/ - Parses deterministic fields (id, name, description, credits, rawRequirements)
- Calls Gemini Flash in batches to interpret prerequisite logic
- Writes structured department files to
yoink/structuredCourses/
Notes:
- This script takes awhile! I recommend running it in the background in something like a
tmuxsession. - Running the LLM pipeline myself, I burned ~$2.5 in Gemini API credits, just an fyi.
structure_courses_ollama.py is a drop-in replacement that runs the same
parsing on a locally hosted open-weight model via Ollama
— no API key, no cost. It was tuned for a 4 GB GPU (GTX 1650). The selected
model is qwen3:4b (see yoink/OLLAMA_MIGRATION.md for the full model
comparison and rationale).
# one-time: install ollama, then pull the model
ollama pull qwen3:4b
cd yoink
# whole catalog -> yoink/structuredCourses_ollama/ (keeps the Gemini output intact)
python3 structure_courses_ollama.py --model qwen3:4b --think off
# or write straight into the canonical dir consumed by the backend:
python3 structure_courses_ollama.py --model qwen3:4b --think off --out-dir structuredCourses- No extra Python deps (stdlib only); requires a running Ollama on
localhost:11434. - Full catalog (~6,200 courses, ~1,800 LLM calls) runs in ~30 min fully on-GPU.
--think offis important: reasoning mode is ~50x slower here for no gain.- Evaluate a model against the Gemini baseline with
eval_model.py, and diff two datasets withcompare_datasets.py.
To reprocess just one department (e.g., CSE) without touching the rest:
cd yoink
python structure_courses.py --file cse-computer-science-and-engineering.json
# or, local:
python3 structure_courses_ollama.py --model qwen3:4b --think off --file cse-computer-science-and-engineering.jsonTip: delete the existing structured file before a rerun if you want the course to be re-sent to the LLM.
yoink/structuredCourses/*.json is the canonical, LLM-structured dataset consumed by the frontend. Each course now includes prereqGroups, where each inner array represents an OR group, and AND relationships are captured by separate arrays in sequence.
Minimal API for serving the static course data lives under be/. The repository already includes structured catalogs in be/courseData/, so you can run the backend immediately. If you refresh data via yoink/, remember to restart the server. We just load the JSON files on startup and keep course data in memory for the duration of the application's runtime. Our data is static and minimal, no need for a fancy DBMS.
cd be
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadYou can see API docs at http://localhost:8000/docs
To get the development server runnnig
cd fe
npm install
npm run devTo build a static bundle for deployment
npm run build