Visit Jobs Board • About • Team • Installation • Documentation
DevSoc is the UNSW Software Development Society. We do not represent the School, Faculty, or University. This website seeks to be a centralised platform for students looking for employment opportunities, but its information has not been officially endorsed by the University, Faculty, School, or the Computer Science and Engineering Society. You should confirm with the employer that any information received through this website is correct.
Jobs Board is the go-to place for CSE students to find student jobs and internships. DevSoc partners with a wide range of top employers to provide you with only the best opportunities to enhance your student experience.
Visit Jobs Board to find out more. If you're curious about our workflow and how we make all of this possible, feel free to look through our Jira and Confluence workspaces. If there's a missing feature you would like to see, please submit a suggestion through this form or even better, contribute to the project yourself by opening an issue and making a pull request.
Jobs Board was made with 🤍 by CSE students, for CSE students. Jobsboard is a team that is part of DevSoc Projects! See TEAM.md for more details on the teams that contributed to the development of Jobsboard!
-
Clone the jobs-board repo.
git clone https://github.com/devsoc-unsw/jobsboard.git -
Download Docker Desktop
-
Set up the neccessary environment variables
-
Frontend (optional): Create a
.env.localfile in thefrontenddirectory with the following contents:NEXT_PUBLIC_API_BASE_URL=http://localhost:8080/The environment variable
NEXT_PUBLIC_API_BASE_URLis used as the base URL for any API requests made by the frontend. If you have the backend running locally, it should use the your local backend instead (http://localhost:8080/). If the backend is not running locally or ifNEXT_PUBLIC_API_BASE_URLis not provided,https://jobsboard.staging.csesoc.unsw.edu.au/apiwill be used as the base URL as a fallback option. -
Backend: Create a
.envfile in thebackenddirectory with the following contents:NODE_ENV=development SERVER_PORT=8080 DB_HOST=localhost DB_PORT=5432 DB_USER=postgres DB_PASSWORD=mysecretpassword DB_NAME=postgres MAIL_USERNAME=test@gmail.com MAIL_PASSWORD=password MAIL_SMTP_SERVER=smtp.gmail.com MAIL_SMTP_SERVER_PORT=465If having
DB_HOST=localhostresult in errors such asECONREFUSED, change it toDB_HOST=db.
-
-
Navigate to the
frontendandbackenddirectories and install the required dependencies by runningyarn
-
Start up the frontend by navigating to the
frontenddirectory and runningyarn dev -
Go to localhost:3000 on your browser to see the frontend running locally!
Without Docker
- After installing PostgreSQL on your computer, open a terminal and run
psql. Now, you should see a command prompt that may look like thismatthewliu=#. - Create a new database called
postgresby runningcreate database postgres;In the future, you can log straight into this database by runningpsql -U postgresin your terminal. - Navigate to the
backenddirectory and runyarn serveto start up the server.
With Docker
- After installing Docker on your computer, open a terminal and run
docker compose buildto build all the containers required for Jobsboard. In the future, you will only need to run eitherdocker compose build apiordocker compose build testas you make changes to them. - Start up the database by running
docker compose up -d dbin your terminal. - Start up the server by running
docker compose up -d apiin your terminal.
Refer to the Using Docker section below if you need more assistance.
Go to localhost:8080 on your browser to see the backend running locally!
API Documentation
After the server is started, you can access the API documentation at localhost:8080/docs.
When adding, modifying or removing routes from backend/src/index.ts, please remember to update the documentation at backend/src/docs/openapi.json accordingly to by following the existing format.
Only use this section if you are working on a function that needs the mail queue initialised. This assumes that you are using Gmail as the test account when trying to send emails.
-
Ensure that your 2-FA for Gmail is enabled.
-
Generate an App Password by following this (Focus on the “Create & Use App Passwords” section).
-
Navigate to the
docker-compose.ymlfile and add this in under the api environment:
NODE_ENV=production
SERVER_PORT=8080
JOBS_BOARD_API_URL=http://127.0.0.1:8080
MAIL_SMTP_SERVER=smtp.gmail.com
MAIL_SMTP_SERVER_PORT=465
MAIL_USERNAME=<REPLACE WITH YOUR EMAIL ADDRESS>
MAIL_PASSWORD=<REPLACE WITH YOUR APP PASSWORD FROM STEP 2>
-
For the frontend, ensure you set the environment variable in
frontend/.envto usehttp://localhost:8080/ -
Navigate to
mail.tsand modify thesecurefield in thetransportOptionsobject config totrueas shown below:
const transportOptions = {
host: process.env.MAIL_SMTP_SERVER,
port: parseInt(process.env.MAIL_SMTP_SERVER_PORT, 10),
secure: true, // SET THIS TO TRUE
auth: {
user: process.env.MAIL_USERNAME,
pass: process.env.MAIL_PASSWORD,
},
requireTLS: true,
};
- Navigate to the root of the project.
- Run
docker compose buildto build all containers ordocker compose build [container-name]for a specific container specified in the compose file. - Run
docker compose upto start all containers ordocker compose up [container-name]for starting a specific container specified in the compose file.To view which containers you would like to build/start, refer to docker-compose.yml
We do not have tests yet... :(
Without Docker
-
Go to
backend/tests/config.jsand setapiUrltohttp://localhost:8080. If this is your first time, rungit update-index --skip-worktree tests/config.jsto prevent git from tracking this file in the future. -
Navigate to the
backenddirectory and run the following commands in your terminalyarn serve yarn test
With Docker Navigate to the root directory and run the following commands in your terminal
docker compose build api
docker compose build test
docker compose up test
Make sure to stop the server and db before rerunning the tests either using the the Docker Desktop GUI or by running
docker stop jobsboard-api-1anddocker stop jobsboard-db-1in your terminal.
Use the logs in the terminal or the Docker Desktop GUI to check your tests.
The reason Docker is used when testing is because we're given a guarantee that the conditions are exactly the same every time and because it emulates what the behaviour will be on prod running in the container - where there are differences.
Coming
- Run
yarn run lintto see both style and linting issues in.tsfiles within thebackenddirectory at once - Run
yarn run lint:fixto automatically amend all style and linting issues that would be identified by running the first command (recommended) - Run
yarn run formatto see all style issues in.tsfiles within thebackenddirectory according to the prettier configuration file.prettierrc - Run
yarn run format:fixto automatically amend all the style issues identified by runningnpm run prettier(recommended)
Always double check before submitting your pr
- Run
docker compose build apianddocker compose build testand ensure the builds complete successfully - Run
docker compose up testand ensure all tests pass
Log in to your preferred container registry via command line and run docker-compose push, ensure that they've finished pushing and then deploy where required.