Skip to content

Commit

Permalink
Final Submission (#128)
Browse files Browse the repository at this point in the history
* wip: add console log

* fix: hardcoded socket

* fix: matching service get question before delete user

* wip: add console log

* feat: set up ai-chat-service backend

* feat: ai-chat-service frontend component (wip)

* chore: Add userId to tokens

* chore: add Dockerfile

* feat(history-service)!: change endpoints

* chore: remove debugging statements

* chore: restore user service

* wip: reduce bundle size

* fix: pin tabler-icons

* nit: add loading to button when searching

* fix: showing numbers instead of categories in search page

* nit: make session full width

* feat: add notifications on leave/rejoin

* feat: draggable video chat window

* chore: fix bugs with collab service

* feat(run-service)!: implement sse for 2 users

* chore: delete from redis

* fix: add ability to use ws for vps

* test: add test cases and fixed bugs

* test: add test cases

* fix: add language selector to switch languages for syntax highlighting

* test

* chore: cleanup console.log

* nit: remove console.log

* chore: modify test to test edge cases

* fix: no testcase found error

* chore: disable tests for some services

* chore: add builds for new services and frontend

* fix: modify response to include questionId

* chore: hide private testcases outputs

* nit: change to use personal TURN server

* chore: modify response format

* feat: add back stun server

* fix: removed function wrongly while resolving merge conflicts

* feat(run-service)!: change status to statusCode

* chore: check code attempt in test

* feat: run test case (send to server only)

* chore: modify cors

* feat: execution with loading

* fix: history service url for useApi

* fix: accidentally removed mongoose import while fixing merge conflicts

* feat: session summary page

* feat: display past attempts on dashboard (wip)

* feat: test case results

* feat: add old code submission entry

* chore: add error handling when one client disconnects

* chore: create test for disconnect

* fix: add event for start of execution

* wip

* nit: fix error message

* feat: enable parallel processing

* fix: fix executing question after both clients connects error

* chore: update ci and docker compose

* wip: first working version of peerjs

* fix: attempt details displayed on attempt card

* fix: collaborator details for attempt card and session summary page

* chore: delete kubernetes files

* fix: history service merge conflict issues

* fix: add statusCode 204

* fix: 204 statusCode in filtered question

* feat: final working version

* fix: add userId to accessToken

* fix: correct error message

* fix: id in accessToken

* wip: debug

* fix: different channelId issue

* wip: update FE to start supporting integrations

* fix: add statusCode 204 (#108)

* fix: add statusCode 204

* fix: 204 statusCode in filtered question

* fix: add userId to accessToken

* fix: correct error message

* fix: id in accessToken

* chore: update docker files

* chore: add dockerignore file

* feat: highlight Gemini

* fix: add input for questions

* fix: add type

* wip: query and display ai response

* feat: prettify integrations

* fix: ensure code editor language correspond to selected language

* feat: add loading preventers

* chore: dockerise ai chat service

* chore: add dockerignore file

* fix: run service cannot double execute, cannot refresh

* wip: attempt to fix video call not ending

* feat: update code viewer

* fix: working history

* nit: update access token to expire in 1d

* fix: revert attempt to close camera

* fix: dom ready

* nit: enable long polling

* chore: update CI

* chore: update run scripts for development

* feat(run-service): disable block when one user not connected to execute test case
extend timeout on frontend to 20 seconds

* feat(communication-service):
add tooltip for indicating possiblility of changing message target,
change style of changing message target

* feat(communication-service):
add notifications for call incoming
call incoming icon now vibrates
changed call icon from a video camera to a normal phone

* chore: update collab

* feat(collaboration-service):
fix notification on one user leave
fix test case cannot be submitted when one user leave
add information that room will be deleted if two people leave

* nit(ui): change buttons to be light variant by default

* fix(matching-service):
fix timer not getting deleted

* nit(ui): add loading state for history

* chore(communication-service): clean up unused functions

* fix(collaboration-service): change to params instead of query

* chore: update test code

* chore: remove /filter endpoint

* chore: remove file

* chore: change categoriesId to enum

* chore: remove meta from testCase schema

* chore: update validation for testCases

* fix(ui): show correct error message when expired

* fix(collaboration-service): enable awareness cursors

* nit(question-service): make testcode and input required

* fix(communication-service): remove unused reference variable

* chore: refactor code to follow repository pattern

* chore: update github actions

* fix: templateCode and solutionCode is now required

* feat(communication-service): add expanding chat bot

* wip: fancier code highlighting in chat

* feat(communication-service): add code block formatting

* feat(communication-service): add more qol

* feat: updated ai service backend

Renamed ai-chat-service to gen-ai-service

Added two new endpoints:
- Endpoint for analysis of failed test cases
- Endpoint for analysis of error logs

Also added chat session management with in-memory storage for user-specific sessions using API key and room ID. Now, each session for each user will have a newly instantiated chatSession, so the history will only contain chats within that session. This ensures that the responses are not affected by previous chat history that may be unrelated, which was the case previously as only one chat session is ever instantiated.

Frontend is also to now pass the google AI api key to backend when making requests, instead of relying on the API key in the .env file

* feat: integration of analysis endpoints

* chore: change ai-chat-service name and update ci

* chore: disable user service test

* chore: fix ci

* bug: change name of AI service

* chore: update generic ci

* chore: add service.js

* chore: fix ci environments

* feat: Add matching svc authentication

* fix: periodically remove inactive chat sessions

* feat(communication-service): enable room id based calling

* nit(communication-service): change event name to match convention

* chore: authentication needed for get question(s)

* fix: Refactor matching service authentication

* chore: Add nginx config for tracking

* ui(user-service): add change password (stub)

* chore: fix deploy scripts

* chore: update ci

* bug: remove -b flag

* chore: remove frontend container from docker compose

* nit(ui): change some text

* wip: gen ai service

* chore: remove unused page

* nit: change topic to category

* fix: introduce create-session endpoint

* chore: update ci and remove aws files

* chore: fix ci pipeline

* fix: ensure all endpoints integrated well with error handling

* fix: check if api key has been sent already on page load

* chore: delete attempt function

* fix: display question description html

* nit: update start script to use new AI service name

* nit: rename to useAi for consistency sake

* fix: rename to gen-ai-service

* nit: fix to useAi

* wip

* feat(user-service): integrate refresh token with frontend

* fix: enable env

* chore: cleanup yaml

* Squashed commit of the following:

commit 7f80345
Author: hollag <marcussoh38@gmail.com>
Date:   Wed Nov 13 12:02:48 2024 +0800

    chore: update token expiry

commit c3c9f14
Author: hollag <marcussoh38@gmail.com>
Date:   Wed Nov 13 11:51:46 2024 +0800

    wip

* chore: Update Collaboration Service with JWT Authorization (#115)

* feat: add token verification

* chore: update auth

* bug: update auth middleware

* chore: add some comments to explain why editing isn't needed

---------

Co-authored-by: hollag <marcussoh38@gmail.com>

* ui: cleaned up mobile navbar

* fix: ai assist buttons loading ui

* chore(gen-ai-service): refactor code

* fix: set code editor to dark mode

* nit: cleanup dark mode

* chore: update test cases

* chore: update ci env variable

* chore: add error message when user tries to navigate

* chore: delete unused Dockerfile

* fix: #122, #123

* fix: #124 by removing repeated requests

* fix: #125

* feat: change password page

* fix: issues with positioning

* fix: gen ai service edge cases

* fix: include in previous commit

* chore: update ci to update correct env file

* chore: add continue on error for docker builds

* fix: video call stuff

* wip: video call

* fix: disable test case running for database questions

* chore: unblock deployment

* bug: fix bug with rendering = signs

* fix: run test case when end session

* chore: remove 403 errors

* fix: edit redis expiry and checking token

* Push changes to Staging In Preparation for Final Submission (#110)

* chore: remove test page

* chore: add communication service to start script

* fix: update to correct question service localhost link

* chore: update scripts

* feat(history-service)!: change attempt schema

* fix: mute local

* fix: video getting hidden when chat minimized

* chore: add cors middleware

* fix: minor bugs

* chore: update dockerfile to add communication service

* wip: add console log

* fix: hardcoded socket

* fix: matching service get question before delete user

* wip: add console log

* feat: set up ai-chat-service backend

* feat: ai-chat-service frontend component (wip)

* chore: Add userId to tokens

* chore: add Dockerfile

* feat(history-service)!: change endpoints

* chore: remove debugging statements

* chore: restore user service

* wip: reduce bundle size

* fix: pin tabler-icons

* nit: add loading to button when searching

* fix: showing numbers instead of categories in search page

* nit: make session full width

* feat: add notifications on leave/rejoin

* feat: draggable video chat window

* chore: fix bugs with collab service

* feat(run-service)!: implement sse for 2 users

* chore: delete from redis

* fix: add ability to use ws for vps

* test: add test cases and fixed bugs

* test: add test cases

* fix: add language selector to switch languages for syntax highlighting

* test

* chore: cleanup console.log

* nit: remove console.log

* chore: modify test to test edge cases

* fix: no testcase found error

* chore: disable tests for some services

* chore: add builds for new services and frontend

* fix: modify response to include questionId

* chore: hide private testcases outputs

* nit: change to use personal TURN server

* chore: modify response format

* feat: add back stun server

* fix: removed function wrongly while resolving merge conflicts

* feat(run-service)!: change status to statusCode

* chore: check code attempt in test

* feat: run test case (send to server only)

* chore: modify cors

* feat: execution with loading

* fix: history service url for useApi

* fix: accidentally removed mongoose import while fixing merge conflicts

* feat: session summary page

* feat: display past attempts on dashboard (wip)

* feat: test case results

* feat: add old code submission entry

* chore: add error handling when one client disconnects

* chore: create test for disconnect

* fix: add event for start of execution

* wip

* nit: fix error message

* feat: enable parallel processing

* fix: fix executing question after both clients connects error

* chore: update ci and docker compose

* wip: first working version of peerjs

* fix: attempt details displayed on attempt card

* fix: collaborator details for attempt card and session summary page

* chore: delete kubernetes files

* fix: history service merge conflict issues

* fix: add statusCode 204

* fix: 204 statusCode in filtered question

* feat: final working version

* fix: add userId to accessToken

* fix: correct error message

* fix: id in accessToken

* wip: debug

* fix: different channelId issue

* wip: update FE to start supporting integrations

* fix: add statusCode 204 (#108)

* fix: add statusCode 204

* fix: 204 statusCode in filtered question

* fix: add userId to accessToken

* fix: correct error message

* fix: id in accessToken

* chore: update docker files

* chore: add dockerignore file

* feat: highlight Gemini

* fix: add input for questions

* fix: add type

* wip: query and display ai response

* feat: prettify integrations

* fix: ensure code editor language correspond to selected language

* feat: add loading preventers

* chore: dockerise ai chat service

* chore: add dockerignore file

* fix: run service cannot double execute, cannot refresh

* wip: attempt to fix video call not ending

* feat: update code viewer

* fix: working history

* nit: update access token to expire in 1d

* fix: revert attempt to close camera

* fix: dom ready

* nit: enable long polling

* chore: update CI

* chore: update run scripts for development

* feat(run-service): disable block when one user not connected to execute test case
extend timeout on frontend to 20 seconds

* feat(communication-service):
add tooltip for indicating possiblility of changing message target,
change style of changing message target

* feat(communication-service):
add notifications for call incoming
call incoming icon now vibrates
changed call icon from a video camera to a normal phone

* chore: update collab

* feat(collaboration-service):
fix notification on one user leave
fix test case cannot be submitted when one user leave
add information that room will be deleted if two people leave

* nit(ui): change buttons to be light variant by default

* fix(matching-service):
fix timer not getting deleted

* nit(ui): add loading state for history

* chore(communication-service): clean up unused functions

* fix(collaboration-service): change to params instead of query

* chore: update test code

* chore: remove /filter endpoint

* chore: remove file

* chore: change categoriesId to enum

* chore: remove meta from testCase schema

* chore: update validation for testCases

* fix(ui): show correct error message when expired

* fix(collaboration-service): enable awareness cursors

* nit(question-service): make testcode and input required

* fix(communication-service): remove unused reference variable

* chore: refactor code to follow repository pattern

* chore: update github actions

* fix: templateCode and solutionCode is now required

* feat(communication-service): add expanding chat bot

* wip: fancier code highlighting in chat

* feat(communication-service): add code block formatting

* feat(communication-service): add more qol

* feat: updated ai service backend

Renamed ai-chat-service to gen-ai-service

Added two new endpoints:
- Endpoint for analysis of failed test cases
- Endpoint for analysis of error logs

Also added chat session management with in-memory storage for user-specific sessions using API key and room ID. Now, each session for each user will have a newly instantiated chatSession, so the history will only contain chats within that session. This ensures that the responses are not affected by previous chat history that may be unrelated, which was the case previously as only one chat session is ever instantiated.

Frontend is also to now pass the google AI api key to backend when making requests, instead of relying on the API key in the .env file

* feat: integration of analysis endpoints

* chore: change ai-chat-service name and update ci

* chore: disable user service test

* chore: fix ci

* bug: change name of AI service

* chore: update generic ci

* chore: add service.js

* chore: fix ci environments

* feat: Add matching svc authentication

* fix: periodically remove inactive chat sessions

* feat(communication-service): enable room id based calling

* nit(communication-service): change event name to match convention

* chore: authentication needed for get question(s)

* fix: Refactor matching service authentication

* chore: Add nginx config for tracking

* ui(user-service): add change password (stub)

* chore: fix deploy scripts

* chore: update ci

* bug: remove -b flag

* chore: remove frontend container from docker compose

* nit(ui): change some text

* wip: gen ai service

* chore: remove unused page

* nit: change topic to category

* fix: introduce create-session endpoint

* chore: update ci and remove aws files

* chore: fix ci pipeline

* fix: ensure all endpoints integrated well with error handling

* fix: check if api key has been sent already on page load

* chore: delete attempt function

* fix: display question description html

* nit: update start script to use new AI service name

* nit: rename to useAi for consistency sake

* fix: rename to gen-ai-service

* nit: fix to useAi

* wip

* feat(user-service): integrate refresh token with frontend

* fix: enable env

* chore: cleanup yaml

* Squashed commit of the following:

commit 7f80345
Author: hollag <marcussoh38@gmail.com>
Date:   Wed Nov 13 12:02:48 2024 +0800

    chore: update token expiry

commit c3c9f14
Author: hollag <marcussoh38@gmail.com>
Date:   Wed Nov 13 11:51:46 2024 +0800

    wip

* chore: Update Collaboration Service with JWT Authorization (#115)

* feat: add token verification

* chore: update auth

* bug: update auth middleware

* chore: add some comments to explain why editing isn't needed

---------

Co-authored-by: hollag <marcussoh38@gmail.com>

* ui: cleaned up mobile navbar

* fix: ai assist buttons loading ui

* chore(gen-ai-service): refactor code

* fix: set code editor to dark mode

* nit: cleanup dark mode

* chore: update test cases

* chore: update ci env variable

* chore: add error message when user tries to navigate

* chore: delete unused Dockerfile

* fix: #122, #123

* fix: #124 by removing repeated requests

* fix: #125

* feat: change password page

* fix: issues with positioning

* fix: gen ai service edge cases

* fix: include in previous commit

* chore: update ci to update correct env file

* chore: add continue on error for docker builds

* fix: video call stuff

* wip: video call

* fix: disable test case running for database questions

* chore: unblock deployment

* bug: fix bug with rendering = signs

* fix: run test case when end session

* chore: remove 403 errors

* fix: edit redis expiry and checking token

---------

Co-authored-by: hollag <marcussoh38@gmail.com>
Co-authored-by: Lim Pei En <111886863+peienlim@users.noreply.github.com>
Co-authored-by: elaineshijie <lohelaineshijie.183@gmail.com>
Co-authored-by: pzl111 <phuazailian@gmail.com>
Co-authored-by: Marcus Soh <31369072+HollaG@users.noreply.github.com>
Co-authored-by: elaineshijie <122242919+elaineshijie@users.noreply.github.com>
Co-authored-by: pzl111 <67725787+pzl111@users.noreply.github.com>

* fix: attempt test program not showing due to bug

* fix: format code

* fix: incorrect input

* fix: ai chat

* fix: wrong highlight

---------

Co-authored-by: hollag <marcussoh38@gmail.com>
Co-authored-by: Lim Pei En <111886863+peienlim@users.noreply.github.com>
Co-authored-by: pzl111 <phuazailian@gmail.com>
Co-authored-by: elaineshijie <lohelaineshijie.183@gmail.com>
Co-authored-by: Marcus Soh <31369072+HollaG@users.noreply.github.com>
Co-authored-by: elaineshijie <122242919+elaineshijie@users.noreply.github.com>
Co-authored-by: pzl111 <67725787+pzl111@users.noreply.github.com>
  • Loading branch information
8 people authored Nov 13, 2024
1 parent a6efaf0 commit 45940aa
Show file tree
Hide file tree
Showing 218 changed files with 31,406 additions and 3,779 deletions.
70 changes: 55 additions & 15 deletions .github/workflows/generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,64 @@ jobs:
steps:
- name: Checkout Codebase
uses: actions/checkout@v4

- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

scans:
# do code scanning stuff here
needs: test
name: Code Scanning
runs-on: ubuntu-latest
steps:
- name: Checkout Codebase
uses: actions/checkout@v4
- name: Install Frontend Node Dependencies
working-directory: peer-prep
run: npm ci

images:
# build images here
name: Build Production Images
runs-on: ubuntu-latest
steps:
- name: Checkout Codebase
uses: actions/checkout@v4
- name: Test Build on Frontend
working-directory: peer-prep
run: npm run build

- name: Test User Service
working-directory: user-service
run: |
npm ci
npm run test
- name: Test Question Service
working-directory: question-service
run: |
npm ci
npm run test
- name: Test Matching Service
working-directory: matching-service
run: |
npm ci
npm run test
- name: Test Collaboration Service
working-directory: collaboration-service
run: |
npm ci
npm run test
- name: Test Communication Service
working-directory: communication-service
run: |
npm ci
npm run test
- name: Test Run Service
working-directory: run-service
run: |
npm ci
npm run test
- name: Test History Service
working-directory: history-service
run: |
npm ci
npm run test
- name: Test Gen AI Service
working-directory: gen-ai-service
run: |
npm ci
npm run test
Loading

0 comments on commit 45940aa

Please sign in to comment.