Official platform for club discovery, recruitment, and events at Penn. React/Next.js frontend and Django-based REST API.
You will need to start both the backend and the frontend to develop on Penn Clubs. Clubs supports Mac and Linux/WSL development.
Questions? Check out our extended guide for FAQs.
Running the backend requires uv running Python 3.13.
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
Setting up psycopg2 on Mac (this is necessary if you want to be able to modify
dependencies, you can revisit later if not)
$ brew install postgresql$ brew install openssl$ brew unlink openssl && brew link openssl --force$ echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> ~/.zshrc$ export LDFLAGS="-L/usr/local/opt/openssl@3/lib"$ export CPPFLAGS="-I/usr/local/opt/openssl@3/include"
Now, you can run
$ sudo add-apt-repository ppa:deadsnakes/ppa && sudo apt-get update && sudo apt-get install gcc python3.13-dev libpq-devfor necessary Python package build dependencies (Linux only)$ uv syncto install Python dependencies. This may take a few minutes. If you skipped installingpsycopg2earlier, you might see an error with locking -- this is expected!$ uv run pre-commit install$ uv run ./manage.py migrate$ uv run ./manage.py populate(in development, to populate the database with dummy data)$ uv run ./manage.py runserver
Use $ uv run ./manage.py test to run unit tests.
Running the frontend requires Node.js and Bun.
Please ensure you are using Node 20. Our codebase does not support other versions of Node (v20.11.1 is stable).
You will need to set the following environment variables on the frontend in production:
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
bun installin the project directory. - Run application using
bun 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.
To test ticketing locally, you will need to install mkcert, enter the frontend directory, and run the following commands:
$ mkcert -install$ mkcert localhost 127.0.0.1 ::1$ export DOMAIN=https://localhost:3001 NODE_TLS_REJECT_UNAUTHORIZED=0
Then, after the frontend is running, run bun run ssl-proxy in a new terminal window and access the application at https://localhost:3001.