Co-op MMR is a place for University of Waterloo students to look up and compare co-op jobs.
In the backend, all backend endpoints are implemented in server/src/app.py
. All queries are implemented in server/src/queries.py
, and are executed using functions in server/src/drivers.py
.
- Browse Jobs page (Feature 6 in the report)
- Frontend:
web/src/Jobs.js
- Endpoint:
GET /jobs
- Frontend:
- Browse Companies page (Feature 1 in the report)
- Frontend:
web/src/Companies.js
- Endpoint:
GET /companies
- Frontend:
- Viewing a company's job listings (Feature 3 in the report)
- Frontend:
web/src/Company.js
- Endpoint:
GET /companies/:cid
- Frontend:
- Viewing a company's hire breakdowns by work term (Feature 4 in the report)
- Frontend:
web/src/Company.js
- Endpoint:
GET /companies/:cid
- Frontend:
- Viewing job details and reviews, hiring breakdowns by work term (Features 5, 7, 11 in the report)
- Frontend:
web/src/Job.js
- Endpoint:
GET /jobs/:jid
- Frontend:
- Leaving a review for a job (Features 12, 13 in the report)
- Frontend:
web/src/Job.js
- Endpoint:
POST /jobs/:jid/review
- Frontend:
- MMR (Feature 14 in the report)
- MMR Calculations:
sql_scripts/linkedin_scraper.py
- Endpoints that include MMR:
GET /companies
,GET /companies/:cid
,GET /jobs
,GET /jobs/:jid
- MMR Calculations:
- Ensure all required dependencies have been installed by running
pip install -r sql_scripts/requirements.txt
. - Run
sql_scripts/linkedin_scraper.py
. It should take less than two hours for the script to run. The scraped data is stored in thesql_scripts/data
folder. - To populate the database using Docker, follow Quick Start with Docker. To populate a local database, execute the following steps.
- Go to the
sql_scripts
directory. - Run
mysql -u root appDB < ./create_tables.sql
to drop existing table schemas and to create new ones. - Run
mysql -u root appDB < ./populate_tables.sql
to populate the tables with production data.
This is the quickest and easiest way to get everything set up – all you need to install is Docker.
Unfortunately, Docker does not run on all systems. Follow Getting Started without Docker if you cannot install Docker.
Warning: If you pull this code on Windows, you will need to manually convert the
sql_scripts/data/*.tsv
files to have LF endings instead of CRLF.
- Run
docker compose up
. - Visit http://localhost:5000/companies and http://localhost:5000/jobs to see some endpoints in action.
- Visit http://localhost:3000/ to see the demo frontend in action.
To look into the database, visit http://localhost:8080/?server=db&username=root&db=coop_mmr to check out the DB in Adminer. When prompted for a login, use the username root
and password ThankMrGoose
.
- Go to the
web
folder. - Run
npm install
to install dependencies. - Run
npm start
.
- Make sure local Python version >= 3.8.
- Go to the
server
folder. - Optional, but recommended: Set up and activate a Python virtual envrionment.
- Run
pip install -r requirements.txt
to install dependencies. - Go to the
src
folder insideserver
. - Set the environment variables outlined in Web Server Configuration.
- Run
python -m flask run --port=5000
.
Variable | Description | Example Value |
---|---|---|
DB_HOST | the database host | localhost |
DB_USER | the user to connect with | root |
DB_PASSWORD | the password for DB_USER |
ThankMrGoose |
DB_DATABASE | the database containing the Co-op MMR tables | appDB |