Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
c9659f9
feat(backend): remove old backend
KavikaPalletenne Oct 5, 2023
d6b5fa4
feat(backend): add README for new backend structure
KavikaPalletenne Oct 5, 2023
262445e
feat(backend): Update README.md to include postgres in techstack
KavikaPalletenne Oct 7, 2023
0f7c413
feat(backend): add OAuth2 token and email fetching for Google callback
KavikaPalletenne Oct 25, 2023
15a51dc
Merge remote-tracking branch 'origin/CHAOS-224-KHAOS-rewrite' into CH…
KavikaPalletenne Oct 25, 2023
fe3d0e2
feat(backend): add prisma-cli and design schema
dhj03 Oct 25, 2023
aadc37c
fix(backend): add migrations to .gitignore
dhj03 Oct 25, 2023
2c2ce07
fix(backend): add .idea folder to .gitignore
KavikaPalletenne Oct 27, 2023
888a9f0
Implement extractors for AuthUser and SuperUser (#458)
KavikaPalletenne Feb 11, 2024
03a4877
OAuth flow account creation/login (#460)
KavikaPalletenne Feb 11, 2024
f442048
fix(backend): Add dotenvy to server and prisma (#466)
KavikaPalletenne Mar 29, 2024
88da782
feat(ci): add postgres and migration to actions workflow (#467)
KavikaPalletenne Mar 29, 2024
7398aa2
fix(ci): Fix incorrect working directory in Rust workflow file (#468)
KavikaPalletenne Mar 29, 2024
0e75ddf
fix(ci): Fix build errors and cargo fmt/clippy (#469)
KavikaPalletenne Mar 29, 2024
9ee127c
fix(ci): rust-cache keys and cargo fmt working directory fix (#470)
KavikaPalletenne Mar 29, 2024
7e9d7c7
fix(ci): rust-cache workspaces fix (#471)
KavikaPalletenne Mar 29, 2024
70eda4b
fix(ci): cargo fmt remove manifest-path arg (#472)
KavikaPalletenne Mar 29, 2024
46b104d
API Spec for Users and Organisations (#477)
KavikaPalletenne Apr 5, 2024
8ef0cca
Draft API Documentation for User, Organisation and Campaign (#478)
KavikaPalletenne Apr 6, 2024
80556ba
feat(backend): Switch from Prisma schema to SQL schema (#479)
KavikaPalletenne Apr 6, 2024
c1b4fb7
fix(backend): Create index on lower(email)
KavikaPalletenne Apr 7, 2024
048f0fe
Update backend README.md
KavikaPalletenne Apr 7, 2024
d6d581a
feat(backend): Rust error handling with anyhow & custom types (#482)
KavikaPalletenne Apr 7, 2024
37595e4
add operationId's to api spec
KavikaPalletenne Apr 14, 2024
84f6324
Add JSON version of api spec
KavikaPalletenne Apr 14, 2024
1405e97
Error handling with `thiserror` (#494)
KavikaPalletenne Jun 28, 2024
5fe7add
Organisations CRUD (#485)
alexlai18 Jun 28, 2024
16972da
feat(backend): added database dev env install script (#495)
fritzrehde Jul 11, 2024
ff4cff4
Chaos 463 campaigns crud (#486)
pigeonseverywhere Jul 20, 2024
ba6fb2b
Campaign Role CRUD (#497)
AlexMIaoPU Jul 20, 2024
f140dd6
Chaos 502 application crud (#503)
AlexMIaoPU Aug 2, 2024
45c8324
User CRUD (#493)
HellenMelon Aug 2, 2024
15aa828
feat(backend): improved error handling for dev env setup script (#500)
fritzrehde Aug 2, 2024
f1994a7
Question types framework + ShortAnswer & MultiChoice implementations …
KavikaPalletenne Nov 5, 2024
47aef32
Ratings CRUD (#516)
fritzrehde Nov 12, 2024
361d92a
Question & Answer CRUD (#526)
KavikaPalletenne Nov 23, 2024
088a48e
Chaos 475 api documentation (#523)
AlexMIaoPU Nov 23, 2024
2ec5c18
Email Templates and Offers (#528)
KavikaPalletenne Nov 29, 2024
877c388
optional user pronouns and gender
KavikaPalletenne Dec 30, 2024
6ee51b2
move `oauth2_client` to `AppState`
KavikaPalletenne Dec 30, 2024
98650af
committing most up to date working frontend (#546)
gyoumi Apr 20, 2025
7af6ca8
Chaos 542 auth token set cookie (#548)
AlexMIaoPU Jul 8, 2025
72f3ef1
Email Sending, Application Lockouts & Backend Documentation (#530)
KavikaPalletenne Jul 15, 2025
6879da2
Database seeding (#562)
AlexMIaoPU Jul 23, 2025
d81c95a
update seeder.rs with `ApplicationRole` preferences & email template …
KavikaPalletenne Jul 29, 2025
80338a6
add database seeding build to actions workflow
KavikaPalletenne Jul 29, 2025
3a4e879
fix `array_agg()` of question roles
KavikaPalletenne Jul 29, 2025
e1d8505
add `DEV_ENV` to workflow .env
KavikaPalletenne Jul 29, 2025
a608ec0
change all `Pool<Postgres>` parameters to `Transaction<'_, Postgres>`
KavikaPalletenne Jul 29, 2025
9c45c72
update rust.yml with new env variables
KavikaPalletenne Jul 29, 2025
7a612f7
add cors
KavikaPalletenne Jul 29, 2025
299b601
feat: added BE route to get all orgnisations where logged in user is …
AlexMIaoPU Jul 31, 2025
350fd8e
add cors layer to app
KavikaPalletenne Aug 1, 2025
2aa0ca5
Refactor: updated frontend auth to use cookies instead of localhost (…
gyoumi Aug 1, 2025
258d583
temp delete lock file to avoid merge conflict
gyoumi Aug 1, 2025
2280819
Frontend v0.dev setup (#557)
gyoumi Aug 1, 2025
c22c68e
mui version updates
KavikaPalletenne Aug 5, 2025
51e24f0
Merge branch 'main' into CHAOS-224-KHAOS-rewrite
gyoumi Aug 5, 2025
7a4e413
Merge branch 'CHAOS-224-KHAOS-rewrite' of github.com:devsoc-unsw/chao…
gyoumi Aug 5, 2025
3f42ccd
get campaigns by org and campaign slugs
KavikaPalletenne Aug 13, 2025
098f96e
Update .gitignore
KavikaPalletenne Aug 13, 2025
b965ccc
campaign info page
KavikaPalletenne Aug 13, 2025
24543e4
apply page
KavikaPalletenne Aug 13, 2025
9127e93
Serialize i64 IDs as strings
KavikaPalletenne Aug 13, 2025
1b09a10
update all array_agg of json to include to_jsonb
KavikaPalletenne Aug 13, 2025
1039f86
display application questions
KavikaPalletenne Aug 13, 2025
a22487e
fix types for question data in fe
KavikaPalletenne Aug 13, 2025
788dbc0
Update seeder.rs
KavikaPalletenne Aug 16, 2025
5932c71
fetch and show questions for selected roles
KavikaPalletenne Aug 16, 2025
64aca23
fix width of questions
KavikaPalletenne Aug 16, 2025
9ff1e52
smaller role selection buttons
KavikaPalletenne Aug 16, 2025
bc9f5ab
create or get application on page load
KavikaPalletenne Aug 20, 2025
c45e7ee
fetch answers for common & role questions
KavikaPalletenne Aug 20, 2025
22b8650
get answers
KavikaPalletenne Aug 21, 2025
8971497
fix `AnswerData` enum tagging
KavikaPalletenne Aug 21, 2025
7988c0d
first version of AGENTS.md file
KavikaPalletenne Aug 26, 2025
be528e9
handle answer update & delete
KavikaPalletenne Aug 27, 2025
a8eebfa
fix new answer being deleted
KavikaPalletenne Aug 27, 2025
042c9b3
don't require login for campaign
KavikaPalletenne Sep 23, 2025
345055a
application role preferences & admin review setup
KavikaPalletenne Sep 25, 2025
2bbc28f
Update yarn.lock
KavikaPalletenne Sep 25, 2025
fddd147
update to node 24
KavikaPalletenne Sep 25, 2025
18bce49
endpoints for getting & updating application ratings
KavikaPalletenne Sep 30, 2025
91ae292
Chaos 571 - Add Notion-style form editor (#575)
peternuyn Sep 30, 2025
f13c7de
update lockfile
gyoumi Oct 1, 2025
730e814
integrate application review with the backend
Oct 4, 2025
c10f9cc
fixing subcom application integration with backend including the auto…
Oct 6, 2025
dcaa246
update backend readme to include `libssl-dev` install
KavikaPalletenne Oct 7, 2025
c1a27b1
update frontend lock files
KavikaPalletenne Oct 7, 2025
4fbe202
Email templates (purely frontend) (#579)
remyjelee Oct 9, 2025
fdc77a4
migrated to bun
gyoumi Oct 10, 2025
26745b7
migrated to bun
gyoumi Oct 10, 2025
23d9469
replaced all mentions of yarn with bun
gyoumi Oct 10, 2025
94d5fe0
Chaos 577 create campaign be fe (#581)
Plebbaroni Oct 23, 2025
73dda50
fix spelling
KavikaPalletenne Oct 23, 2025
77a5053
feat: added published flag to campaign (#589)
AlexMIaoPU Oct 28, 2025
68a386d
588 fe dev only buttons for login + Added get_all orgs in BE (#591)
AlexMIaoPU Oct 28, 2025
efbfdec
documentation fixes
KavikaPalletenne Oct 28, 2025
bf3534c
update authz for application reads
KavikaPalletenne Oct 28, 2025
2bc7913
only show answers/questions for submitted applications
KavikaPalletenne Oct 28, 2025
9ae7ca1
fix sql `==` check
KavikaPalletenne Oct 28, 2025
d5ceff4
Progress on campaign redesign, (#594)
RyanTan182 Nov 11, 2025
0bca489
Fixed Migration Error (#596)
RyanTan182 Nov 11, 2025
a1c9f20
fixed migration :(((( (
RyanTan182 Nov 11, 2025
a3ec550
initial nextjs setup
KavikaPalletenne Nov 13, 2025
caac3ef
basic dashboard organisation fetching
KavikaPalletenne Nov 29, 2025
68514c9
dashboard campaign details
KavikaPalletenne Nov 29, 2025
6bb71c4
application rating ui
KavikaPalletenne Nov 29, 2025
d613d3f
add buttons for publish & edit campaign questions
KavikaPalletenne Dec 2, 2025
323890c
Email templates UI (#608)
KavikaPalletenne Dec 3, 2025
d4733b1
Update .gitignore
KavikaPalletenne Dec 3, 2025
532e89d
fix: fixed some CN translations (#614)
AlexMIaoPU Dec 4, 2025
d3e5c79
Created campaign webpage utilising CampaignDetails struct
drboom16 Dec 4, 2025
62a7b31
Edit Campaign View (#610)
gyoumi Dec 8, 2025
9eda5a2
Chaos 617 create campaign nextjs (#619)
RyanTan182 Dec 9, 2025
49a6808
CRUD UI for organisation members (#612)
KavikaPalletenne Dec 9, 2025
2e84503
Chaos 616 campaign info page (#623)
drboom16 Dec 10, 2025
8246311
fix seeder organisation admin overwrite
KavikaPalletenne Dec 11, 2025
fd0e244
update backend readme to reflect seeder email arg
KavikaPalletenne Dec 12, 2025
d0e720c
additional backend setup steps
KavikaPalletenne Dec 12, 2025
f963fc4
nextjs handle `to` param in `/login`
KavikaPalletenne Dec 18, 2025
8c18b44
Add email invitation functionality for new organisation members
Dec 19, 2025
f386fdc
UI for email invite
Dec 29, 2025
b429e36
remigrate db, invite model and handler
Dec 29, 2025
19259bc
add another field in organisation_invite table, according to Kavika's…
Jan 7, 2026
a713b62
frontend the invite page, will now show error log, for example, user …
Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu

# Setup packages
RUN apt update && export DEBIAN_FRONTEND=noninteractive \
&& apt -y install --no-install-recommends libssl-dev pkgconf build-essential postgresql-client

# Note: Rust, Node.js, and Bun are installed via devcontainer.json features.
# sqlx-cli will be installed in post-create.sh to ensure it uses the correct cargo environment.
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "Chaos Dev Container",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/chaos",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
},
"ghcr.io/devcontainers/features/rust:1": {
"version": "latest"
},
"ghcr.io/michidk/devcontainers-features/bun:1": {
"version": "latest"
}
},
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer",
"DBCode.dbcode"
]
}
},
"postCreateCommand": "bash .devcontainer/post-create.sh",
"remoteUser": "vscode"
}
29 changes: 29 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspaces/chaos:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Use the same network as the db service to access it via localhost
network_mode: service:db

db:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: chaos
volumes:
- chaos-postgres-data:/var/lib/postgresql/data
# Forward ports: 5432 (db), 3000 (frontend), 8080 (backend)
ports:
- "5433:5432"
- "3000:3000"
- "8080:8080"

volumes:
chaos-postgres-data:
46 changes: 46 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash
set -e

echo "Starting post-create setup..."

# Create backend/.env
echo "Creating backend/.env..."
cat << 'EOF' > backend/.env
DATABASE_URL="postgres://postgres:password@localhost:5432/chaos"
JWT_SECRET="test_secret"
GOOGLE_CLIENT_ID="test"
GOOGLE_CLIENT_SECRET="test"
GOOGLE_REDIRECT_URI="http://localhost:3000/auth/callback"
S3_BUCKET_NAME="chaos-storage"
S3_ACCESS_KEY="test_access_key"
S3_SECRET_KEY="test_secret_key"
S3_ENDPOINT="https://chaos-storage.s3.ap-southeast-1.amazonaws.com"
S3_REGION_NAME="ap-southeast-1"
DEV_ENV="dev"
SMTP_USERNAME="test_username"
SMTP_PASSWORD="test_password"
SMTP_HOST="smtp.example.com"
EOF

# Install sqlx-cli if not present
if ! command -V sqlx &> /dev/null; then
echo "Installing sqlx-cli..."
cargo install sqlx-cli --no-default-features --features native-tls,postgres
fi

# Wait for Postgres
echo "Waiting for Postgres..."
until PGPASSWORD=password psql -h "db" -U "postgres" -d "chaos" -c '\q' 2>/dev/null; do
echo "Waiting for postgres at db:5432..."
sleep 2
done

# Setup DB
echo "Setting up database..."
cd backend

# Create database if not exists
sqlx database create || true
sqlx migrate run

echo "Setup complete!"
38 changes: 38 additions & 0 deletions .github/workflows/frontend-nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Frontend (Next.js)

on:
pull_request:
branches: [main, "renovate/*", "CHAOS-224-KHAOS-rewrite", "CHAOS-571-integrate-be-fe", "CHAOS-598-nextjs"]
paths:
- "frontend-nextjs/**"
- ".github/workflows/frontend-nextjs.yml"
push:
branches: ["renovate/*"]
paths:
- "frontend-nextjs/**"
- ".github/workflows/frontend-nextjs.yml"

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend-nextjs

steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Build
run: bun run build
env:
NEXT_PUBLIC_APP_URL: http://localhost:3000
NEXT_OAUTH_CALLBACK_URL: http://localhost:8080/auth/google
NEXT_API_BASE_URL: https://localhost:8080
72 changes: 55 additions & 17 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,82 @@ name: Rust

on:
pull_request:
branches: [main, "renovate/*"]
branches: [main, "renovate/*", "CHAOS-224-KHAOS-rewrite", "CHAOS-571-integrate-be-fe", "CHAOS-598-nextjs"]
paths:
- "backend/**"
- ".github/workflows/rust.yml"
push:
branches: ["renovate/*"]
paths:
- "backend/**"
- ".github/workflows/rust.yml"

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: chaos
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Mock an env file
- name: Setup env file
run: |
echo "DATABASE_URL=test_url" >> backend/.env
echo "DATABASE_URL=postgres://postgres:password@localhost:5432/chaos" >> backend/.env
echo "JWT_SECRET=test_secret" >> backend/.env
echo "GOOGLE_CLIENT_ID=test" >> backend/.env
echo "GOOGLE_CLIENT_SECRET=test" >> backend/.env
echo "GOOGLE_REDIRECT_URI=http://localhost:3000/auth/callback" >> backend/.env
echo "ROCKET_DATABASES='{}'" >> backend/.env
echo "S3_BUCKET_NAME=chaos-storage" >> backend/.env
echo "S3_ACCESS_KEY=test_access_key" >> backend/.env
echo "S3_SECRET_KEY=test_secret_key" >> backend/.env
echo "S3_ENDPOINT=https://chaos-storage.s3.ap-southeast-1.amazonaws.com" >> backend/.env
echo "S3_REGION_NAME=ap-southeast-1" >> backend/.env
echo "DEV_ENV=dev" >> backend/.env
echo "SMTP_USERNAME=test_username" >> backend/.env
echo "SMTP_PASSWORD=test_password" >> backend/.env
echo "SMTP_HOST=smtp.example.com" >> backend/.env
echo "CAMPAIGN_NAME_MAX_CHARS=50" >> backend/.env
echo "CAMPAIGN_DESCRIPTION_MAX_ChARS=500" >> backend/.env
echo "ROLE_NAME_MAX_CHARS=20" >> backend/.env
echo "ROLE_DESCRIPTION_MAX_CHARS=50" >> backend/.env
echo "ROLE_POSITIONS_AVAILABLE_MAX=20" >> backend/.env
# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as it uses the current rustc version as its cache key
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Setup cargo cache
uses: actions/cache@v3
with:
working-directory: backend/
- name: Build
run: cargo build --manifest-path backend/server/Cargo.toml
- name: Cargo Clippy
run: cargo clippy --manifest-path backend/server/Cargo.toml
- name: RustFmt
run: cargo fmt --manifest-path backend/server/Cargo.toml
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
backend/server/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Migrate DB
working-directory: backend
run: |
which sqlx || cargo install sqlx-cli --no-default-features --features native-tls,postgres
sqlx database create
sqlx migrate run
- name: Build
run: cargo build --manifest-path backend/seed_data/Cargo.toml
- name: Cargo Clippy
run: cargo clippy --manifest-path backend/seed_data/Cargo.toml
- name: RustFmt
run: cargo fmt --manifest-path backend/seed_data/Cargo.toml
working-directory: backend/server
run: cargo build
- name: Database Seeding
working-directory: backend/database-seeding
run: |
cargo build
cargo run -- --email me@example.com
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/.DS_Store
**/.vscode/
**/.idea/
**/.next/
**/target/
**/.env.*
Loading
Loading