Skip to content

Conversation

@KavikaPalletenne
Copy link
Contributor

@KavikaPalletenne KavikaPalletenne commented Feb 11, 2024

Completely rewritten backend:

  • Rocket -> Axum
  • Diesel ORM -> SQLx
  • Diesel Migrations -> SQLx Migrations

@KavikaPalletenne KavikaPalletenne changed the title Backend Rewrite [WIP] Backend Rewrite Feb 11, 2024
* start implementing authorisation

* feat(backend): implement extractor for AuthUser (user id)

* feat(backend): implement extractor for SuperUser (user id + authZ)

---------

Co-authored-by: kappamalone <uzman.zawahir1@gmail.com>
@KavikaPalletenne KavikaPalletenne changed the title [WIP] Backend Rewrite [WIP] feat(backend): Backend Rewrite Feb 11, 2024
* start implementing authorisation

* feat(backend): implement extractor for AuthUser (user id)

* feat(backend): implement extractor for SuperUser (user id + authZ)

* feat(backend): get existing or create new user for Google login

* feat(backend): get name from Google user profile

* feat(backend): update schema.prisma to include lowercase table names + updated_at default time for users

---------

Co-authored-by: kappamalone <uzman.zawahir1@gmail.com>
@KavikaPalletenne KavikaPalletenne added the A: Backend Backend related issues label Feb 17, 2024
@devsoc-unsw devsoc-unsw locked and limited conversation to collaborators Feb 17, 2024
@devsoc-unsw devsoc-unsw unlocked this conversation Feb 17, 2024
@KavikaPalletenne KavikaPalletenne marked this pull request as draft March 23, 2024 10:33
* feat(ci): add postgres and migration to actions workflow

* fix(ci): fix incorrect working directory
* feat(ci): add postgres and migration to actions workflow

* fix(ci): fix incorrect working directory

* fix(ci): ran cargo fmt and fix build errors
* feat(ci): add postgres and migration to actions workflow

* fix(ci): fix incorrect working directory

* fix(ci): ran cargo fmt and fix build errors

* fix(ci): Incorrect working directory for cargo fmt

* fix(ci): rust-cache keys
* feat(ci): add postgres and migration to actions workflow

* fix(ci): fix incorrect working directory

* fix(ci): ran cargo fmt and fix build errors

* fix(ci): Incorrect working directory for cargo fmt

* fix(ci): rust-cache keys

* fix(ci): add workspaces to rust-cache
* feat(ci): add postgres and migration to actions workflow

* fix(ci): fix incorrect working directory

* fix(ci): ran cargo fmt and fix build errors

* fix(ci): Incorrect working directory for cargo fmt

* fix(ci): rust-cache keys

* fix(ci): add workspaces to rust-cache

* fix(ci): cargo fmt remove manifest-path arg
* fix(ci): run CI on rewrite branch pull request

* feat(docs): added endpoint docs for org and users
* feat(docs): updates to user and organisation api spec

* feat(docs): draft spec for campaign api

* fix(ci): update rust workflow to use actions/cache
* feat(backend): create sql migrations

* feat(backend): remove prisma schema

* fix(ci): change from prisma migration to sql

* fix(ci): no default sqlx-cli features

* fix(backend): remove duplicate primary key for applications

* fix(backend): rename migrations to prepend 'create'

* fix(ci): check for cached sqlx before installing with cargo

* fix(ci): remove ci run on specific paths
@KavikaPalletenne KavikaPalletenne changed the title [WIP] feat(backend): Backend Rewrite [WIP] Backend Rewrite Apr 7, 2024
@KavikaPalletenne KavikaPalletenne added this to the Backend Rewrite milestone Apr 7, 2024
AlexMIaoPU and others added 20 commits November 23, 2024 16:41
* feat(docs): updates to user and organisation api spec

* feat(docs): draft spec for campaign api

* fix(ci): update rust workflow to use actions/cache

* rewrite API yamal file using components/schema up to /api/v1/role/:role_id

* rewrite API yamal file using components/schema up to /api/v1/role/:role_id I guess

* rewrite API yamal file using components/schema up to /api/v1/role/:role_id I guess

* finished API doc

* Update rust.yml

---------

Co-authored-by: Kavika <kbpalletenne@gmail.com>
Co-authored-by: Alex_Miao_WSL <yuan_sen.miao@student.unsw.edu.au>
* change all db pool in `Campaign` to transactions

* move extracting user_id from request to helper function

* add slugs to `Campaign` and `Organisation`

* add endpoints to check slug availability

* slug utility functions and checks

* email templating and offer CRUD

* fix email_template auth service join

* offer CRUD

* ran `cargo fmt` & remove unused imports
* feat: implemented cookie wrapped auth token

* fix: SQL sub query alias

---------

Co-authored-by: Alex_Miao_WSL <yuan_sen.miao@student.unsw.edu.au>
* email sending

* fix "recipient" spelling

