Skip to content

TigerAppsOrg/TigerPath

Repository files navigation

TigerPath

TigerPath is a web app that helps Princeton University students plan out their four-year course schedules. It began as a COS 333 project by Richard Chu, Barak Nehoran, Adeniji Ogunlana, and Daniel Leung.

You can visit TigerPath at tigerpath.io.

To learn about contributing to TigerPath, take a look at the contributing guidelines.

Running locally

Initial setup

Python environment

  1. Create a new conda environment: conda create -n tigerpath
  2. Activate the conda environment: conda activate tigerpath
  3. Install python: conda install python=3.9
  4. Clone this repo and cd into the base TigerPath directory
  5. Install dependencies: pip install -r requirements.txt
  6. Run conda list to validate that all packages in requirements.txt were installed
  7. Set all environment variables:
    • Login to Heroku and go to the Settings tab for the tigerpath333-dev app (do NOT use prod!)
    • Reveal Config Vars
    • For each Config Var key-value pair, create a local environment variable: conda env config vars set key=value (replace key and value with the actual key and value)
    • After setting all env vars, reactivate your conda environment: conda activate tigerpath
    • Note that for SECRET_KEY, you might get an error so you can set its value to 1
  8. Run conda env config vars list to validate all env vars were set

Node packages

  1. Run cd frontend && npm install to install all required frontend packages

Running the dev server

After following the initial setup steps above, you can run the local development server:

  1. Activate your environment: conda activate tigerpath
  2. Run the backend server: python manage.py runserver
  3. Run the frontend server in a separate terminal window: cd frontend && npm start
    • Visit http://localhost:8000/ to verify the server is up and running

Other important things

Make migrations and update database

You can do this by running the following commands:

python manage.py makemigrations                             # Makes migrations based on models.py
python manage.py migrate                                    # Migrates the database

Custom django-admin commands

python manage.py tigerpath_get_courses                      # Scrapes courses and puts them in the database

Load static data

To load the major mappings fixture, which populates the major table in the database, run the following command:

python manage.py loaddata major_mappings

About

Four-year course planner for Princeton University students

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published