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 280 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
280 commits
Select commit Hold shift + click to select a range
25a2a9a
Add new global css variable for input variant
jmsandiegoo Oct 1, 2024
d0de02b
Add stepper component for multi step form
jmsandiegoo Oct 1, 2024
c48e64c
Add basic type for user, prociciency and langauges
jmsandiegoo Oct 1, 2024
7e489f5
Add jsonwebtoken package dependency
rickkoh Oct 2, 2024
a9b60f7
Update Response.ts to support any Zod object type
rickkoh Oct 2, 2024
e988c3a
Add authentication, token, user types and response schemas
rickkoh Oct 2, 2024
dc87291
Add authentication service for login, signup, and logout
rickkoh Oct 2, 2024
324b653
Update sign-in page with form validation and submission
rickkoh Oct 2, 2024
4c13e8b
Add middleware for protecting dashboard route
rickkoh Oct 2, 2024
695e464
Add UserContext with user profile and provider functionality
rickkoh Oct 2, 2024
5b71754
Refactor DashboardLayout to use UserProvider
rickkoh Oct 2, 2024
12a3262
Update welcome message to display user's email dynamically
rickkoh Oct 2, 2024
4d7791d
Add LogoutButton component for user logout functionality
rickkoh Oct 2, 2024
3a7168b
Update AccessTokenPayloadSchema and types
rickkoh Oct 2, 2024
f08e9c7
Add refresh access token functionality
rickkoh Oct 2, 2024
5254150
Add function to retrieve and refresh access token
rickkoh Oct 2, 2024
4884d5c
Add user service endpoints
Jajared Oct 2, 2024
aef68b4
Merge pull request #56 from CS3219-AY2425S1/ms3-jared/user-service
evanyan13 Oct 2, 2024
92bdaeb
Add password request feature
Jajared Oct 2, 2024
b19c290
Merge pull request #57 from CS3219-AY2425S1/ms3-jared/reset-password
evanyan13 Oct 2, 2024
7bcbab4
MS3 BE: Enhance Swagger Docs + Add RBAC (#55)
evanyan13 Oct 3, 2024
4d3a225
Merge branch 'ms3' of https://github.com/CS3219-AY2425S1/cs3219-ay242…
rickkoh Oct 3, 2024
a1d4893
Add authorization token to API requests for security
rickkoh Oct 3, 2024
088fa70
Add redirect to signin page on unauthorized status code
rickkoh Oct 3, 2024
07c9b5a
Add roles field to AccessTokenPayloadSchema
rickkoh Oct 3, 2024
0b130b5
Add roles array to UserProfile schema definition
rickkoh Oct 3, 2024
b4e10d9
Add AccessTokenPayload validation to parseJwt function
rickkoh Oct 3, 2024
5116eda
Add user role check for creating questions
rickkoh Oct 3, 2024
8acd140
Add user role check for action column
rickkoh Oct 3, 2024
09644ab
Add basic onboard frontend components
jmsandiegoo Oct 3, 2024
1cceb68
Add isOnboarded field to JWT token
evanyan13 Oct 5, 2024
08f40a4
Merge pull request #59 from CS3219-AY2425S1/ms3-evan/edit-jwt
evanyan13 Oct 5, 2024
13b5d46
Merge branch 'ms3-frontend' into ms3-jmsandiegoo/frontend-onboarding
jmsandiegoo Oct 6, 2024
c73d52f
Fix error with onboardcontext after merge
jmsandiegoo Oct 6, 2024
13e8a74
Merge branch 'ms3' into ms3-frontend
jmsandiegoo Oct 6, 2024
45e078e
Update user type to support onboarding as well
jmsandiegoo Oct 6, 2024
c350523
Refactor Navbar component to use LogoutButton component
rickkoh Oct 6, 2024
741027a
Merge branch 'ms3-frontend' of https://github.com/CS3219-AY2425S1/cs3…
rickkoh Oct 6, 2024
cf73e05
Add isOnboarded property in user type
jmsandiegoo Oct 6, 2024
c25ec32
Update AuthCredentials.ts SignupDataSchema fields
rickkoh Oct 6, 2024
203c637
Add SignupDataSchema validation to signup function
rickkoh Oct 6, 2024
e261989
Implement signup function
rickkoh Oct 6, 2024
dc61b09
Ms3 shavonne/profile management (#60)
shavonneg Oct 6, 2024
44a8401
Add load spinner component
jmsandiegoo Oct 6, 2024
bb1e83e
Link profile service to backend (#61)
Jajared Oct 6, 2024
1375df3
Implement basic onboarding
jmsandiegoo Oct 6, 2024
203ea32
Merge branch 'ms3-frontend' into ms3-jmsandiegoo/frontend-onboarding
jmsandiegoo Oct 6, 2024
57755c0
Implement onboard middleware
jmsandiegoo Oct 6, 2024
6cbcdc3
Update expiry time for access token
evanyan13 Oct 6, 2024
fc9db08
Update UserContext to use util parseJwt
jmsandiegoo Oct 6, 2024
5960c22
Revert "Update UserContext to use util parseJwt"
jmsandiegoo Oct 6, 2024
c275ad0
Merge pull request #62 from CS3219-AY2425S1/ms3-jmsandiegoo/frontend-…
rickkoh Oct 6, 2024
bbba0dc
Merge pull request #70 from CS3219-AY2425S1/ms3-frontend
jmsandiegoo Oct 6, 2024
d539853
Remove username field from signup form
rickkoh Oct 6, 2024
7bf40e4
Merge pull request #71 from CS3219-AY2425S1/ms3-frontend
rickkoh Oct 6, 2024
3dbc327
Add redirect to dashboard on Home page load
rickkoh Oct 6, 2024
bbbfdcd
Add redirect functionality to dashboard page
rickkoh Oct 6, 2024
dc7cd77
Merge pull request #58 from CS3219-AY2425S1/ms3
evanyan13 Oct 6, 2024
f844eb0
Update README.md
evanyan13 Oct 6, 2024
d674335
Merge pull request #72 from CS3219-AY2425S1/evanyan13-patch-1
evanyan13 Oct 6, 2024
11c98a6
Add Toaster and useToast for notifications
rickkoh Oct 6, 2024
ffc3682
Merge branch 'ms3-frontend' into ms3
rickkoh Oct 6, 2024
b930cb3
Refactor socialLogin component to use functional component
rickkoh Oct 6, 2024
5cc7417
Update UserContext to use AccessTokenPayload instead of UserProfile
rickkoh Oct 6, 2024
5a085f5
Add eslint ignoreDuringBuilds option to next config
rickkoh Oct 6, 2024
a3000eb
Merge pull request #73 from CS3219-AY2425S1/ms3
rickkoh Oct 6, 2024
1a2c110
Create shared-network at docker compose
evanyan13 Oct 6, 2024
3cdc58a
Merge pull request #74 from CS3219-AY2425S1/ms3-evan/docker-fix
evanyan13 Oct 6, 2024
53ff387
Remove env_file from frontend docker-compose.yml
Oct 7, 2024
353ec8d
Merge pull request #75 from CS3219-AY2425S1/ms3-shavonne/docker-fix
shavonneg Oct 7, 2024
cd130dd
Add base code for matching service
Jajared Oct 7, 2024
249cfcc
Merge branch 'ms4' into ms4-jared/matching
Jajared Oct 7, 2024
ebfd967
Add redis message queue
Jajared Oct 7, 2024
a210c17
Refactor redis service
Jajared Oct 8, 2024
68a13e7
Remove ESLint configuration from next.config.mjs
rickkoh Oct 8, 2024
7855b05
Fix eslint issues
rickkoh Oct 8, 2024
1e5d972
Refactor conditional rendering in OnboardLayout component
rickkoh Oct 8, 2024
8c599a8
Refactor redis service
Jajared Oct 8, 2024
d9b3d46
Merge pull request #77 from CS3219-AY2425S1/ms4-jared/matching
evanyan13 Oct 8, 2024
cea41a7
Implement react request memoization
jmsandiegoo Oct 9, 2024
3f6e3af
Update profileminicard to be dynamic
jmsandiegoo Oct 9, 2024
af0290a
Update dashboard to ulitize request memoization
jmsandiegoo Oct 9, 2024
3c44bb1
Add DifficultyEnum type and refactor difficulty field
rickkoh Oct 9, 2024
e316c62
Add Radix UI checkbox and usehooks dependency
rickkoh Oct 9, 2024
773c977
Create Checkbox component for UI
rickkoh Oct 9, 2024
f7ab9ee
Remove unnecessary socket.js file
rickkoh Oct 9, 2024
b499288
Remove FindMatchButton component
rickkoh Oct 9, 2024
064118f
Add FindMatchContext provider for matchmaking feature
rickkoh Oct 9, 2024
6097756
Add FindMatch components for peer matching feature
rickkoh Oct 9, 2024
b77bc1a
Update import path for FindMatchButton component
rickkoh Oct 9, 2024
03c4cbc
Add setting access token to cookie store when refreshed
rickkoh Oct 9, 2024
2546fd5
Update getAccessToken function call in middleware.ts
rickkoh Oct 9, 2024
e6db4b6
Update metadata title and description in layout component
rickkoh Oct 9, 2024
9981bef
Update profile card to adhere to new useravatar props
jmsandiegoo Oct 9, 2024
604dc54
Refactor user avatar to be dynamic
jmsandiegoo Oct 9, 2024
e7dab55
Refactor env variable imports
evanyan13 Oct 9, 2024
e69c6f4
Refactor sign in component ui
jmsandiegoo Oct 10, 2024
aaa4582
Update Dialog component in TitleColumn for QuestionTable
rickkoh Oct 10, 2024
1502ea4
Add sso login button and refactor input field
jmsandiegoo Oct 10, 2024
ea4f370
Refactor sign up page
jmsandiegoo Oct 10, 2024
f6ffb9c
Implement oatuh redirect url
jmsandiegoo Oct 10, 2024
58aa3dd
Redirect to FE af social oauth
evanyan13 Oct 10, 2024
b54726b
Merge pull request #80 from CS3219-AY2425S1/ms4-evan/patch-social-oauth
evanyan13 Oct 10, 2024
d911149
Merge branch 'ms4' into ms4-evan/shared-dto
evanyan13 Oct 10, 2024
0c6f482
Merge branch 'ms4' into ms4-frontend
jmsandiegoo Oct 11, 2024
669b503
Merge branch 'ms4-frontend' into ms4-jmsandiegoo/frontend-polish
jmsandiegoo Oct 11, 2024
1dc8539
Refactor redirect sso url
jmsandiegoo Oct 11, 2024
f0491bd
Implement sso with successful redirect and middleware handling
jmsandiegoo Oct 11, 2024
2e6596c
Refactor withOnboardMiddleware
jmsandiegoo Oct 11, 2024
c204b29
Implement button disable on auth to prevent spam
jmsandiegoo Oct 11, 2024
2045846
Cleanup import statements
Oct 12, 2024
7bd58d6
Refactor Profile to UserProfile, profileService to userService
Oct 12, 2024
e88eb90
Merge branch 'ms4-jmsandiegoo/frontend-polish' of https://github.com/…
Oct 12, 2024
e9bbe13
Merge branch 'ms4-jmsandiegoo/frontend-polish' of https://github.com/…
Oct 12, 2024
dfbf3b2
Merge pull request #79 from CS3219-AY2425S1/ms4-evan/shared-dto
evanyan13 Oct 13, 2024
d61bf73
Revert "Centralise env variables handling"
evanyan13 Oct 13, 2024
6b16065
Merge pull request #81 from CS3219-AY2425S1/revert-79-ms4-evan/shared…
evanyan13 Oct 13, 2024
3c994eb
Add endpoint for SSR validation (#82)
Jajared Oct 13, 2024
717f5e0
Refactor matching logic (#83)
Jajared Oct 13, 2024
be23411
Merge branch 'ms4' of https://github.com/CS3219-AY2425S1/cs3219-ay242…
rickkoh Oct 13, 2024
91d49cb
Enable cors for websocket
evanyan13 Oct 13, 2024
5280af7
Merge branch 'ms4' of https://github.com/CS3219-AY2425S1/cs3219-ay242…
rickkoh Oct 13, 2024
bbb2049
Refactor chain.ts to activate middleware in sequence
rickkoh Oct 14, 2024
45060c8
Centralise env variable imports
evanyan13 Oct 14, 2024
d06c10b
Add validation check to ws payload
evanyan13 Oct 14, 2024
01cd1d6
Update validation handling
evanyan13 Oct 14, 2024
6684fe8
Refactor withAuthMiddleware to handle protected routes
rickkoh Oct 14, 2024
74955a7
Add withTokenRefreshMiddleware function to handle token refresh
rickkoh Oct 14, 2024
f5fa0e2
Update middleware setup with new auth and token refresh
rickkoh Oct 14, 2024
33b7ef0
Update AuthLayout to redirect to /dashboard if user is logged in
rickkoh Oct 14, 2024
0ec7bed
Export isTokenExpired function in auth.ts file
rickkoh Oct 14, 2024
773c44a
Update refreshAccessToken function to return TokenPairResponse
rickkoh Oct 14, 2024
40b242c
Add AccessTokenSchema for cookie retrieval
rickkoh Oct 14, 2024
459479f
Implement userid validation
evanyan13 Oct 14, 2024
b6542c2
Add check if user exists in socket
evanyan13 Oct 14, 2024
6f44ddf
Enforce validation on cancelMatch
evanyan13 Oct 14, 2024
a33007b
Ensure userId in payload and socket match
evanyan13 Oct 14, 2024
b493d55
Update onboard redirect logic with revamp middleware
jmsandiegoo Oct 14, 2024
f225303
Update oauth to use route handlers instead
jmsandiegoo Oct 14, 2024
8e2f51e
Add confirmMatch event
evanyan13 Oct 14, 2024
2cf310f
Delete UserContext component file
rickkoh Oct 14, 2024
02dc4b6
Add isAdmin check in QuestionTable components
rickkoh Oct 14, 2024
5939e7e
Remove TODO comments and display error message on sign in/up
rickkoh Oct 14, 2024
85a38c7
Fix oauth redirection issues with google
jmsandiegoo Oct 14, 2024
c617846
Fix dashboard redirection to onboard is not onboarded
jmsandiegoo Oct 14, 2024
4e80ea5
Merge branch 'ms4-frontend' of https://github.com/CS3219-AY2425S1/cs3…
rickkoh Oct 15, 2024
94f005d
Revert "Add confirmMatch event"
evanyan13 Oct 15, 2024
30a7636
Implement accept and decline match
evanyan13 Oct 15, 2024
ef0e1ae
Merge pull request #84 from CS3219-AY2425S1/ms4-evan/matching-logic
evanyan13 Oct 15, 2024
a4e8773
Add validation and toast feedback for auth and onboard
jmsandiegoo Oct 15, 2024
5f89b09
Add success toast and redirect to onboard after signup
rickkoh Oct 15, 2024
7b95b2c
Merge branch 'ms4' of https://github.com/CS3219-AY2425S1/cs3219-ay242…
rickkoh Oct 15, 2024
33fd9ae
Return user id in response
evanyan13 Oct 15, 2024
fcd4060
Remove comments
evanyan13 Oct 15, 2024
0ab91ae
Merge pull request #85 from CS3219-AY2425S1/ms4-evan/patch-user-response
evanyan13 Oct 15, 2024
d5c9f91
Add connected event
evanyan13 Oct 15, 2024
bb92d80
Link reset password to sign in page
Oct 15, 2024
acf60bd
Merge branch 'ms4-frontend' of https://github.com/CS3219-AY2425S1/cs3…
Oct 15, 2024
26a3724
Implement minor refactor with getAccessToken and util function for auth
jmsandiegoo Oct 15, 2024
b19a300
Refactor service files on frontend and route handler
jmsandiegoo Oct 15, 2024
f5ae21f
Fix lint issue
jmsandiegoo Oct 15, 2024
d4545a6
Remove try catch in route handler
jmsandiegoo Oct 15, 2024
d73881c
Fix route handler code format
jmsandiegoo Oct 15, 2024
02a1b2a
Merge pull request #86 from CS3219-AY2425S1/ms4-jmsandiegoo/frontend-…
jmsandiegoo Oct 15, 2024
1665d26
Merge branch 'ms4' of https://github.com/CS3219-AY2425S1/cs3219-ay242…
rickkoh Oct 16, 2024
c560e31
Implement forgot password feature
Oct 16, 2024
86b3852
Update forgot password feature to send out token
Oct 16, 2024
583e0d2
Implement password reset pages to change new password
Oct 16, 2024
5f9dd21
Update password reset confirmation page
Oct 16, 2024
5f1bdac
Handle edge case when user disconnect
evanyan13 Oct 16, 2024
fd9879c
Merge pull request #87 from CS3219-AY2425S1/ms4-evan/patch-matching-d…
evanyan13 Oct 16, 2024
c69eb4d
Refactor FindMatchContext for socket handling
rickkoh Oct 17, 2024
c9bd557
Update socket event listeners to use 'socket.once'.
rickkoh Oct 17, 2024
b394367
Add Match.ts with Match request and response schemas
rickkoh Oct 17, 2024
8e2b800
Refactor FindMatchContext
rickkoh Oct 17, 2024
12605b9
Add id field to UserProfileSchema and UpdateUserProfileSchema
rickkoh Oct 17, 2024
4856332
Merge branch 'ms4' of https://github.com/CS3219-AY2425S1/cs3219-ay242…
rickkoh Oct 17, 2024
ee4e183
Merge branch 'ms4-frontend' of https://github.com/CS3219-AY2425S1/cs3…
rickkoh Oct 17, 2024
ef95252
Improve user data handling in FindMatchButton component
rickkoh Oct 17, 2024
e435680
Update cheat panel match variable and configuration panel collapse st…
rickkoh Oct 17, 2024
5e0937d
Add function to get initials from name string
rickkoh Oct 17, 2024
6d6cab9
Update ConfirmationDialog to display user avatar initials
rickkoh Oct 17, 2024
cc891e0
Update ConfirmationDialog to pass userData prop
rickkoh Oct 17, 2024
05cbab7
Add check icon for password reset confirmation
Oct 17, 2024
6b4f079
Add usehooks-ts dependency
rickkoh Oct 17, 2024
944b905
Add timer functionality for finding match
rickkoh Oct 17, 2024
be538bf
Update finding match text to include timer in ControlButton
rickkoh Oct 17, 2024
e7b7bc3
Fix update user schema to omit id
jmsandiegoo Oct 17, 2024
bbbb481
Add event response
evanyan13 Oct 17, 2024
ecb073f
Merge pull request #89 from CS3219-AY2425S1/ms4-evan/update-matching-…
evanyan13 Oct 17, 2024
c189777
Merge branch 'ms4' into ms4-frontend
jmsandiegoo Oct 17, 2024
b380795
Co-authored-by: Jm San Diego <jmsandiegoo@users.noreply.github.com>
rickkoh Oct 17, 2024
f36f2dd
Merge pull request #88 from CS3219-AY2425S1/ms4-shavonne/profile-refa…
rickkoh Oct 17, 2024
b0f92e9
Minor fix to onboard issue with updated User type
jmsandiegoo Oct 17, 2024
2d4dafc
Merge branch 'ms4-frontend' of github.com:CS3219-AY2425S1/cs3219-ay24…
jmsandiegoo Oct 17, 2024
94f0afd
Add setShowContinueDialog to FindMatchContext
rickkoh Oct 17, 2024
d5bdc5e
Add ContinueDialog component to FindMatchButton functionality
rickkoh Oct 17, 2024
758dc89
Add ContinueDialog component for FindMatch feature
rickkoh Oct 17, 2024
eece245
Add countdown timer for match confirmation dialog
rickkoh Oct 17, 2024
fc44abe
Merge branch 'ms4-rick/frontend' into ms4-frontend
rickkoh Oct 17, 2024
d61e1cf
Add toast for match declined
Oct 18, 2024
ee7a6d8
Update user response
evanyan13 Oct 19, 2024
8b7c4ca
Update matched user profile
Oct 19, 2024
363e2b4
Remove unused toast
Oct 19, 2024
60bc1d9
Refactor onMatchFound and onMatchDeclined callbacks
rickkoh Oct 19, 2024
1d35d72
Disable CheatPanel in FindMatchButton component
rickkoh Oct 19, 2024
1299d41
Update ForgotPasswordForm component and form validation
rickkoh Oct 19, 2024
ba71de5
Merge pull request #90 from CS3219-AY2425S1/ms4-shavonne/update-match-ui
rickkoh Oct 19, 2024
342e30e
Merge pull request #91 from CS3219-AY2425S1/ms4-frontend
rickkoh Oct 19, 2024
32ae61f
Default dark mode
rickkoh Oct 19, 2024
ab01079
Merge pull request #92 from CS3219-AY2425S1/ms4-frontend
rickkoh Oct 19, 2024
8b3df2a
Add dropdown icons for difficulty and topic selections
rickkoh Oct 19, 2024
a524a9d
Update UserProfile import and handle user profile data
rickkoh Oct 19, 2024
a618f19
Add toast notification on match confirmation
rickkoh Oct 19, 2024
07e1997
Merge pull request #93 from CS3219-AY2425S1/ms4-frontend
rickkoh Oct 19, 2024
b5e3e9d
Update button variants in ConfigurationPanel component
rickkoh Oct 19, 2024
fc3bee5
Ensure at least one topic selected
evanyan13 Oct 19, 2024
7a80968
Update FindMatchContext to set finding match status
rickkoh Oct 19, 2024
3b42609
Change checkbox to radio buttons
Oct 19, 2024
b5a9226
Change phrasing of div
Oct 19, 2024
135f619
Change radio group from flex col to row
Oct 19, 2024
f5c5962
Refactor difficulty checkbox handling in ConfigurationPanel
rickkoh Oct 19, 2024
3720a6f
Merge pull request #94 from CS3219-AY2425S1/ms4-shavonne/update-match-ui
rickkoh Oct 19, 2024
b21b159
Remove CheatPanel component and add useStateMachine hook
rickkoh Oct 19, 2024
c677a81
Fix build errors
rickkoh Oct 19, 2024
41dd2d6
Fix linting errors
rickkoh Oct 20, 2024
6b2aede
Merge pull request #78 from CS3219-AY2425S1/ms4
evanyan13 Oct 20, 2024
ef07356
Ms5 jared/refactor matching (#102)
Jajared Oct 24, 2024
529ed36
Revert "Ms5 jared/refactor matching (#102)" (#103)
Jajared Oct 24, 2024
abdd1fb
Milestone 5 (#96)
evanyan13 Oct 30, 2024
473535b
Initialise CI workflow (#117)
Jajared Nov 10, 2024
d6bfdef
Initialise ci (#118)
Jajared Nov 10, 2024
c474b3f
Fix ci (#119)
Jajared Nov 10, 2024
95cbc6f
Add ci (#120)
Jajared Nov 10, 2024
ac068b5
Milestone 6: Nice-to-Haves (#121)
evanyan13 Nov 12, 2024
e1ee6df
Path CICD errors (#124)
evanyan13 Nov 12, 2024
ec79505
Add ESLint for Github Action (#125)
evanyan13 Nov 12, 2024
b932b60
Fix dynamic server usage error
rickkoh Nov 12, 2024
2ca7556
Fix CICD actions (#127)
evanyan13 Nov 12, 2024
0df4407
Merge branch 'main' of https://github.com/CS3219-AY2425S1/cs3219-ay24…
rickkoh Nov 12, 2024
98cdf08
Merge pull request #128 from CS3219-AY2425S1/main-rick/patches
rickkoh Nov 12, 2024
3ae3d20
Handle errors for token parsing in auth.ts and services
rickkoh Nov 12, 2024
518c351
Merge pull request #130 from CS3219-AY2425S1/main-rick/patches
rickkoh Nov 12, 2024
2dad575
Fix CICD Errors (#129)
evanyan13 Nov 12, 2024
716f26c
Fix collaboration service and session context bug
jmsandiegoo Nov 12, 2024
98b5bc7
Fix more bugs with collaboration both fe and be
jmsandiegoo Nov 12, 2024
71fae00
Merge pull request #131 from CS3219-AY2425S1/jmsandiegoo/bugfix
rickkoh Nov 12, 2024
ab6c360
Minor typo bugfix
jmsandiegoo Nov 12, 2024
e7b0fdc
Merge pull request #132 from CS3219-AY2425S1/jmsandiegoo/bugfix
jmsandiegoo Nov 12, 2024
adc452f
Fix connection between FE and Yjs (#133)
evanyan13 Nov 13, 2024
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
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Feature Description
about: New feature
title: ''
labels: enhancement
assignees: ''

---

# Feature: [Feature Title]

## **Description**
[Provide a clear and concise description of the feature.]

---

## **User Story**
As a [type of user], I want [goal] so that [reason/benefit].

---

## **Acceptance Criteria**
- [List the conditions that must be met for the feature to be considered complete.]
- [Example: The user should be able to reset their password through email.]
- [Example: If no match is found, the system should display a timeout message.]

---

## **Technical Requirements**
- [List any specific technical requirements or implementation details.]
- [Example: OAuth integration using Google and GitHub.]
- [Example: Real-time matching algorithm based on difficulty and topic.]

---

## **Dependencies**
- [List any dependencies or prerequisites.]
- [Example: This feature depends on the user authentication service being fully implemented.]

---

## **Related Links**
- [Link to any relevant documentation, GitHub issues, or design files.]

---

## **Notes/Comments**
- [Any additional notes or comments related to the feature.]
42 changes: 42 additions & 0 deletions .github/workflows/backend-ci-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Backend CI Workflow

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install Dependencies for Each Service
run: |
services=("auth-service" "code-execution-service" "collaboration-service" "gateway-service" "matching-service" "question-service" "user-service" "y-websocket-service")
for service in "${services[@]}"; do
echo "Installing dependencies for $service"
cd backend/$service
npm install
cd ../..
done

# Build Check for Each Service
- name: Build Each Service
run: |
services=("auth-service" "code-execution-service" "collaboration-service" "gateway-service" "matching-service" "question-service" "user-service" "y-websocket-service")
for service in "${services[@]}"; do
echo "Building $service"
cd backend/$service
npm run build
cd ../..
done
45 changes: 45 additions & 0 deletions .github/workflows/docker-build-push-gcloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Push Docker Images to Google Cloud

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Google Cloud CLI
uses: google-github-actions/setup-gcloud@v0.2.0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
export_default_credentials: true

- name: Authenticate Docker to Google Artifact Registry
run: gcloud auth configure-docker ${{ secrets.GCP_REGION }}-docker.pkg.dev

- name: Build and Push Docker Images for Each Service
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_REGION: ${{ secrets.GCP_REGION }}
run: |
# Define an array with the names of your services
services=("auth-service" "code-execution-service" "collaboration-service" "gateway-service" "matching-service" "question-service" "user-service" "y-websocket-service")

# Loop over each service, build and push its Docker image
for service in "${services[@]}"; do
# Define the Docker image path
IMAGE_NAME="${GCP_REGION}-docker.pkg.dev/${GCP_PROJECT_ID}/peerprep/$service:${GITHUB_SHA}"

# Build and push the Docker image
echo "Building and pushing image for $service..."
docker build --platform linux/amd64 -t $IMAGE_NAME -f ./backend/$service/Dockerfile ./backend/$service --push
done
38 changes: 38 additions & 0 deletions .github/workflows/frontend-ci-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Frontend CI Workflow

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install Dependencies
run: |
cd frontend
npm install

# Build Check
- name: Build Project
run: |
cd frontend
npm run build

# Lint Check
- name: Lint Code
run: |
cd frontend
npm run lint
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/bzPrOe11)

# CS3219 Project (PeerPrep) - AY2425S1
## Group: Gxx

### Note:
- You can choose to develop individual microservices within separate folders within this repository **OR** use individual repositories (all public) for each microservice.
- In the latter scenario, you should enable sub-modules on this GitHub classroom repository to manage the development/deployment **AND** add your mentor to the individual repositories as a collaborator.
- The teaching team should be given access to the repositories as we may require viewing the history of the repository in case of any disputes or disagreements.
## Group: G33

### Note:

- You can choose to develop individual microservices within separate folders within this repository **OR** use individual repositories (all public) for each microservice.
- In the latter scenario, you should enable sub-modules on this GitHub classroom repository to manage the development/deployment **AND** add your mentor to the individual repositories as a collaborator.
- The teaching team should be given access to the repositories as we may require viewing the history of the repository in case of any disputes or disagreements.
2 changes: 2 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
45 changes: 45 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
pnpm-debug.log*

# Dependency directories
node_modules/
.bower_components/

# Environment variables
.env
.env.local
.env.*.local

# Typescript cache and build
*.tsbuildinfo
dist/
build/

# Static file build outputs
public/static

# Testing
coverage/
**/coverage/
.nyc_output/
jest-test-results.json
.cache/

# OS generated files
.DS_Store
Thumbs.db

# Editor-specific
.vscode/
.idea/
*.suo
*.ntvs*
*.njsproj
*.sln

# MacOS files
*.DS_Store
25 changes: 25 additions & 0 deletions backend/auth-service/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
56 changes: 56 additions & 0 deletions backend/auth-service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# compiled output
/dist
/node_modules
/build

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

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

# temp directory
.temp
.tmp

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

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
4 changes: 4 additions & 0 deletions backend/auth-service/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
13 changes: 13 additions & 0 deletions backend/auth-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:18

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

EXPOSE 3003

CMD ["node", "dist/main.js"]
Loading
Loading