* cargo fmt

* fix errors with `template_subject` introduction

* cargo clippy fixes

* application role preferences and updating applied roles

* lock out user from application changes after submission

* lock application after submission and campaign close date

* fix uses of `LEFT JOIN` when `JOIN` was needed

* make unsubmitted application viewable after campaign end

* only submitted applications are viewable by reviewers

* added `Answer`-related schemas to api.yaml

* register new `ApplicationHandler` endpoints in app

* completed up to /organisation/slug_check

* `NewCampaign` model for campaign create request body

* block applications for ended campaigns

* `NewEmailTemplate` model for template request body

* fix `assert_campaign_is_open()` naming

* api.yaml up to `/organisation/{id}/logo`

* update `api.json` up to `/organisation/{id}/logo`

* Move some `Rating` handler fn to `ApplicationHandler`

* update `api.json` up to `/rating/{id}`

* docs & roles in questions

* change gender and pronouns to `Option`

* docs for `src/service` and `src/handler`

* remove cargo clippy and rust fmt from ci/cd
* chore: setup seeding crate. feat: added logic to seed root user and organisation

* feat: added more seeding (currently broken at seed roles); fix: made some fields in multiioptionquestion pub

* fix: replaced snowflake .generate() with more reliable real_time_generate()

* feat: added more seeding: answers, rating; currently broken with DatabaseError(ColumnNotFound(question_type))?

* fix use of non-macro `query_as()`

* spelling fix

* snowflake `&mut` references

* feat: completed seeding crate; added test login routes; updated .env

* fix: removed send secure only for test routes

* fix: fixed cookie name to match auth logic; fixed SQL logic bugs for get rating, offer, campaign Admin check

* fix `QuestionRawData` queries to include `roles`

* Update .gitignore

* Create .gitignore at root

* update backend README with new models and service

---------

Co-authored-by: Alex_Miao_WSL <yuan_sen.miao@student.unsw.edu.au>
Co-authored-by: Kavika <kbpalletenne@gmail.com>
…an Admin of; refactor: changed get all campaigns route name (#567)

Co-authored-by: Alex_Miao_WSL <yuan_sen.miao@student.unsw.edu.au>
…569)

* add 2024 sponsor logos

* add tailwind prettier plugin

* update eslint-plugin-prettier to compatible version

* format and lint code

* update eslint config

