Club Hub seeks to provoide University of Toronto students with convenient access to events on campus. The application is composed of a NextJS frontend and a Flask backend as part of a Software Engineering course (ECE444) taken at the University of Toronto.
- Ensure you are using a modern version of Node.js
node -v
should be at least 18.X - Install
pnpm
vianpm install -g pnpm
Install required backages with:
pnpm install
Create a python virtual environment with:
python3 -m venv venv
Activate the virtual environment with:
Mac/Linux: source venv/bin/activate
Windows: venv\Scripts\activate
Install required python packages with:
pip install -r api/requirements.txt
Setup your env variables:
cp .env.template .env
Fill this with your credentials from supabase also message @Joshua-Pow for the MapBox token
source .env
Then, run the frontend and backend together with:
pnpm run dev
Or to run just the backend:
pnpm run flask-dev
Or to run just the frontend:
pnpm run next-dev
Open http://localhost:3000 with your browser to see the result.
The Backened runs on http://localhost:5328/api/
To see Backend documentation go to http://localhost:5328
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To add a python package you need to make sure to add it to the requirements.txt file
pip freeze > requirements.txt
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
- App deployment is setup using Vercel
- On merge to main your changes will be automatically deployed to https://club-hub.vercel.app
This project uses Pytest for testing the backend and jest for testing the frontend. To run the test suite, run the following command:
pnpm test
You will need to have TEST_EMAIL
and TEST_PASSWORD
set in your .env
file to run the tests. These are the credentials for a test user that is used for authorizating testing of the backend.