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 308 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
308 commits
Select commit Hold shift + click to select a range
f898716
Update Editor.tsx
Gibson0918 Oct 17, 2023
4c27ba5
Add paths to user API
Oct 17, 2023
3eda005
Merge pull request #9 from CS3219-AY2324S1/code-editor
mslevis Oct 17, 2023
b992a9c
Update routes
Oct 17, 2023
76c9fc2
Rename Nav
Oct 17, 2023
a603e7f
Merge code editor
Oct 17, 2023
ad4c5b3
Fix compilation
Oct 17, 2023
feeb3e1
Update components to PascalCase
Oct 17, 2023
df073f5
Add CDK
Oct 17, 2023
b052057
Add CDK
Oct 17, 2023
b956751
add env
Oct 18, 2023
6a5c6cb
Merge commit '3eda005a4aca9de20f0e4a7890f628c4252bca35' into daniel/c…
DanielLimWeiEn Oct 18, 2023
ebb8155
Remove unnecessary components and update styling for UIKitVideoPlayer
DanielLimWeiEn Oct 18, 2023
de1125e
Rename components to Pascal Case
Oct 18, 2023
289170e
Add signalling server
Oct 18, 2023
c7ac24d
Merge pull request #11 from CS3219-AY2324S1/hotfix
Gibson0918 Oct 18, 2023
4161bc1
Implement matching service
Benjamin-Sim Oct 18, 2023
ac288ad
Merge pull request #12 from CS3219-AY2324S1/benjamin-matching-service
DanielLimWeiEn Oct 19, 2023
2c57705
Create server.js
Gibson0918 Oct 19, 2023
1570a6e
Update Editor.tsx
Gibson0918 Oct 19, 2023
d613346
Merge commit 'ac288ada4c1a1c2b206eb0ec21b8e933b0d1be87' into daniel/c…
DanielLimWeiEn Oct 19, 2023
192b080
Add package.json
Gibson0918 Oct 19, 2023
4148873
Add controllers
Oct 19, 2023
9a4940a
Enable CORS on the matching service for websocket and server
DanielLimWeiEn Oct 20, 2023
85ff62d
Create match controller on Frontend to connect to matching service
DanielLimWeiEn Oct 20, 2023
9c1e751
Configure MatchControls to display basic information for development
DanielLimWeiEn Oct 20, 2023
05640ae
Replicate matching-service `index.html` functionality in Frontend
DanielLimWeiEn Oct 20, 2023
2c8c7cd
Use React Context to store the RoomId for matched users
DanielLimWeiEn Oct 20, 2023
70a08a0
Add environment variables for easier maintenance
DanielLimWeiEn Oct 20, 2023
d54c1e2
Added code execution and signaling server
Gibson0918 Oct 20, 2023
7350b27
Adding env variables
Gibson0918 Oct 20, 2023
431694f
Added environment variables
Gibson0918 Oct 20, 2023
c1682c3
Add Question Service to AWS
Oct 21, 2023
ae283b4
Merge pull request #13 from CS3219-AY2324S1/daniel/communication-service
mslevis Oct 21, 2023
71c0be2
Merge pull request #14 from CS3219-AY2324S1/daniel/frontend-socket-in…
mslevis Oct 21, 2023
67c4e8f
Fix user and question service
Oct 21, 2023
e19dd5d
Undo name change
Oct 21, 2023
3f1a642
undo name change
Oct 21, 2023
f6b072a
Fix question model
Oct 21, 2023
d3a9994
Merge features
Oct 21, 2023
89b9a3c
Resolve conflicts with package.json
Gibson0918 Oct 21, 2023
69c7ea1
Update .env.sample
Gibson0918 Oct 21, 2023
e6dcd5f
Add admin to questions and users
Oct 21, 2023
60cc245
Merge pull request #15 from CS3219-AY2324S1/code-editor-server
mslevis Oct 21, 2023
8a8013f
Merge conflicts
Oct 21, 2023
3c5953e
Add prettierrc
mslevis Oct 22, 2023
ec7f20e
Add prettierrc to husky
mslevis Oct 22, 2023
78691e5
Test prettier
mslevis Oct 22, 2023
91a2d61
Test Prettier
mslevis Oct 22, 2023
22d92c3
Fix eslint errors
mslevis Oct 22, 2023
d32e78e
Fix nextjs eslint errors
mslevis Oct 22, 2023
8e76328
Add github workflow
mslevis Oct 22, 2023
f0f1328
Add tailwind to build
mslevis Oct 22, 2023
3aabdea
Update plugins
mslevis Oct 22, 2023
8ba9b69
Trigger workflow
mslevis Oct 22, 2023
f020928
Add prettier config package
mslevis Oct 22, 2023
a6dddfc
Fix Environment Variables for Video Components in Frontend
DanielLimWeiEn Oct 22, 2023
245601e
Update env samples
mslevis Oct 25, 2023
33ea07f
Revert "Update env samples"
mslevis Oct 25, 2023
eb231c3
Merge pull request #16 from CS3219-AY2324S1/owen/user-service
shuimeihe Oct 25, 2023
069a61c
Resolve merge conflicts
shuimeihe Oct 25, 2023
356a478
Update .env
mslevis Oct 25, 2023
efff4a2
Merge pull request #17 from CS3219-AY2324S1/owen/user-service
mslevis Oct 25, 2023
7d64f42
Fix editor
mslevis Oct 25, 2023
d8cea37
Merge pull request #18 from CS3219-AY2324S1/owen/user-service
shuimeihe Oct 25, 2023
ba893d3
Update tab spaces in prettierrc
shuimeihe Oct 26, 2023
21141b9
Implement collab success redirect
shuimeihe Oct 26, 2023
36db196
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Oct 26, 2023
2cf8417
Add error handling for the case where the token is undefined
DanielLimWeiEn Oct 26, 2023
609d05f
Fix build errors
shuimeihe Oct 26, 2023
069cf3c
Run make-pretty, indent 4 spaces
shuimeihe Oct 26, 2023
7417ed5
Add web sockets config for deployment
mslevis Oct 26, 2023
58914b8
Merge branch 'master' of github.com:CS3219-AY2324S1/ay2324s1-course-a…
mslevis Oct 26, 2023
b9c38c4
Changes for deployment
mslevis Oct 26, 2023
9f95e5f
Fix controller
mslevis Oct 26, 2023
d49c3df
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Oct 27, 2023
3e23d3d
Add Cypress for automated Frontend testing
DanielLimWeiEn Oct 27, 2023
4d9b558
Add automated Login process test
DanielLimWeiEn Oct 27, 2023
5057b90
Updated POST/GET requests for CE
Gibson0918 Oct 28, 2023
ee494f7
Executed Prettier for code readability
Gibson0918 Oct 28, 2023
ee125d6
Merge pull request #22 from CS3219-AY2324S1/Moved-Code-Execution-to-s…
mslevis Oct 28, 2023
31e6981
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Oct 29, 2023
0c94b33
Update url forCE
Gibson0918 Oct 29, 2023
812a1b3
Merge pull request #23 from CS3219-AY2324S1/Moved-Code-Execution-to-s…
mslevis Oct 29, 2023
e2023b1
Merge pull request #21 from CS3219-AY2324S1/owen/deploy
Gibson0918 Oct 29, 2023
2101078
Rename server to collab-service
Gibson0918 Oct 30, 2023
eb8462c
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
Gibson0918 Oct 30, 2023
1a35afb
Update Login Test
DanielLimWeiEn Oct 31, 2023
e8279b9
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Oct 31, 2023
a42eb3c
Add Login and Login-Error-Handling tests
DanielLimWeiEn Nov 1, 2023
dc5c3b3
Add Register error handling and password complexity tests
DanielLimWeiEn Nov 1, 2023
dc2032d
Configure to Cypress to use Environment Variables for test user info
DanielLimWeiEn Nov 1, 2023
b5a9af9
Merge pull request #24 from CS3219-AY2324S1/Moved-Code-Execution-to-s…
shuimeihe Nov 1, 2023
10a7fae
Update frontend code
shuimeihe Nov 1, 2023
d06f0b8
Add support for component testing using Cypress
DanielLimWeiEn Nov 2, 2023
0e2f22c
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Nov 2, 2023
b102411
Added serverless leetcode question service
Gibson0918 Nov 2, 2023
eeb2748
Add Forget-Password test and Update Register and Login tests
DanielLimWeiEn Nov 3, 2023
c20a340
Merge pull request #25 from CS3219-AY2324S1/leetcode-qns-service
mslevis Nov 3, 2023
5834f31
Add Collaboration Flow Test
DanielLimWeiEn Nov 3, 2023
f008080
Fix Rejoin Room bug
mslevis Nov 3, 2023
9c31982
Add Collaboration Code Editor Test
DanielLimWeiEn Nov 3, 2023
507735b
Add axios dependency
shuimeihe Nov 3, 2023
b7b0ad4
Implement propogate question in rooms
shuimeihe Nov 3, 2023
6c38b9c
Current UI updates
shuimeihe Nov 3, 2023
de7c522
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
shuimeihe Nov 3, 2023
d6ef47b
Updated codestyle
shuimeihe Nov 3, 2023
a2251dd
update base URL for hosted services
mslevis Nov 3, 2023
f5029a5
Update ENV
mslevis Nov 3, 2023
6188ea7
Add comments
mslevis Nov 3, 2023
26461d3
Merge pull request #41 from CS3219-AY2324S1/owen/backend-testing
Benjamin-Sim Nov 3, 2023
678eaf6
Fix linting errors
shuimeihe Nov 3, 2023
f678579
Merge branch 'propogate-room-questions-ui' of https://github.com/CS32…
shuimeihe Nov 3, 2023
fdb5f32
Merge branch 'master' into propogate-room-questions-ui
shuimeihe Nov 3, 2023
df56ca4
Revert code.tsx
shuimeihe Nov 3, 2023
a597719
Update image components from img
shuimeihe Nov 3, 2023
ec7276e
Complete landing page
shuimeihe Nov 3, 2023
00a6c91
Update login and sign up links in MainApp
shuimeihe Nov 3, 2023
6d29247
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Nov 4, 2023
9409f24
Update Editor.tsx
Gibson0918 Nov 4, 2023
e6870dd
Update Editor.tsx
Gibson0918 Nov 4, 2023
6a0b473
Update Editor.tsx
Gibson0918 Nov 4, 2023
7c2892b
code style check
Gibson0918 Nov 4, 2023
4e2bcd6
Update Editor.tsx
Gibson0918 Nov 4, 2023
48d3772
Refactor QuestionTable to Dashboard.tsx
shuimeihe Nov 4, 2023
43adbd0
Fix visual bug for pages with navbars
shuimeihe Nov 5, 2023
fb616af
Fix build errors
shuimeihe Nov 5, 2023
5a18d6c
Fix style errors
shuimeihe Nov 5, 2023
f32312f
Update Register Error Test
DanielLimWeiEn Nov 6, 2023
4effc3b
Add Collaboration Video Chat Test
DanielLimWeiEn Nov 6, 2023
a568dc3
Fix Errors Causing CI to fail
DanielLimWeiEn Nov 6, 2023
8002b76
Fix styling issues
DanielLimWeiEn Nov 6, 2023
75b9b84
Update question to fetch by title
mslevis Nov 7, 2023
e1f6044
Complete user profile page
shuimeihe Nov 7, 2023
00d1e8e
Merge branch 'propogate-room-questions-ui' of https://github.com/CS32…
shuimeihe Nov 7, 2023
a58e6bb
Merge pull request #44 from CS3219-AY2324S1/Address-duplicate-room-up…
mslevis Nov 8, 2023
7ceba51
Allow delete user
mslevis Nov 8, 2023
c15a99d
Fix prettier
mslevis Nov 8, 2023
8175bad
Improve performance of question API
mslevis Nov 8, 2023
f1a3b9c
Update .env.sample
mslevis Nov 8, 2023
97dbb16
Add CI
mslevis Nov 8, 2023
9fa7667
Modify yml
mslevis Nov 8, 2023
a5106be
Change working dir
mslevis Nov 8, 2023
b647998
Add env
mslevis Nov 8, 2023
b67c38f
Update UI components and fix bugs
shuimeihe Nov 9, 2023
1b5e0a1
Merge branch 'propogate-room-questions-ui' of https://github.com/CS32…
shuimeihe Nov 9, 2023
c0e7208
Remove additonal fields from profile.tsx
shuimeihe Nov 9, 2023
d3205e5
Merge pull request #43 from CS3219-AY2324S1/propogate-room-questions-ui
shuimeihe Nov 9, 2023
0bd7594
Update UI
shuimeihe Nov 9, 2023
0c05111
Update CI to use Chrome browser
DanielLimWeiEn Nov 9, 2023
ea9dc3f
Update UIKitVideoPlayerSpec
DanielLimWeiEn Nov 9, 2023
927cb44
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Nov 9, 2023
baeadb6
Update Authentication and Authorization Tests with new Frontend
DanielLimWeiEn Nov 9, 2023
4326c53
Add Code Editor Component Test to replace Code Editor End to End Test
DanielLimWeiEn Nov 9, 2023
2abd7bb
Update Video Call Component Test to replace Video Call End to End Test
DanielLimWeiEn Nov 9, 2023
11dd6c6
Replace Collaboration Flow tests with individual Video Call and Editor
DanielLimWeiEn Nov 9, 2023
70c1686
UI updates for various pages
shuimeihe Nov 9, 2023
10d5979
Improve scan performance
mslevis Nov 9, 2023
b412cf8
Remove projection
mslevis Nov 9, 2023
09e6d5e
Cleaning up code
shuimeihe Nov 9, 2023
2c5ddd5
Refactor ConnectionManager to MatchControls
shuimeihe Nov 9, 2023
aa65ac0
Improve displaying of categories via tags
shuimeihe Nov 9, 2023
f4a0694
Add Profile Page End to End Test
DanielLimWeiEn Nov 10, 2023
d75ceea
Update Formatting
DanielLimWeiEn Nov 10, 2023
f855dbb
Add Matching Process End to End Test
DanielLimWeiEn Nov 10, 2023
24b624a
Add Question Display End to End Test
DanielLimWeiEn Nov 10, 2023
166759c
Style Fixes
DanielLimWeiEn Nov 10, 2023
2c9ab6a
CI Update to run End to End and Component Tests separately
DanielLimWeiEn Nov 10, 2023
fddf1ff
Fix CORS
mslevis Nov 10, 2023
6c57b40
Add functionality to modals
shuimeihe Nov 11, 2023
068b5e9
Add Question Modal
mslevis Nov 11, 2023
6b2e8b8
Add Question Modal
mslevis Nov 11, 2023
813eedd
Fix bugs in matching service
Benjamin-Sim Nov 11, 2023
8061425
Update dependencies
shuimeihe Nov 12, 2023
0249905
Update main README with skeleton
shuimeihe Nov 12, 2023
a9dded8
Update main README with skeleton
shuimeihe Nov 12, 2023
d7274e8
Update main README
shuimeihe Nov 13, 2023
2de7765
Update Edit/View Modal
shuimeihe Nov 13, 2023
e0fdaa8
Fix stlye issues
shuimeihe Nov 13, 2023
977cb7c
Improve performance on questionById and questionByComplexity
mslevis Nov 13, 2023
11d4baf
Integrate with frontend
mslevis Nov 13, 2023
7450783
Merge pull request #48 from CS3219-AY2324S1/ui-update
mslevis Nov 13, 2023
34175df
Merge conflicts
mslevis Nov 13, 2023
9a76ac5
Remove codeeditor-402507-d4f7a746bb1e.json
Gibson0918 Nov 13, 2023
29c410d
Serverless leetcode qns service on GCP
Gibson0918 Nov 13, 2023
4c3684f
Update Video Call Component Test
DanielLimWeiEn Nov 13, 2023
c9a02d1
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Nov 13, 2023
c00a0b8
Update Style Issues
DanielLimWeiEn Nov 13, 2023
ad59c4c
Fix Cypress Component Tests and Style Issues
DanielLimWeiEn Nov 13, 2023
64f762e
Fix Style Issues Causing CI to fail
DanielLimWeiEn Nov 13, 2023
4be1cd5
Merge branch 'master' into benjamin-matching-service-bug-fixes
shuimeihe Nov 13, 2023
861b0e1
Fix Login, Login Error and Register Error Specs
DanielLimWeiEn Nov 13, 2023
d9ca952
Fix Matching Process Test
DanielLimWeiEn Nov 13, 2023
94cacf9
Fix Profile Page and Questions Display Test
DanielLimWeiEn Nov 13, 2023
4b2226c
Add margins and fix issues
mslevis Nov 13, 2023
b55be10
Add margins and fix issues
mslevis Nov 13, 2023
9241b7c
Merge pull request #51 from CS3219-AY2324S1/benjamin-matching-service…
mslevis Nov 13, 2023
c717c2d
Merge conflicts
mslevis Nov 13, 2023
eab3124
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Nov 13, 2023
da81317
Fix Tests for merged PR
DanielLimWeiEn Nov 13, 2023
dc36b9f
Update Video Call Component Test
DanielLimWeiEn Nov 13, 2023
31ad0c1
Style Fixes
DanielLimWeiEn Nov 13, 2023
948ef93
Improve question table
mslevis Nov 13, 2023
c34440b
Add SWR
mslevis Nov 13, 2023
9d5fc57
Add styles
mslevis Nov 13, 2023
76aae86
Fix visual bugs
mslevis Nov 13, 2023
a7cedb6
Merge pull request #53 from CS3219-AY2324S1/owen/question-service
shuimeihe Nov 13, 2023
acb843f
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Nov 14, 2023
6f9e5d1
Update Tests from merged PR
DanielLimWeiEn Nov 14, 2023
ab741f1
Fix Test
DanielLimWeiEn Nov 14, 2023
1a1273d
Add http support
mslevis Nov 14, 2023
7559f9e
Update root readme
Benjamin-Sim Nov 14, 2023
7d1c698
Update UI with final touches
shuimeihe Nov 14, 2023
f4bce10
Fix checkstyle issues
shuimeihe Nov 14, 2023
b40f6ae
Merge pull request #56 from CS3219-AY2324S1/benjamin-update-root-readme
shuimeihe Nov 14, 2023
5e126c9
god has forsaken everyone in everything done here, we do not deserve …
shuimeihe Nov 14, 2023
d26abbc
Merge pull request #57 from CS3219-AY2324S1/ui-touchup
mslevis Nov 14, 2023
feaf0b6
Update files for deployment
mslevis Nov 14, 2023
04280b8
Merge branch 'master' of github.com:CS3219-AY2324S1/ay2324s1-course-a…
mslevis Nov 14, 2023
c0971ac
Add form validation and user feedback
shuimeihe Nov 14, 2023
1b30799
Merge branch 'master' into daniel/environment-variables-fixes
DanielLimWeiEn Nov 15, 2023
45e3da4
Fix tests to merged PRs
DanielLimWeiEn Nov 15, 2023
20391b6
Update Lock file
DanielLimWeiEn Nov 15, 2023
8f38f4f
Fix styling
shuimeihe Nov 15, 2023
9f75c1f
Fix visual bug in displaying questions
shuimeihe Nov 15, 2023
7d0adf8
Remove extra bracket
shuimeihe Nov 15, 2023
076ccd9
Update ebextensions
mslevis Nov 15, 2023
3941aa0
Allow http request
mslevis Nov 15, 2023
6aef57f
Merge pull request #45 from CS3219-AY2324S1/daniel/environment-variab…
mslevis Nov 15, 2023
409bbf0
Merge pull request #58 from CS3219-AY2324S1/frontend-validation
mslevis Nov 15, 2023
ffcbbbf
Updated README.md
Gibson0918 Nov 15, 2023
2a04b14
Update README.md
Gibson0918 Nov 15, 2023
17ea688
Merge pull request #54 from CS3219-AY2324S1/Gibson/Assignment-6
Gibson0918 Nov 15, 2023
d4992bd
Merge conflicts
mslevis Nov 15, 2023
c7b0e26
Remove amplify from workflow
mslevis Nov 15, 2023
5acc872
Add project report
shuimeihe Nov 15, 2023
8fd6616
Update README
mslevis Nov 15, 2023
e6e12fe
Update README
mslevis Nov 15, 2023
301e3b0
Merge pull request #59 from CS3219-AY2324S1/owen/question-service
mslevis Nov 15, 2023
bf748d9
Merge pull request #60 from CS3219-AY2324S1/update-readme
mslevis Nov 15, 2023
4b71cfc
Update README
mslevis Nov 15, 2023
0418ed6
Update Editor.tsx
Gibson0918 Nov 16, 2023
41777ec
Update Editor.tsx
Gibson0918 Nov 16, 2023
33d86ba
Update Editor.tsx
Gibson0918 Nov 16, 2023
190d181
Update CE and cypress for CE
Gibson0918 Nov 16, 2023
7358aaa
Merge pull request #61 from CS3219-AY2324S1/updates-to-CE
mslevis Nov 16, 2023
0eebc58
compressed image
shuimeihe Nov 17, 2023
478de80
Merge pull request #62 from CS3219-AY2324S1/hotfix-image-display
mslevis Nov 17, 2023
71cba8b
Fix duplicate warnings
mslevis Nov 17, 2023
658b965
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
Binary file added .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": ["airbnb", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"no-unused-vars": "warn",
"no-console": "off",
"func-names": "off",
"camelcase": "warn",
"endOfLine": "auto"
}
}
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: ci

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
frontend-ci:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [18.12.0]

defaults:
run:
working-directory: Frontend

steps:
- name: Checkout
uses: actions/checkout@master

- name: Setup node env
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.yarnpkg.com'

- name: Cache node_modules
uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build Taiwind CSS
run: npx tailwindcss -i ./src/styles.css -o ./dist/output.css

- name: Build
run: yarn run build

- name: Run code style check
run: yarn run style:all
47 changes: 47 additions & 0 deletions .github/workflows/cypress-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Using Cypress GH Action

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
single-run:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create env file
run: |
echo "${{secrets.ENV}}" >> Frontend/.env
- name: Cypress run
uses: cypress-io/github-action@v6
timeout-minutes: 5
with:
working-directory: Frontend
build: npm run build
start: npm start
browser: chrome

component-run:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create env file
run: |
echo "${{secrets.ENV}}" >> Frontend/.env
- name: Cypress run
uses: cypress-io/github-action@v6
timeout-minutes: 5
with:
working-directory: Frontend
build: npm run build
start: npm start
browser: chrome
component: true
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*


# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
*.zip

# Dependency directories
node_modules/
jspm_packages/

# Distribution directories
dist/

# Typescript v1 declaration files
typings/

# Sensitive Information
.env

# Visual Studio Code gitignore
# Workspace preferences - mostly specific to a local computer's preference
.vscode/*
*.code-workspace
.vs

Frontend/package-lock.json
server/package-lock.json

# Sensitive Information
.env
Frontend/yarn.lock


leetcode-qns-service/dev-env
package-lock.json
leetcode-qns-service/.DS_Store
leetcode-qns-service/codeeditor-402507-d4f7a746bb1e.json
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
30 changes: 30 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Ignore artifacts:
build
coverage

*/.gitignore
*/.gitattributes