* feat: add 2024 sponsor logos (#488)

* remove grouped tailwind psuedo-classes

* refactor(frontend): remove MUI theme and CSS baseline

* format tailwind classes

* set prettier config options

* format according to prettier config

* format tw macros via Tailwind functions config

* AdminSideBar styles and width state rewritten

* feat(AdminSidebar): migrate admin sidebar from MUI to Radix UI Primitives

* feat(CampaignCreationPreview): migrate from MUI and remove bad CampaignForm preview

* feat(AdminSidebar): add borders between organisations

* refactor(BackgroundWrapper): delete unused component

* feat(ApplicationPreviewer): migrate ApplicationPreviewer away from MUI

* feat(CreateOrganisationForm): rewrite components using Tailwind

* feat(Dropdown): remove unused imports

* more migration

* feat(frontend): update login/signup buttons to Coming Soon (#499)

* feat(Signup): migrate to twin

* feat(frontend): Update ESLint and Prettier config (#490)

* add 2024 sponsor logos

* add tailwind prettier plugin

* update eslint-plugin-prettier to compatible version

* format and lint code

* update eslint config

* remove grouped tailwind psuedo-classes

* format tailwind classes

* set prettier config options

* format according to prettier config

* format tw macros via Tailwind functions config

* email sending

* fix "recipient" spelling

* cargo fmt

* fix errors with `template_subject` introduction

* cargo clippy fixes

* application role preferences and updating applied roles

* lock out user from application changes after submission

* lock application after submission and campaign close date

* fix uses of `LEFT JOIN` when `JOIN` was needed

* make unsubmitted application viewable after campaign end

* only submitted applications are viewable by reviewers

* added `Answer`-related schemas to api.yaml

* register new `ApplicationHandler` endpoints in app

* completed up to /organisation/slug_check

* `NewCampaign` model for campaign create request body

* block applications for ended campaigns

* `NewEmailTemplate` model for template request body

* fix `assert_campaign_is_open()` naming

* api.yaml up to `/organisation/{id}/logo`

* update `api.json` up to `/organisation/{id}/logo`

* rerouted application page to new backend and made prop error fixes for CampaignCard related components

* rerouted application page to new backend

* fixed all initial errors

* fixed all initial errors

* Move some `Rating` handler fn to `ApplicationHandler`

* update `api.json` up to `/rating/{id}`

* saving for now

* created user context

* created user context + preparing for work division

* feat: implemented cookie wrapped auth token

* fix: SQL sub query alias

* saving prompt updates

* more prompts

* fixed merge

* login working

* only comming fe changes

* saving state for now

* idk why this didnt merge

* idk why this didnt merge either

* got dashboard working kind of lol

* fixed frontend admin org route

* fixed frontend admin org route

* fixed readme conflict

---------

Co-authored-by: Josh <joshconstantinelim@gmail.com>
Co-authored-by: Kavika <kbpalletenne@gmail.com>
Co-authored-by: Alex_Miao_WSL <yuan_sen.miao@student.unsw.edu.au>
Co-authored-by: Kavika <kavika.palletenne@devsoc.app>
* feat(frontend): implement question type components (#540)

- Add five question component types: ShortAnswer, Dropdown, MultiChoice, MultiSelect, and Ranking
- Create test route for component demonstration
- Modify ApplicationForm to handle different question types
- Update typing for question data structure

* fix(): use React DnD for ranking options

* fix(dropdown): add borderline, improve hover effects, and highlight selected options

- Added prominent border for dropdown box
- Implemented light blue hover effect for options
- Added conditional highlighting for selected options with checkmark

* fix(shortanswer): enlarge textarea to span 77 columns and 3 rows

- Increased width of textarea using cols attribute
- Set default height to 3 rows
- Improved visual presentation of text input area

* chore(deps): update yarn.lock with automatic modifications

- Reflect dependency resolution changes from recent package updates

* feat(shortAnswer): enhance textarea focus visibility and border styling

* refactor: update question components structure and remove unneccsary input files in each component's directory

* setup shadcn components

* Feat/shad cn UI question components (#559)

* refactor: replace MultipleChoice twin.macro with ShadCN UI components

* refactor: replace MultiSelect React Component with ShadCN UI components

* fix dropdown component

* refactor multiple choice

* refactor short answers

* refactor testing route for question components

* update yarn.lock

* Chaos 551 feature/interview-booking-component (#565)

* feat: interview page for user and admin. User still has css issues.

* feat: fix the calendar css isue, still persist

* feat: add DayPilot library for enhanced calendar functionality and improve code formatting in admin and user booking components

---------

Co-authored-by: Peter Nguyen <z5662723@ad.unsw.edu.au>

* feat: Implement application review page for recruitment form (#563)

* feat: create new page for application review with static path

* feat: fix route to include campaign_id not static id and provide fallback if campaign ID not provided and fix ranking component with a default value check to make sure defaultValue is not  undefined, null

* fix: add dynamic width support to Dropdown, Ranking, and ShortAnswer components; remove display=flex from Box in App.tsx

- Enabled dynamic width prop on Dropdown, Ranking, and ShortAnswer for better layout flexibility
- Removed  from Box in App.tsx to fix children layout issues

* fix: add more details for fallback campaign

* fix: make API call as written in this PR https://github.com/devsoc-unsw/chaos/pull/562/files and keep current fallback

* feat: add explanation for pages/application_review/index.tsx at the top

* fix: modify explanation in URL patterns and remove unused import

---------

Co-authored-by: gyoumi <87557702+Gyoumi@users.noreply.github.com>

* commiting lock file

* CHAOS-561-feature/admin-application-dashboard (#570)

* feat: add Admin Application Dashboard and update routes

- Introduced a new Admin Application Dashboard component for managing application reviews.
- Updated routes to include the new dashboard at the path "/admin/application-dashboard".

* refactor: streamline Admin Application Dashboard with AI integration and mock data

- Replaced hardcoded mock application data with external JSON files for better maintainability.
- Introduced a modal-based AI assistant for enhanced user interaction.
- Updated application review features, including localStorage persistence for selected applications.
- Improved UI elements for better accessibility and responsiveness.
- Updated README to reflect new features and data structure.

* minor fix for typo

---------

Co-authored-by: Peter Nguyen <z5662723@ad.unsw.edu.au>
Co-authored-by: Isaac <isaackim1412@gmail.com>
Co-authored-by: gyoumi <87557702+Gyoumi@users.noreply.github.com>

* reinstalled lockfile

---------

Co-authored-by: Thao Minh Le <118033201+minhle35@users.noreply.github.com>
Co-authored-by: Peter N <116279468+peternuyn@users.noreply.github.com>
Co-authored-by: Peter Nguyen <z5662723@ad.unsw.edu.au>
@KavikaPalletenne KavikaPalletenne requested a review from gyoumi August 2, 2025 04:12
Copy link

@gyoumi gyoumi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the frontend conflicts were minor but i have resolved them all

@gyoumi gyoumi marked this pull request as ready for review August 5, 2025 03:54
@KavikaPalletenne KavikaPalletenne marked this pull request as draft October 23, 2025 09:32
@KavikaPalletenne KavikaPalletenne changed the title [WIP] Backend Rewrite [WIP] Backend + Frontend Rewrite Dec 3, 2025
@KavikaPalletenne
Copy link
Contributor Author

Completely rewritten frontend in modern Next.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Backend Backend related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants