Official React-based website for Penn Labs' club directory and events listings. The REST API written in Django for Penn Clubs infrastructure.
You will need to start both the backend and the frontend to do Penn Clubs development.
Questions? Check out our extended guide for FAQs for both Mac and Windows.
Running the backend requires Python 3.
In production, you will need to set the following environment variables:
NEXT_PUBLIC_SITE_NAME(optional, defaults toclubs)SECRET_KEYSENTRY_URLAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_STORAGE_BUCKET_NAMELABS_REDIRECT_URILABS_CLIENT_ID(from Platform)LABS_CLIENT_SECRET(from Platform)
To run the server, cd to the folder where you cloned penn-clubs. Then run:
cd backend$ pipenv installto install Python dependencies. This may take a few minutes.$ pipenv shell$ ./manage.py migrate$ ./manage.py runserver
When installing locally for development, run:
cd backendpipenv install --devto install dependencies./manage.py migrateto create database./manage.py populateto add test data to database./manage.py runserverto run server
Running the frontend requires Node.js and Yarn.
You will need to set the following environment variables on the frontend:
NEXT_PUBLIC_GOOGLE_API_KEYNEXT_PUBLIC_SITE_NAME(Optional)- Specify
clubsto show Penn Clubs andfyhto show Hub@Penn.
- Specify
- Enter the
frontenddirectory with a new terminal window. Don't kill your backend server! - Install dependencies using
yarn installin the project directory. - Run application using
yarn dev. - Access application at http://localhost:3000.
Click Login to log in as a test user. The ./manage.py populate command creates a test user for you with username bfranklin and password test. Go to /api/admin to login to this account.