*/.idea
*/.vscode
*/.vagrant
*/.DS_Store

*/.env
*/.env.*

**/.yarn
**/.next
**/.out
**/dist
**/build
**/.tmp
**/.cache
**/.turbo
*/.html

**/node_modules

**/src/pages/api/auth/[...auth0].tsx
**/src/pages/api/question/complexity[complexity].tsx
**/src/pages/api/users/[user_id].tsx
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "es5",
"endOfLine": "auto",
"tabWidth": 4
}
23 changes: 23 additions & 0 deletions Frontend/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
AUTH0_ISSUER_BASE_URL=https://dev-r67hrnstb5x4ekjv.us.auth0.com
AUTH0_CLIENT_ID=JWrkJW7vaR4frwyirkK8EueMOYUW4NIK
AUTH0_CLIENT_SECRET=T_lWnflOvOr_deicoYlUKWicjzIXHerhKhDg0hROObfIMrKZ3HI-yK3thCQUopYU
AUTH0_BASE_URL=http://localhost:3000
AUTH0_SECRET=a2c6d40c1ea5c27e376321e9de6ddf56
ENV=PROD
NEXT_PUBLIC_ENV=DEV

# question-service, user-service, video-service share the same base URL for PROD
PROD_SERVER_BASE_URL=https://34k0nfj43f.execute-api.ap-southeast-1.amazonaws.com/dev
NEXT_PUBLIC_PROD_SERVER_URL=https://34k0nfj43f.execute-api.ap-southeast-1.amazonaws.com/dev

