Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 802 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
802 commits
Select commit Hold shift + click to select a range
24a243a
Merge branch 'master' into forgot-password-frontend
sltsheryl Nov 2, 2023
907f035
Merge pull request #119 from CS3219-AY2324S1/fix-bug
sltsheryl Nov 2, 2023
bf76c71
Merge pull request #120 from CS3219-AY2324S1/forgot-password-frontend
sltsheryl Nov 2, 2023
721a878
Style posts on forum page
carriezhengjr Nov 2, 2023
aaa3d51
fix: show clickable link on hover
carriezhengjr Nov 2, 2023
c13708e
Add pagination for forum
carriezhengjr Nov 3, 2023
17748df
Add search function
carriezhengjr Nov 3, 2023
33ba466
Fix colour for light and dark mode
carriezhengjr Nov 3, 2023
30e14d7
Add post sorting
carriezhengjr Nov 3, 2023
64ba289
Style post detail title, username, date time
carriezhengjr Nov 3, 2023
9bc6e0f
Style upvote and downvote
carriezhengjr Nov 3, 2023
c8733da
Adjust layout for individual post page
carriezhengjr Nov 4, 2023
e6c99c9
Disable submit for empty description or whitespaces and breaks
carriezhengjr Nov 4, 2023
3edb2c3
Disable submit if title only contains whitespace(s)
carriezhengjr Nov 4, 2023
54fb4a2
feat: add function to scrape leetcode
seelengxd Nov 4, 2023
8247f31
chore: modify it to put on google cloud function
seelengxd Nov 4, 2023
24580bd
fix: overflow profile text
sltsheryl Nov 5, 2023
05729eb
fix: change languages width
sltsheryl Nov 5, 2023
77cc4c9
Merge pull request #121 from CS3219-AY2324S1/scrape-leetcode
seelengxd Nov 5, 2023
833f02c
fix: skip paid questions
seelengxd Nov 5, 2023
bea14e5
Merge pull request #123 from CS3219-AY2324S1/overflow-text
sltsheryl Nov 5, 2023
e763e31
fix: update link in email
sltsheryl Nov 5, 2023
f3217e5
Merge pull request #124 from CS3219-AY2324S1/exclude-paid-questions
chloeelim Nov 5, 2023
e3c211c
Merge pull request #125 from CS3219-AY2324S1/update-url
sltsheryl Nov 5, 2023
b1de888
feat: add whiteboard
chloeelim Nov 5, 2023
9fb241a
feat: add persistence and color mode
chloeelim Nov 5, 2023
c709d75
fix: whiteboard width
chloeelim Nov 5, 2023
3ef547b
fix: display correct question on rejoin room
seelengxd Nov 6, 2023
768207e
feat: add collaboration to whiteboard
seelengxd Nov 6, 2023
442a0c3
Merge pull request #127 from CS3219-AY2324S1/fix-rejoin-question
seelengxd Nov 6, 2023
9f6101a
style: some tiny cleanup
chloeelim Nov 6, 2023
16878b9
feat: add whiteboard awareness display
chloeelim Nov 6, 2023
74ae542
feat: add whiteboard awareness avatar
chloeelim Nov 6, 2023
02f54ac
fix(frontend): fix question overflow
seelengxd Nov 6, 2023
4f78a9b
fix: whiteboard awareness username
chloeelim Nov 6, 2023
585c2de
feat: whiteboard add user follow
chloeelim Nov 6, 2023
87c4240
Merge pull request #126 from CS3219-AY2324S1/whiteboard
chloeelim Nov 6, 2023
bdff559
Merge pull request #128 from CS3219-AY2324S1/add-collab-to-whiteboard
chloeelim Nov 6, 2023
1b25cf4
Apply suggestions from code review
seelengxd Nov 6, 2023
0f9f29b
Merge pull request #129 from CS3219-AY2324S1/fix-question-rendering
chloeelim Nov 6, 2023
69e38ee
fix: fix clown naming
chloeelim Nov 6, 2023
715aba1
feat: init help service
seelengxd Nov 6, 2023
da75b01
chore: dockerise help-service
seelengxd Nov 6, 2023
18c3d76
fix: handle invalid question id
seelengxd Nov 6, 2023
9852388
feat: add button to frontend
seelengxd Nov 6, 2023
e066359
fix: editor awareness
chloeelim Nov 6, 2023
3556838
Merge pull request #130 from CS3219-AY2324S1/add-collab-to-whiteboard
chloeelim Nov 6, 2023
c2c02b9
style: fix linter errors
seelengxd Nov 6, 2023
a49b038
fix: push missing file
chloeelim Nov 6, 2023
f8a126d
fix: push backend code too
seelengxd Nov 6, 2023
96ce7bf
fix: stop hint from getting stuck
seelengxd Nov 6, 2023
fd4e5ef
fix: add comment date time
sltsheryl Nov 6, 2023
a1e3dbc
chore: add dockerfile
sltsheryl Nov 6, 2023
257e7d4
feat: hint markdown
chloeelim Nov 6, 2023
b16109c
fix: whiteboard awareness username
chloeelim Nov 6, 2023
b75eaf9
feat: whiteboard add user follow
chloeelim Nov 6, 2023
b3784a1
Merge pull request #132 from CS3219-AY2324S1/fix-awareness
chloeelim Nov 6, 2023
5bc4520
fix: accidentally removed api gateway
sltsheryl Nov 6, 2023
98a5a48
Merge branch 'master' into forum-service
carriezhengjr Nov 6, 2023
91e0970
fix: fix clown naming
chloeelim Nov 6, 2023
82f6de2
add: comments on changing implementation
juslam19 Nov 7, 2023
6e86ebf
fix: editor awareness
chloeelim Nov 6, 2023
e95cf15
fix: push missing file
chloeelim Nov 6, 2023
db15f2f
feat: add button to frontend
seelengxd Nov 6, 2023
6be447e
feat: add more styling to hint
chloeelim Nov 7, 2023
aae7ce4
fix: styling error
chloeelim Nov 7, 2023
eb355d4
Merge branch 'master' into init-help-service
chloeelim Nov 7, 2023
326d642
fix: style missing eof new line
chloeelim Nov 7, 2023
8f6096f
Merge pull request #131 from CS3219-AY2324S1/init-help-service
chloeelim Nov 7, 2023
a57f013
refactor: collaboration room apis
chloeelim Nov 7, 2023
fa664cf
fix: push missing file
chloeelim Nov 7, 2023
99cfb66
refactor[collab room]: toasts
chloeelim Nov 7, 2023
852b952
refactor(collab room): clean up sockets
chloeelim Nov 7, 2023
11bb45c
refactor(collaboration room): clean up user toasts
chloeelim Nov 7, 2023
3da44bd
chore: move dockerfile
seelengxd Nov 7, 2023
f39931c
fix(help-service): fix dockerfile
seelengxd Nov 7, 2023
304d97c
fix: minor touch ups
chloeelim Nov 7, 2023
c8d7c3f
fix dockerfile again
seelengxd Nov 7, 2023
faac109
fix: question not loading?
chloeelim Nov 7, 2023
b864484
fix: wrong http method
chloeelim Nov 7, 2023
565082d
Merge pull request #134 from CS3219-AY2324S1/move-dockerfile
seelengxd Nov 7, 2023
69c0b2b
feat: view, add, (partially working) upvote and downvote comments
juslam19 Nov 8, 2023
d6ce98c
Merge branch 'forum-service' of github.com:CS3219-AY2324S1/ay2324s1-c…
juslam19 Nov 8, 2023
e4c6da6
fix: preserve ordering after upvote and downvote of comments
juslam19 Nov 8, 2023
52678f7
feat: delete comment implemented with sorting after deletion
juslam19 Nov 8, 2023
2d11115
fix: prettier and eslint errors
juslam19 Nov 8, 2023
38c0880
feat: oauth skeleton
chloeelim Nov 8, 2023
6f0df70
feat: oauth new user creation
chloeelim Nov 8, 2023
23180b2
feat: add editing of comments
juslam19 Nov 8, 2023
4318410
fix: get tests to shut up
juslam19 Nov 8, 2023
e9137d2
refactor: clean up code
chloeelim Nov 8, 2023
09464dc
fix: oauth api logic
chloeelim Nov 8, 2023
53a1bab
feat(oauth): add ui styling
chloeelim Nov 8, 2023
5bbeaad
fix(oauth): make email compulsory
chloeelim Nov 8, 2023
3bd920f
fix: edit dockerfile
sltsheryl Nov 9, 2023
d931ff2
Edit post
carriezhengjr Nov 9, 2023
0792ce3
Merge branch 'forum-service' of https://github.com/CS3219-AY2324S1/ay…
carriezhengjr Nov 9, 2023
e9e987b
Add margin between edit and delete buttons
carriezhengjr Nov 9, 2023
f0f6693
fix: db schema, frontend looks
juslam19 Nov 9, 2023
65f9a29
Change routes for add and edit post
carriezhengjr Nov 9, 2023
4743b4c
Remove backend searchPost function
carriezhengjr Nov 9, 2023
71fb7c3
Merge branch 'forum-service' of github.com:CS3219-AY2324S1/ay2324s1-c…
juslam19 Nov 9, 2023
ba602a5
fix margin for edit and delete post buttons
carriezhengjr Nov 9, 2023
d81e448
fix: consistent frontend look for post and comments
juslam19 Nov 9, 2023
95cbb24
Merge branch 'forum-service' of github.com:CS3219-AY2324S1/ay2324s1-c…
juslam19 Nov 9, 2023
f545bea
Display total number of comments for each posts
carriezhengjr Nov 9, 2023
45cb1d3
attempt to use backend and change jwt to use only id
juslam19 Nov 9, 2023
93c4dbf
fix(forum-service): download express and cors
seelengxd Nov 9, 2023
0b90914
fix: try solving typescript errors
carriezhengjr Nov 9, 2023
0b111d1
fix(forum): modify dockerfile
seelengxd Nov 9, 2023
9cec81c
feat: proper backend for refreshToken jwt
juslam19 Nov 9, 2023
deb8572
some minor changes
juslam19 Nov 9, 2023
038d207
fix: update user profile works again
juslam19 Nov 9, 2023
1f3adc9
fix: logout without needing access tokens
juslam19 Nov 9, 2023
c53d69d
fix: improve comment styling
sltsheryl Nov 10, 2023
c01b073
fix: styling edit forum
sltsheryl Nov 10, 2023
d06245d
fix: remove search comment
sltsheryl Nov 10, 2023
6726438
fix: change sorting buttons
sltsheryl Nov 10, 2023
5780407
fix: change delete button
sltsheryl Nov 10, 2023
8b3685e
fix: more forum styling
sltsheryl Nov 10, 2023
fb43a62
IMPORTANT fix: middleware previously used UserWithoutPassword to User…
juslam19 Nov 10, 2023
041ffd9
fix: some typos
sltsheryl Nov 10, 2023
d513a64
fix: delete post (foreign key delete associated comments
sltsheryl Nov 10, 2023
891f8f7
fix: forum avatar picture
sltsheryl Nov 10, 2023
213f924
Merge pull request #135 from CS3219-AY2324S1/gh-oauth
chloeelim Nov 10, 2023
39a0000
Merge pull request #108 from CS3219-AY2324S1/forum-service
sltsheryl Nov 10, 2023
934c7af
fix: spacing styling
sltsheryl Nov 10, 2023
68658fc
Merge pull request #137 from CS3219-AY2324S1/style-fixes
sltsheryl Nov 11, 2023
b146e6d
chore: add other services to api gateway
seelengxd Nov 5, 2023
4673e76
fix: change y-websocket url
seelengxd Nov 5, 2023
58931b8
broken
seelengxd Nov 5, 2023
0e84c53
fix: still trying to salvage api-gateway
seelengxd Nov 11, 2023
acdf039
chore(api-gateway): add forum service
seelengxd Nov 11, 2023
f538a76
fix: logout requiring access token
juslam19 Nov 11, 2023
0e56cc1
Merge pull request #138 from CS3219-AY2324S1/add-to-api-gateway
seelengxd Nov 11, 2023
e7d5563
fix: logout, access and refresh token generation only use role and id…
juslam19 Nov 11, 2023
0717997
fix: logout, access and refresh token generation only use role and id…
juslam19 Nov 11, 2023
5f90506
attempt to fix end of line from crlf to lf
juslam19 Nov 11, 2023
8d41080
merged with master (includes oauth)
juslam19 Nov 11, 2023
6fdf673
work in progress: having issues migrating db to prisma client and doc…
juslam19 Nov 11, 2023
ee9c3c6
docs: add readme
sltsheryl Nov 12, 2023
fea462c
fix: fix typo
sltsheryl Nov 12, 2023
d96e8af
merged with master
juslam19 Nov 12, 2023
ba94db4
mostly works for jwt, bug: need to refresh profile page upon login to…
juslam19 Nov 12, 2023
ae7c2f2
Merge pull request #139 from CS3219-AY2324S1/readme
chloeelim Nov 12, 2023
f96786a
Merge branch 'master' into fix-collab-service
chloeelim Nov 12, 2023
50027ca
Merge pull request #133 from CS3219-AY2324S1/fix-collab-service
chloeelim Nov 12, 2023
8476878
Update README.md
sltsheryl Nov 13, 2023
f9c7a28
fix(matching): disallow same user matching
seelengxd Nov 13, 2023
467cabd
fix docker-compose.yml
seelengxd Nov 13, 2023
ed3e5ed
Merge pull request #141 from CS3219-AY2324S1/fix-same-user-match
sltsheryl Nov 13, 2023
f36e910
Merge pull request #140 from CS3219-AY2324S1/sltsheryl-patch-1
sltsheryl Nov 13, 2023
cc76e10
fix: add another environment variable for path
seelengxd Nov 13, 2023
2236eaf
Merge pull request #142 from CS3219-AY2324S1/fix-api-gateway-2
seelengxd Nov 13, 2023
b252dfb
Merge branch 'master' into update-jwt
juslam19 Nov 13, 2023
6016a16
fix: collab service question retrieveal
juslam19 Nov 13, 2023
ce22d91
Merge branch 'update-jwt' of github.com:CS3219-AY2324S1/ay2324s1-cour…
juslam19 Nov 13, 2023
48baa34
prettier errors
juslam19 Nov 13, 2023
a926bdf
Merge pull request #136 from CS3219-AY2324S1/update-jwt
juslam19 Nov 13, 2023
c5a3b98
Revert "URGENT JWT Fixes: Backend Storage, Bugs"
juslam19 Nov 13, 2023
231ff82
Merge pull request #143 from CS3219-AY2324S1/revert-136-update-jwt
juslam19 Nov 13, 2023
adef7f4
Revert "Revert "URGENT JWT Fixes: Backend Storage, Bugs""
juslam19 Nov 13, 2023
0a2d9fa
Merge pull request #144 from CS3219-AY2324S1/revert-143-revert-136-up…
juslam19 Nov 13, 2023
bfe547e
attempt: add jwt to matching
juslam19 Nov 14, 2023
a2206c3
part 2 of previous commit
juslam19 Nov 14, 2023
4d70d98
feat: forum-service jwt
juslam19 Nov 14, 2023
712e7eb
Update jwt.ts
juslam19 Nov 14, 2023
26c7081
Merge pull request #146 from CS3219-AY2324S1/juslam19-patch-1
juslam19 Nov 14, 2023
375d7c4
fix: add back stuff to login
seelengxd Nov 14, 2023
0e64f2a
Merge pull request #147 from CS3219-AY2324S1/fix-login
seelengxd Nov 14, 2023
5e415bb
Merge pull request #145 from CS3219-AY2324S1/jwt-forum-service
juslam19 Nov 14, 2023
4365820
fix: logs out after update profile, remove axios methods, 1d access t…
juslam19 Nov 14, 2023
20e615f
fix: update user profile updates access and refresh tokens
juslam19 Nov 14, 2023
267443f
fix: broadcast only to rooms
juslam19 Nov 14, 2023
f14718a
Merge pull request #149 from CS3219-AY2324S1/fix-chat-rooms
juslam19 Nov 14, 2023
60428db
Merge pull request #148 from CS3219-AY2324S1/simplify-jwt
juslam19 Nov 14, 2023
a721617
Add toast for successful profile update
carriezhengjr Nov 14, 2023
dd5372c
Merge pull request #150 from CS3219-AY2324S1/update-profile
carriezhengjr Nov 14, 2023
771b9cb
fix global emitting chat service
juslam19 Nov 14, 2023
34c3ba5
fix: hash oauth pw
chloeelim Nov 14, 2023
6a173ba
Merge pull request #151 from CS3219-AY2324S1/fix-view-profile
juslam19 Nov 14, 2023
3af0bb3
commit so I can merge
juslam19 Nov 14, 2023
3b9202c
carriage return prettier errors
juslam19 Nov 14, 2023
b7b0a4e
fix merge conflicts
juslam19 Nov 14, 2023
61f3650
fix: move code exec api to backend
chloeelim Nov 14, 2023
3c0ab94
feat: add visibility toggle for password
chloeelim Nov 14, 2023
82f610c
feat: confirmation dialog for question deletion
chloeelim Nov 14, 2023
a4fc6be
fix: question table loading
chloeelim Nov 14, 2023
3d88839
feat: add logout confirmation
chloeelim Nov 14, 2023
e23e2c4
add auth to collab and matching services
juslam19 Nov 14, 2023
a31afc8
feat: jwt chat service
juslam19 Nov 14, 2023
75f688e
fix: remove practice room password
chloeelim Nov 14, 2023
b250289
(I think) feat: collab buttons jwt most likely works, please help test
juslam19 Nov 14, 2023
7b62582
fix for bug: collab service - buttons now work
juslam19 Nov 14, 2023
2e6b63e
chat notifications made more consistent
juslam19 Nov 14, 2023
67ba483
restore: earlier commented out the rabbitmq consumer, as it kept cras…
juslam19 Nov 14, 2023
19908bf
Merge pull request #152 from CS3219-AY2324S1/final-touch-ups
juslam19 Nov 14, 2023
b233f7a
fix: api-gateway code executor
chloeelim Nov 14, 2023
fd9d14b
IMPORTANT: makes them actually work!
juslam19 Nov 14, 2023
5de284c
fix chat file time display
juslam19 Nov 14, 2023
877026f
remove non-working code, AND UNCOMMENTED RABBITMQ
juslam19 Nov 14, 2023
11ff72c
prettier fixes
juslam19 Nov 14, 2023
176bc3f
Merge branch 'master' into expand-jwt
juslam19 Nov 14, 2023
612cf4b
Merge pull request #153 from CS3219-AY2324S1/final-touch-ups
seelengxd Nov 14, 2023
23512db
fix: add path to executor
seelengxd Nov 15, 2023
d391ee0
fix: api-gateway
chloeelim Nov 15, 2023
54801f1
Merge pull request #156 from CS3219-AY2324S1/final-touch-ups
seelengxd Nov 15, 2023
87af70d
Merge pull request #154 from CS3219-AY2324S1/expand-jwt
juslam19 Nov 15, 2023
f7b33b5
Merge pull request #155 from CS3219-AY2324S1/fix-gw
juslam19 Nov 15, 2023
3389557
Update jwt.ts 30d refresh token
juslam19 Nov 15, 2023
590938c
Merge pull request #157 from CS3219-AY2324S1/juslam19-patch-2
seelengxd Nov 15, 2023
77f1114
docs: add report
seelengxd Nov 15, 2023
28c6856
Merge pull request #158 from CS3219-AY2324S1/add-report
seelengxd Nov 15, 2023
dda9f92
fix: remove extraneous slash
chloeelim Nov 15, 2023
c94b010
docs: add steps to README.md
seelengxd Nov 15, 2023
15ded04
Merge pull request #159 from CS3219-AY2324S1/final-touch-ups
chloeelim Nov 15, 2023
4e28770
Merge pull request #160 from CS3219-AY2324S1/add-stuff
seelengxd Nov 15, 2023
09d705e
feat: finalise submission
chloeelim Nov 15, 2023
222c76a
Merge pull request #161 from CS3219-AY2324S1/finalise-submission
juslam19 Nov 15, 2023
c8fa608
docs: add assignment 5
sltsheryl Nov 17, 2023
fe481ca
docs: add npm start
sltsheryl Nov 17, 2023
92c3fd3
Add Assignment 1 readme
carriezhengjr Nov 17, 2023
bb37939
fix: docs npm start
sltsheryl Nov 17, 2023
1b2ff36
Merge branch 'assignment5readme' of github.com:CS3219-AY2324S1/ay2324…
sltsheryl Nov 17, 2023
8f50dff
docs: add table to assignment 1
sltsheryl Nov 17, 2023
459dc2a
docs: add assignment 4
seelengxd Nov 17, 2023
91ba731
add README.md with included .env content
juslam19 Nov 17, 2023
b2ef34f
Merge pull request #162 from CS3219-AY2324S1/assignment5readme
juslam19 Nov 17, 2023
a2dbd81
Merge pull request #163 from CS3219-AY2324S1/assignment-4-docs
juslam19 Nov 17, 2023
cc0826b
Add instructions to wait for questions to appear
carriezhengjr Nov 18, 2023
19773f4
Update Assignment1.md
carriezhengjr Nov 18, 2023
ae01691
Merge pull request #165 from CS3219-AY2324S1/assignment-3-docs
juslam19 Nov 18, 2023
6e5e8d1
Update Assignment1.md
carriezhengjr Nov 18, 2023
4ec6efb
Update Assignment1.md
carriezhengjr Nov 18, 2023
0397787
Update Assignment1.md
carriezhengjr Nov 18, 2023
e1408a7
Merge pull request #166 from CS3219-AY2324S1/assignment5readme
carriezhengjr Nov 18, 2023
5a88b01
chore: add assignment 2 readme
chloeelim Nov 18, 2023
1d21b62
Update Assignment5.md
sltsheryl Nov 18, 2023
e25d2c5
removed .env contents from Assignment3.md
juslam19 Nov 18, 2023
af99b35
Merge pull request #168 from CS3219-AY2324S1/sltsheryl-patch-2
juslam19 Nov 18, 2023
5493b2b
Update Assignment2.md
juslam19 Nov 18, 2023
d269775
Merge pull request #167 from CS3219-AY2324S1/assignment-2-submission-…
chloeelim Nov 18, 2023
a4b3985
Merge pull request #169 from CS3219-AY2324S1/assignment-3-docs
chloeelim Nov 18, 2023
8f9e8e7
changed assignment3.md
juslam19 Nov 18, 2023
05ee0d1
assignment 2 instructions finalization
chloeelim Nov 18, 2023
4cf86e6
fix: assignment readme
sltsheryl Nov 18, 2023
52cc531
Merge pull request #170 from CS3219-AY2324S1/assignment-3-docs
sltsheryl Nov 18, 2023
f38f80c
Merge pull request #171 from CS3219-AY2324S1/add-readme
sltsheryl Nov 18, 2023
0b21c58
Merge pull request #172 from CS3219-AY2324S1/finalise-submission
chloeelim Nov 18, 2023
104ec41
add deadline
github-classroom[bot] Nov 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy frontend

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest
env:
REACT_APP_BACKEND_URL: ${{ secrets.REACT_APP_BACKEND_URL }}
REACT_APP_USER_SERVICE_BACKEND_URL: ${{ secrets.REACT_APP_USER_SERVICE_BACKEND_URL }}
REACT_APP_COLLABORATION_SERVICE_BACKEND_URL: ${{ secrets.REACT_APP_COLLABORATION_SERVICE_BACKEND_URL }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Dependencies and Build
run: |
cd frontend
export NODE_OPTIONS="--max_old_space_size=4096"
npm ci
npm run build
24 changes: 24 additions & 0 deletions .github/workflows/question-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy question service

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest
env:
MONGO_CONNECTION_STRING: ${{ secrets.MONGO_CONNECTION_STRING }}
PORT: 8080
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build the Docker image
run: docker build -t question-service -f backend/question-service/Dockerfile backend/question-service

- name: Run the Docker container with MongoDB
run: |
docker run -e MONGO_CONNECTION_STRING -e PORT -p $PORT:8080 -d question-service
130 changes: 130 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
build
coverage
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"endOfLine": "lf"
}
18 changes: 18 additions & 0 deletions Assignment1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Assignment 1: CRUD Question Bank

## To setup and execute

| **Step** | **Description** |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Download the zip file named `ay2324s1-course-assessment-g17-Assignment-1-updated.zip` from [Assignment-1-updated](https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g17/releases/tag/Assignment-1-updated). |
| 2 | Unzip the file and navigate to the folder `ay2324s1-course-assessment-g17-Assignment-1-updated`. |
| 3 | Set up the environment variables in `.env` for `backend/question-service` and `frontend`. They can be found in our submission on Canvas for private variables. |
| 4 | `cd` into `backend/question-service` and `frontend`. Run `npm install` to install the dependencies for `question-service` and `frontend`. Note: You may need to run `npm i --save-dev @types/cors` and `npm i --save-dev @types/express` should you encounter any errors. |
| 5 | In `frontend` and `backend/question-service`, run `npm start`. Access the frontend by navigating to `localhost:3000` in your browser. |
| 6 | The question table on the landing page will be flashing at first. This is because all our questions in the final database are scraped from Leetcode, so it would take a while, as long as 3 minutes, to get and load all 2354 questions. Wait for the question table containing questions to appear on the landing page before performing CRUD. Note: You may have to wait again after creating, editing or deleting a question. We apologise for the inconvenience, and seek your understanding. |

Before:
<img width="1672" alt="Screenshot 2023-11-18 at 13 41 45" src="https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g17/assets/97394017/dbbfbcf9-8463-4d36-810d-b919f7dff1ca">

After waiting:
<img width="1672" alt="Screenshot 2023-11-18 at 13 50 03" src="https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g17/assets/97394017/5d4b858a-083e-4028-9170-f1d71652c222">
52 changes: 52 additions & 0 deletions Assignment2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Assignment 2

> [!IMPORTANT]
> As of late, the list of questions appear to take very long to load, as there are over 2000 being fetched. Please wait for a minute and a half if you see no questions on the question list page. We apologise for the inconvenience, and seek your understanding.

## To set up and execute

### Download
Download the ZIP file named `ay2324s1-course-assessment-g17-Assignment-2-Updated.zip` from [Assignment-2-Updated](https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g17/releases/tag/Assignment-2-Updated).
2. Unzip the file and navigate to the folder `ay2324s1-course-assessment-g17-Assignment-2-Updated`.

### Include .env files
3. Set up the environment for the question service, user service, and frontend by including the `.env` files for each, which have been submitted separately on CANVAS. Make sure they are `.env` files within the question service, user service, and frontend directories.

### Install dependencies
4. Change into each directory (`frontend`, `backend/question-service`, `backend/user-service`) and run `npm install` to install the dependencies for the question service, user service, and frontend.

Note: You may need to run `npm i --save-dev @types/cors` and `npm i --save-dev @types/express` should you encounter any errors.

### Set up postgresql
5. Start the postgresql used by the frontend by running below on another terminal window.

```
docker run --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres;
```

6. Then navigate to the user service directory (i.e. `ay2324s1-course-assessment-g17-Assignment-2-Updated/ay2324s1-course-assessment-g17-Assignment-2-Updated/backend/user-service`) and run the following commands:

```
npx prisma db push
npx prisma db seed
```

This will set up the postgresql database schema, and also seed the database with 1 ADMIN role user account, the "designated maintainer role" account, and 1 USER role user accounts, "registered users". Details for usernames and passwords below.

```
ADMIN role account details:
username: admin_user
password: admin_password

USER role account details:
username: regular_user
password: user_password
```

Other accounts signed up from the application interface are all USER role user accounts, "registered users".

## Finished set up
7. `npm start` the question service, user service, and frontend.

## Notes
To see the user database, you can simply run the command `npx prisma studio`, which will open up an interface for you to easily view the user database.
51 changes: 51 additions & 0 deletions Assignment3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Assignment 3

> [!IMPORTANT]
> As of late, the list of questions appear to take very long to load, as there are over 2000 being fetched. Please wait for a minute and a half if you see no questions on the question list page. We apologise for the inconvenience, and seek your understanding.

## To set up and execute

### Download
1. Download the ZIP file named `ay2324s1-course-assessment-g17-Assignment-3-updated.zip` from the [Assignment-3-updated](https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g17/releases/tag/Assignment-3-updated).
2. Unzip the file and navigate to the folder `ay2324s1-course-assessment-g17-Assignment-3-updated`.

### Include .env files
3. Set up the environment for the question service, user service, and frontend by including the `.env` files for each, which have been submitted as:
`Assignment3-question-service-environmentVariables.txt`,
`Assignment3-user-service-environmentVariables.txt`,
`Assignment3-frontend-environmentVariables.txt` respectively.
Make sure they are `.env` files within the question service, user service, and frontend directories.

### Install dependencies
4. Run `npm install` to install the dependencies for the question service, user service, and frontend.

### Set up postgresql
5. Start the postgresql used by the frontend by running below on another terminal window.

```
docker run --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres;
```

6. Then navigate to the user service directory (i.e. `ay2324s1-course-assessment-g17-Assignment-3-updated/ay2324s1-course-assessment-g17-Assignment-3-updated/backend/user-service`) and run the following commands:

```
npx prisma db push
npx prisma db seed
```

This will set up the postgresql database schema, and also seed the database with 1 ADMIN role user account, the "designated maintainer role" account, and 1 USER role user accounts, "registered users". Details for usernames and passwords below.

```
ADMIN role account details:
username: admin_user
password: admin_password

USER role account details:
username: regular_user
password: user_password
```

Other accounts signed up from the application interface are all USER role user accounts, "registered users".

## Finished set up
7. `npm start` the question service, user service, and frontend.
60 changes: 60 additions & 0 deletions Assignment4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Assignment-4

## To set up and execute

1. Download and unzip the file for [Assignment 4](https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g17/archive/refs/tags/Assignment-4.zip). `cd` into it.
2. Set up environment variables.
> The unredacted environment variable `MONGO_CONNECTION_STRING` can be found in our Canvas submission for private variables.

- frontend
- Save the frontend variables under `frontend/.env`.
```
REACT_APP_BACKEND_URL=http://localhost:8080/api
REACT_APP_USER_SERVICE_BACKEND_URL=http://localhost:8000/
```
- user-service

- Save the user-service variables twice in `backend/user-service/.env` and `backend/user-service/.env.docker`
- backend/user-service/.env.docker
```
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/peerprep?schema=public"
PORT=8000
JWT_SECRET="secret"
FRONTEND_URL="http://localhost:3000"
```
- backend/user-service/.env
(need to change DATABASE_URL because we would not be in docker compose's network)
```
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/peerprep?schema=public"
PORT=8000
JWT_SECRET="secret"
FRONTEND_URL="http://localhost:3000"
```

- question-service
- Save the question-service variables under `backend/question-service/.env`
```
MONGO_CONNECTION_STRING=<redacted>
PORT=8080
FRONTEND_URL="http://localhost:3000"
```

3. Actually run it with Docker.

- Option 1 (recommended): Docker Compose
1. cd into all frontend/backend services and type `npm install`
2. `docker-compose up`
- Option 2: Running individually with `docker`
1. Navigate to the folder of the zip file you unzipped previously.
2. `cd backend/question-service`
3. `docker build . -t question-service && docker run -p 8080:8080 -d question-service`
4. Open another terminal tab. Repeat step 1.
5. `cd backend/user-service`
6. `docker build . -t user-service && docker run -p 8000:8000 -d user-service`

4. Testing

- If you used option 1, the frontend should be up as well, navigate to http://localhost:3000 to see the results.
- If you used option 2, you can use some curl commands to verify the services work
- Question service: `curl localhost:8080/api/questions/1`
- User service: `curl localhost:8000/currentUser`
16 changes: 16 additions & 0 deletions Assignment5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Assignment 5: Queue for Matching

## To set up and execute

| **Step** | **Description** |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Download the zip file named `ay2324s1-course-assessment-Assignment-5.zip` from [Assignment-5-updated](https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g17/releases/tag/Assignment-5-updated). |
| 2 | Unzip the file and navigate to the folder `ay2324s1-course-assessment-Assignment-5`. |
| 3 | Set up the environment variables in `.env` for each of the microservices in the `backend`, as well as, for the `frontend`. They can be found in our submission on Canvas for private variables. |
| 4 | Run `npm install` to install the dependencies for each microservice and `frontend`. Note: You may need to run `npm i --save-dev @types/cors` and `npm i --save-dev @types/express` should you encounter any errors. |
| 5 | Run `brew install rabbitmq` to install RabbitMQ. |
| 6 | Run `rabbitmq-plugins enable rabbitmq_management` to enable the RabbitMQ management plugin. |
| 7 | Run `brew services start rabbitmq` to start the RabbitMQ server. |
| 8 | To ensure that the RabbitMQ server is running, navigate to `http://localhost:15672/` and login with the default credentials `guest` and `guest`. Note: If RabbitMQ is already running, you may want to run `brew services restart rabbitmq` instead. |
| 9 | Run `npm start` and navigate to `http://localhost:3000/` to access the frontend. |
| 10 | Once a successful match is made, you can verify the queue is working by navigating to `http://localhost:15672/#/queues`. You should see the queue `match_results` if it is successful. |
Binary file added G17_Report.pdf
Binary file not shown.
Loading