2023 Onboarding
Jargon / Terminology
Uni-lectives - CSElectives but with all courses across UNSW
V2 - Synonym for Uni-lectives
V1 - CSElectives which is currently available to everyone
Eetswa - Sweet
Firstly…
For this year, most if not all of our code will be done in the v2 repository on Github:
http://github.com/csesoc/cselectives-v2
Some context behind v2, 2022 the goal was to rewrite CSElectives completely to deprecate the dependency on Firebase, and instead use our own backend. The backend is mostly written, with some refinements, refactors and extra APIs still needed. The frontend this year will be completely rewritten again (yay!). There is a vision for the technical decisions, and what it will look like (UI/UX redesign), however it’s completely open for the team as a discussion. The current state of the project is that:
We have a “working” backend (needs lots of refinements)
We need to build the frontend from scratch
Database has all the UNSW course information
Database has all past reviews (but not who has written them)
With this context hopefully you are up to speed with where we are at starting this year. Moving forward please take a look at the code in v2 and clone the repo. Each component of our project has a README where it specifies how you can setup local development. At the time of writing this we are working on making this experience better so the setup is minimal as there are many separate parts:
Frontend (will need to be rewritten, TBA on how we build this)
Backend (HTTP Server which has APIs for Uni-lectives)
Database (Postgres managed with Stitch)
Migration (HTTP Server which handles migrating data from v1 as well as getting all course data at UNSW)
How do we develop and test?
I’m glad you asked , v2 is setup so you can develop and test however you would like with many options. Each component of the application can be run in isolation (no dependency yay!), except if you are wanting to test your DB interactions .
Frontend
You can get data for the frontend in 3 different ways (when we say get data we mean how to get the actual information served by the backend):
Mock server (API calls are stubbed with MirageJS)
Run backend locally (Setup the database, and backend API locally on your machine)
Staging server (point the frontend to staging)
Going about how to do these different ways can be discussed and documented by the directors if you are unsure. In terms of deciding which to go for, its personal preference and depends on your goals.
Backend
You can run the backend server simply without a database connection, you would just need to comment out the database class setup (we can probably do this better). For setting it up with the database which will probably be most of the time, the README in both the backend and database folders explain very clearly on how to do this (Docker will be needed).
If you are wanting to populate real data into your local database then you would need to run the migration server, the README in that project should be self explanatory.
The backend is more complicated to run and test locally, so please ask directors or other members for assistance with no hesitation.
Deploying to staging and production
Once you commit your code to your branch (see below branching strategy), you would want to raise a PR to develop branch. Once its reviewed by whoever and merged into develop, then a pipeline will run to deploy your code into the staging environment where you can test your changes.
Once it's all good you can then raise a PR to main (so that’s develop → main), and then a director will approve and merge these changes. This will trigger a deployment to production, woo hoo!
At the moment, we don’t have a live production environment for v2 since v1 is still in use, so the last step can be skipped till we release Uni-lectives.
Architecture
Most importantly….
Have fun! Enjoy yourself, don’t take life too seriously, chill and it’ll be eetswa .
We hope that you get a lot of good experience and learnings from working on the project, and please leverage the knowledge and experience of others (especially the directors) to learn as much as you can.
Anytime you ever feel stuck, bored or overwhelmed reach out to the directors and we will be more than happy to assist .