# collab-service
NEXT_PUBLIC_SIGNALING_SERVER_PROD=ws://Code-service-v5-env.eba-mswskpsn.ap-southeast-1.elasticbeanstalk.com
NEXT_PUBLIC_SIGNALING_SERVER_DEV=ws://localhost:4444

# video-service
NEXT_PUBLIC_X_RapidAPI_Key=39c0444892msh5d9c1d40799eaebp18a0f7jsnfd2cb15b5212
AGORA_APP_ID=ead9549ed5af43d5a769644e3136da85

# matching-service
NEXT_PUBLIC_MATCHING_SERVICE_URL_DEV=http://localhost:4000
NEXT_PUBLIC_MATCHING_SERVICE_URL_PROD=http://peerprep-matching-service-v3.ap-southeast-1.elasticbeanstalk.com
7 changes: 7 additions & 0 deletions Frontend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
__generated__
**/lint-staged.config.js
**/next-env.d.ts
**/tailwind.config.js
**/next.config.js
src/lib/y-monaco.js
43 changes: 43 additions & 0 deletions Frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["import", "@typescript-eslint"],
"extends": [
"next",
"plugin:import/recommended",
"airbnb-typescript",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2020, // Allows us to parse modern ECMAScript features
"sourceType": "module", // Allows use of imports
"project": ["./tsconfig.json"]
},
"env": {
"es6": true,
"node": true,
"browser": true
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-expressions": [
"error",
{ "allowShortCircuit": true, "allowTernary": true }
],
"react/jsx-filename-extension": [
0,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
],
"import/extensions": [
"error",
{ "ts": "never", "tsx": "never", "js": "never", "jsx": "never" }
],
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["**/*.test.tsx", "**/*.test.ts"] }
],
"prettier/prettier": "off",
"react/react-in-jsx-scope": "off"
}
}
41 changes: 41 additions & 0 deletions Frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
**.eslintcache
/build
*.zip


# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# IntelliJ IDEA
.idea/
31 changes: 31 additions & 0 deletions Frontend/DockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Stage 1: Build stage
# Use an official Node.js runtime as the base image
FROM node:20.5.1-alpine AS build

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install dependencies
RUN npm ci

# Copy the rest of the app source code to the working directory
COPY . .

# Build the Next.js app
RUN npm run build

# Stage 2: Run stage
# Use a smaller base image for running the app
FROM node:20.5.1-alpine

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy the built app from the previous build stage
COPY --from=build /usr/src/app .

# Specify the command to run the app
CMD ["npm", "run", "start"]
35 changes: 35 additions & 0 deletions Frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Setup

1. Git clone the repository
2. Navigate to the `Server` directory and run `npm install`
3. Run `node server.js` to start up the signaling server
4. Run `ngrok` with the following command `ngrok tcp 4444`, make sure you have ngrok installed
5. Run `npm install` to install all dependencies, make sure you're in the `Frontend` directory
6. Run `npm run dev` to start the development server

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Assignment 1

### CRUD on Questions

View: Click the questions tab on the navbar to view all questions
Create: Under Add Question, enter the required fields in JSON format and click submit
Update: Click the edit button on the question you want to edit, current state will be populated in the text area, edit and press submit
Delete: Click the delete button

### CRUD on Users

View: Click the users tab on the navbar to view all questions
Create: Under Add Question, enter the required fields in JSON format and click submit
Update: Click the edit button on the question you want to edit, current state will be populated in the text area, edit and press submit
Delete: Click the delete button

## Landing page (WIP)

Trash favicon (placeholder) in the nav bar redirects to the landing page
Currently plain, will be updated with the main design
Loading