Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
321 commits
Select commit Hold shift + click to select a range
3ad299c
Change Docker build context
yhtMinceraft1010X Oct 16, 2023
290195b
Change Docker build context (#110)
yhtMinceraft1010X Oct 16, 2023
c30904d
Create release 0.1.5 (#111)
yhtMinceraft1010X Oct 16, 2023
eb32c22
Fix TypeScript compilation issues
yhtMinceraft1010X Oct 16, 2023
a9d7630
Fix TypeScript compilation issues (#112)
yhtMinceraft1010X Oct 16, 2023
bc9bab4
Create release 0.1.6 (#113)
yhtMinceraft1010X Oct 16, 2023
6ac4a20
Replace hardcoded region with env var
yhtMinceraft1010X Oct 17, 2023
c700e40
Change Docker config
yhtMinceraft1010X Oct 17, 2023
aaeb86e
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 17, 2023
0fff51b
Change Docker configuration in prod workflow (#114)
yhtMinceraft1010X Oct 17, 2023
f52cbc3
Merge branch 'prod' into master
yhtMinceraft1010X Oct 17, 2023
6206b3f
Create release 0.1.7 (#115)
yhtMinceraft1010X Oct 17, 2023
588c028
Add token_format
yhtMinceraft1010X Oct 17, 2023
e0d92bd
Add token_format to prod workflow (#116)
yhtMinceraft1010X Oct 17, 2023
1ed32bd
Create release 0.1.8 (#117)
yhtMinceraft1010X Oct 17, 2023
addfb34
fix FE build issues
ong6 Oct 17, 2023
4d6a162
updated scripts
ong6 Oct 17, 2023
158d8a3
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 17, 2023
f443cf5
fix ddos problems
ong6 Oct 17, 2023
cd2965e
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 17, 2023
5ae4658
Fix image build bugs
yhtMinceraft1010X Oct 17, 2023
4f1cb8c
Switch back to FIREBASE_SERVICE_ACCOUNT in gateway
yhtMinceraft1010X Oct 17, 2023
a5b1908
Add docker volumes. Also fix gateway issue
chunweii Oct 17, 2023
ae013e4
Fix env var in docker-compose
yhtMinceraft1010X Oct 17, 2023
9eed263
Add missing type
yhtMinceraft1010X Oct 17, 2023
bd2cbb6
Re-arrange Dockerfile steps
yhtMinceraft1010X Oct 17, 2023
8a30bfe
Rename env var in production workflow
yhtMinceraft1010X Oct 17, 2023
fb4f716
Restore original prod docker build and push commands
yhtMinceraft1010X Oct 17, 2023
9cbc152
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 17, 2023
e426577
Fix prod Docker image building bugs (#119)
yhtMinceraft1010X Oct 17, 2023
2bd1246
Merge branch 'prod' into master
yhtMinceraft1010X Oct 17, 2023
4b65adf
Create release 0.1.8b (#120)
yhtMinceraft1010X Oct 17, 2023
d2150b7
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 18, 2023
0388bf0
improve homepage
ong6 Oct 18, 2023
fa037e2
Pass env var into frontend prod image at build time
yhtMinceraft1010X Oct 18, 2023
12137cb
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 18, 2023
a24badf
Pass env var into frontend prod image at build time (#125)
yhtMinceraft1010X Oct 18, 2023
bd5eaed
Merge branch 'prod' into master
yhtMinceraft1010X Oct 18, 2023
b2049f7
Create release 0.1.8c (#126)
yhtMinceraft1010X Oct 18, 2023
b5bb0a5
linked question service
ong6 Oct 18, 2023
52cfbb0
add auto leave match logic
ong6 Oct 18, 2023
f8de1e9
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 19, 2023
33406ba
Copy JSON secrets through files
yhtMinceraft1010X Oct 19, 2023
80efdd4
Change the way JSON secrets are passed into Kubernetes (#127)
yhtMinceraft1010X Oct 19, 2023
c09c1be
Create release 0.1.8d (#128)
yhtMinceraft1010X Oct 19, 2023
d71c999
Replace printf with echo for prod workflow
yhtMinceraft1010X Oct 19, 2023
eac8e7e
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 19, 2023
1efeca0
Replace printf with echo (#129)
yhtMinceraft1010X Oct 19, 2023
5939099
Merge branch 'prod' into master
yhtMinceraft1010X Oct 19, 2023
5683a39
Create release 0.1.8e (#130)
yhtMinceraft1010X Oct 19, 2023
a586b88
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 19, 2023
a947880
Fix router bracketing
yhtMinceraft1010X Oct 19, 2023
b56ba3b
Fix router bracketing in frontend (#131)
yhtMinceraft1010X Oct 19, 2023
11c4f3d
Fix frontend build error (#132)
yhtMinceraft1010X Oct 19, 2023
3709585
Add deletion of secrets
yhtMinceraft1010X Oct 19, 2023
00d76d7
Add deletion of kubectl secrets in workflow (#133)
yhtMinceraft1010X Oct 19, 2023
33b162f
Add deletion of kubectl secrets in prod workflow (#134)
yhtMinceraft1010X Oct 19, 2023
f57bda4
User account settings and edit profile (#93)
ckcherry23 Oct 19, 2023
f23b4f2
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 19, 2023
0d185ed
Fix hyphen typo in frontend deployment
yhtMinceraft1010X Oct 19, 2023
101f32a
Fix hyphen typo in frontend deployment (#135)
yhtMinceraft1010X Oct 19, 2023
8aa2f75
Fix hyphen typo in frontend deployment (#136)
yhtMinceraft1010X Oct 19, 2023
844d313
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 19, 2023
0c2abf3
Fix artifact registry project typo
yhtMinceraft1010X Oct 19, 2023
f96b418
Fix artifact registry project typo (#138)
yhtMinceraft1010X Oct 19, 2023
3e8a821
Merge branch 'prod' into master
yhtMinceraft1010X Oct 19, 2023
fc57765
Fix artifact registry project typo (#139)
yhtMinceraft1010X Oct 19, 2023
417b4de
add comment
ong6 Oct 19, 2023
408fde0
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
ong6 Oct 19, 2023
ccaa8e1
Change status code for POST with user already in database (#137)
yhtMinceraft1010X Oct 19, 2023
5ea7a37
Add video call functionality (#99)
chunweii Oct 19, 2023
b1caa82
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 19, 2023
13c762c
Fix typo for OR operator
yhtMinceraft1010X Oct 19, 2023
81995cc
Increase number of pods
yhtMinceraft1010X Oct 19, 2023
99930c2
Fix OR operator typo in frontend and increase number of pods (#147)
yhtMinceraft1010X Oct 19, 2023
747ef9a
Fix OR operator typo and increase number of pods (#148)
yhtMinceraft1010X Oct 19, 2023
bb67892
Remove room detail from description
chunweii Oct 19, 2023
fb3d602
Merge branch 'prod' into master
yhtMinceraft1010X Oct 19, 2023
c376ed6
Fix Docker frontend build (#151)
yhtMinceraft1010X Oct 19, 2023
fbcc12e
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 19, 2023
6c7418b
Fix app path after prod build in backend services
yhtMinceraft1010X Oct 19, 2023
d0c3669
Fix start app path in prod build (#152)
yhtMinceraft1010X Oct 19, 2023
ba0418b
Fix start app path in prod builds (#153)
yhtMinceraft1010X Oct 19, 2023
466e7c4
Move swagger-ui-express from devDependencies to dependencies
yhtMinceraft1010X Oct 19, 2023
4093f1d
Move swagger-ui-express to dependency (#155)
yhtMinceraft1010X Oct 19, 2023
d2b2d47
Set rootDir in compile options for backend services
yhtMinceraft1010X Oct 20, 2023
950da25
Reorganise dependencies
yhtMinceraft1010X Oct 20, 2023
e3d3c6c
Merge branch 'prod' into master
yhtMinceraft1010X Oct 20, 2023
3f2ad47
Fix gateway bug and reorganise dependencies (#158)
yhtMinceraft1010X Oct 20, 2023
4cc1720
Prepend NEXT_PUBLIC to GATEWAY_ADDRESS env variable
yhtMinceraft1010X Oct 20, 2023
58784d4
Prepend NEXT_PUBLIC to GATEWAY_ADDRESS env variable (#159)
yhtMinceraft1010X Oct 20, 2023
d378f86
Shift env variables for frontend build into Dockerfile
yhtMinceraft1010X Oct 20, 2023
314662a
Decrease max replicas per service to 2
yhtMinceraft1010X Oct 20, 2023
b840026
Merge branch 'prod' into master
yhtMinceraft1010X Oct 20, 2023
9a87207
Fix frontend gateway address and pod termination (#160)
yhtMinceraft1010X Oct 20, 2023
52b56c3
Merge branch 'master' into prod-modifications
yhtMinceraft1010X Oct 21, 2023
3d2a55e
Expose gateway and use domain name
yhtMinceraft1010X Oct 21, 2023
54d5cda
Merge branch 'prod' into master
yhtMinceraft1010X Oct 21, 2023
8411ac4
Fix domain resolution (#162)
yhtMinceraft1010X Oct 21, 2023
dd8c8fc
Fix CORS issue between frontend and gateway on prod
yhtMinceraft1010X Oct 21, 2023
e2080b9
Fix CORS issue on prod (#163)
yhtMinceraft1010X Oct 21, 2023
1d14ab4
Fix typing on gateway
yhtMinceraft1010X Oct 21, 2023
ddc290e
Merge branch 'prod' into master
yhtMinceraft1010X Oct 21, 2023
b4335e7
Fix types on gateway (#164)
yhtMinceraft1010X Oct 21, 2023
cc879a9
Add twilio secrets to prod (#169)
yhtMinceraft1010X Oct 22, 2023
40d7cdb
Enhance question service-frontend linkage (#121)
chunweii Oct 23, 2023
f2904da
Add build simulation step to integration workflow (#150)
yhtMinceraft1010X Oct 23, 2023
943edd4
Basic UI - Set user's match preferences (#154)
ckcherry23 Oct 23, 2023
c6abd34
Remove admin path rewrite (#166)
yhtMinceraft1010X Oct 23, 2023
799b290
Add horizontal autoscaling (#170)
yhtMinceraft1010X Oct 23, 2023
55bd794
Fix admin verification (#161)
yhtMinceraft1010X Oct 23, 2023
0e98754
Show leaderboard on Interviews page (#157)
ckcherry23 Oct 23, 2023
30a8a90
Fix frontend build issue (#172)
chunweii Oct 23, 2023
7aa23c6
User history UI (#171)
ckcherry23 Oct 23, 2023
c9ab65b
Proxy collaboration and match service through gateway (#165)
yhtMinceraft1010X Oct 24, 2023
ce041dd
Create release 0.2.0 (#175)
yhtMinceraft1010X Oct 24, 2023
7eb8c27
Add loaders to show loading state for questions (#156)
ckcherry23 Oct 24, 2023
09590ef
Add request for cpu metric to support autoscaling
yhtMinceraft1010X Oct 24, 2023
cf81e15
Merge branch 'master' into prod
chunweii Oct 24, 2023
8167cac
Downsize prod CPU requests
yhtMinceraft1010X Oct 24, 2023
c1ff1fa
Re-arrange frontend dependencies
yhtMinceraft1010X Oct 25, 2023
ae0c485
Clear timeout in useEffect (#174)
chunweii Oct 26, 2023
0f81576
Fix gateway user verification (#186)
yhtMinceraft1010X Oct 26, 2023
36f73b0
Fix websocket proxying bug (#183)
yhtMinceraft1010X Oct 26, 2023
043f6ff
Fix missing env variables in Docker Compose
yhtMinceraft1010X Oct 26, 2023
38eefe3
Add HTTPS support and reconfigure ingress
yhtMinceraft1010X Oct 26, 2023
54a5d31
Create release 0.3.0 (#191)
yhtMinceraft1010X Oct 26, 2023
f87dbb8
Fix service name errors
yhtMinceraft1010X Oct 26, 2023
86ded76
Fix gateway being named frontend
yhtMinceraft1010X Oct 26, 2023
4b7f557
Merge branch 'prod' into master
yhtMinceraft1010X Oct 26, 2023
08fe53d
Fix service name errors on ingress files (#194)
yhtMinceraft1010X Oct 26, 2023
90af990
Add server-side search for question title and filtering by difficulty…
chunweii Oct 26, 2023
f3edc05
Remove unused FQDN from managed cert
yhtMinceraft1010X Oct 27, 2023
152970b
Create release 0.4.0 (#195)
yhtMinceraft1010X Oct 27, 2023
3ac8c2f
Add backend config to Gateway service
yhtMinceraft1010X Oct 27, 2023
e5db653
Add backend config to Gateway service (#197)
yhtMinceraft1010X Oct 27, 2023
548cde1
Fix CORS response headers
yhtMinceraft1010X Oct 27, 2023
50f08f2
Merge branch 'prod' into master
yhtMinceraft1010X Oct 27, 2023
7f7b2d8
Fix CORS response headers (#198)
yhtMinceraft1010X Oct 27, 2023
f575671
Revert back to HTTP with loadbalancer services
yhtMinceraft1010X Oct 27, 2023
fe4dc1d
Revert back to HTTP with LoadBalancer services (#199)
yhtMinceraft1010X Oct 27, 2023
036f2e1
Remove backend config
yhtMinceraft1010X Oct 27, 2023
c641a3d
Revert "Revert back to HTTP with loadbalancer services"
yhtMinceraft1010X Oct 27, 2023
6629bbe
Add healthcheck on gateway
yhtMinceraft1010X Oct 27, 2023
b919b3a
Merge branch 'prod' into master
yhtMinceraft1010X Oct 27, 2023
1c28242
Add healthcheck to gateway
yhtMinceraft1010X Oct 27, 2023
53f9e88
Revert "Merge branch 'prod' into master"
yhtMinceraft1010X Oct 27, 2023
02bc65b
Re-add ingress files to prod (#201)
yhtMinceraft1010X Oct 27, 2023
8d2cde1
Change Docker Compose to use production-style images (#196)
yhtMinceraft1010X Oct 28, 2023
539a5f9
Rearrange and standardise dependencies and scripts (#187)
yhtMinceraft1010X Oct 28, 2023
907d9dd
Rearrange swagger files and scripts (#204)
yhtMinceraft1010X Oct 28, 2023
4a52426
Remove unused dependencies (#205)
yhtMinceraft1010X Oct 28, 2023
c75b938
Delete deployment/prod-dockerfiles/Dockerfile.frontend-prod (#207)
yhtMinceraft1010X Oct 28, 2023
fea6e03
Merge branch 'prod' into master
yhtMinceraft1010X Oct 28, 2023
7bd8e31
Create release 0.5.0 (#206)
yhtMinceraft1010X Oct 28, 2023
0566969
Twilio video default mute and no video (#192)
chunweii Oct 30, 2023
9c36f62
standardize frameworks
ong6 Oct 30, 2023
700aada
Check if user is admin on frontend (#193)
chunweii Oct 30, 2023
e01b270
Add success condition to production workflow run (#209)
yhtMinceraft1010X Oct 31, 2023
b2f5b41
add useHistory hook
ong6 Oct 31, 2023
79d08bb
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
ong6 Oct 31, 2023
e09d0c5
Display question and swap question in collaboration rooms (#185)
gycgabriel Oct 31, 2023
e78450b
Link user profile settings to backend (firebase and supabase) (#210)
chunweii Nov 1, 2023
19bb77d
handle more error cases for userHandler
ong6 Nov 2, 2023
f17ce45
delete dumps
ong6 Nov 2, 2023
dce34a7
Fix incorrect status code issue on frontend
chunweii Nov 2, 2023
b2e18f0
Fix deleting account
chunweii Nov 2, 2023
8afd057
remove redundant matching details
ong6 Nov 2, 2023
77f3f29
update find match logic
ong6 Nov 2, 2023
977599c
Remove stackdump file
yhtMinceraft1010X Nov 4, 2023
45d86a0
Question page Submit button (#228)
gycgabriel Nov 4, 2023
c10ce9a
Preferred code language to default to first item
gycgabriel Nov 4, 2023
583c3b4
Add documentation for setting/removing admins (#218)
yhtMinceraft1010X Nov 8, 2023
cf27637
Add environment variables and remove unused code (#229)
yhtMinceraft1010X Nov 8, 2023
0323b30
Fix match backend (#230)
chunweii Nov 10, 2023
3718b16
add preference update to interviews page
ong6 Nov 10, 2023
81a45b8
link up matching finding and added more error states
ong6 Nov 10, 2023
3e7d3d2
fixed room not loading questions bug
ong6 Nov 10, 2023
475ef8c
feat: sanitize question description and wrap pre tag
ckcherry23 Nov 10, 2023
47e2823
feat: remove console in code editor
ckcherry23 Nov 10, 2023
884054e
feat: show test cases in question description
ckcherry23 Nov 10, 2023
6fd9547
feat: add solution ui for questions/room
ckcherry23 Nov 10, 2023
c7db5f2
feat: add md support for question description
ckcherry23 Nov 10, 2023
2edefff
fix: make isLoading optional in difficulty selector
ckcherry23 Nov 11, 2023
2324449
Delete yarn.lock to resolve PR merge conflict
yhtMinceraft1010X Nov 11, 2023
624dc02
Create release 1.0.0
yhtMinceraft1010X Nov 11, 2023
18599e2
Back-merge prod into master (#233)
yhtMinceraft1010X Nov 11, 2023
1a4c94d
Add @types for sanitize-html
yhtMinceraft1010X Nov 11, 2023
c79bc1a
Create release 1.0.1 (#234)
yhtMinceraft1010X Nov 11, 2023
4f0f5b7
Update admin-service readme
yhtMinceraft1010X Nov 11, 2023
a4776c7
Remove unused import in frontend
yhtMinceraft1010X Nov 11, 2023
1fb2f63
Create release 1.0.2 (#235)
yhtMinceraft1010X Nov 11, 2023
92045b3
linked room and user logic
ong6 Nov 11, 2023
ef21152
kick one user out the moment the other user leaves
ong6 Nov 11, 2023
c250df1
fixed bug
ong6 Nov 11, 2023
efda09a
Create release 1.1.0 (#241)
yhtMinceraft1010X Nov 11, 2023
6e38480
fixed locked loading state
ong6 Nov 12, 2023
4aabdcb
Add timer to find-match
chunweii Nov 12, 2023
536b279
fixed small bugs and update user flow for question submission
ong6 Nov 12, 2023
6fcb29f
update code editor to allow for language change
ong6 Nov 12, 2023
e90f93a
Do not redirect if the router query is undefined
chunweii Nov 12, 2023
848a6b6
Merge remote-tracking branch 'origin/master'
chunweii Nov 12, 2023
0f83c36
Remove extra semicolon thanks to linter
chunweii Nov 12, 2023
defe45f
Fix swap question (#242)
chunweii Nov 12, 2023
d94259c
Fix duplicate sockets and display name in video (#247)
chunweii Nov 12, 2023
9bd3f10
Update root README
yhtMinceraft1010X Nov 12, 2023
2a69311
Merge branch 'prod' into master
yhtMinceraft1010X Nov 13, 2023
7d95ade
Create release 1.1.1 (#249)
yhtMinceraft1010X Nov 13, 2023
40cef62
Force image pull upon deployment
yhtMinceraft1010X Nov 13, 2023
9463e1e
Update matchingController and questionAdapter, add getDifficultyColor…
chunweii Nov 13, 2023
d418db5
Merge branch 'prod' into master
yhtMinceraft1010X Nov 13, 2023
77b88b0
Create release 1.2.0 (#252)
yhtMinceraft1010X Nov 13, 2023
1095896
fix: remove unused buttons
ckcherry23 Nov 13, 2023
54f04c5
style: increase text area height
ckcherry23 Nov 13, 2023
0038a52
style: fix admin page formatting
ckcherry23 Nov 13, 2023
fea973d
Increase CPU millicore request on prod
yhtMinceraft1010X Nov 14, 2023
f909d54
Merge branch 'prod' into master
yhtMinceraft1010X Nov 14, 2023
bece5cb
Create release 1.2.1 (#256)
yhtMinceraft1010X Nov 14, 2023
2154d5a
Add error toast for twilio connection errors
chunweii Nov 14, 2023
49fb0cc
Fix default code replacing empty string in form
chunweii Nov 14, 2023
a7c4796
Update question form and solution fields
chunweii Nov 14, 2023
6456c1b
fix cursor issues
ong6 Nov 14, 2023
6307604
Use monaco editor for question forms
chunweii Nov 14, 2023
64dea21
fix language issues on monaco
ong6 Nov 14, 2023
3cc2d5f
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
ong6 Nov 14, 2023
5f3c0e2
Use monaco editor for attempt display
chunweii Nov 14, 2023
fbccce3
Merge remote-tracking branch 'origin/master'
chunweii Nov 14, 2023
8314d4e
implement text op
ong6 Nov 14, 2023
db4e3f8
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
ong6 Nov 14, 2023
1b3fc09
style: increase z index of cancel search button
ckcherry23 Nov 14, 2023
d95a738
feat: add leaderboard api (#258)
ckcherry23 Nov 14, 2023
789f6d6
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
ckcherry23 Nov 14, 2023
d012fcf
Update root README
yhtMinceraft1010X Nov 14, 2023
3ef6efb
feat: limit to top 10 in leaderboard
ckcherry23 Nov 14, 2023
46bc086
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
ckcherry23 Nov 14, 2023
a1b6823
fix: lower limit test case size to 1 char
ckcherry23 Nov 14, 2023
2228814
feat: add error messages for invalid test cases
ckcherry23 Nov 15, 2023
b7bac34
feat: add loading for match found
ckcherry23 Nov 15, 2023
135ff7e
Merge branch 'prod' into master
yhtMinceraft1010X Nov 15, 2023
bd61349
refactor: delete sample pages api
ckcherry23 Nov 15, 2023
2f32218
Create release 1.3.0 (#260)
yhtMinceraft1010X Nov 15, 2023
780ee56
Merge branch 'master' of https://github.com/CS3219-AY2324S1/ay2324s1-…
ckcherry23 Nov 15, 2023
af7ef0a
Add default solution and description
chunweii Nov 15, 2023
515b6aa
Merge branch 'prod' into master
yhtMinceraft1010X Nov 15, 2023
005558f
Fix camera turned on even on mute
chunweii Nov 15, 2023
5593453
Merge remote-tracking branch 'origin/master'
chunweii Nov 15, 2023
ccfc305
temp fix for OT
ong6 Nov 15, 2023
c3b966d
Collab Service: Emit and receive ACK (#257)
gycgabriel Nov 15, 2023
3666222
Submit G11 Report
chunweii Nov 15, 2023
d8670f0
Merge remote-tracking branch 'origin/master'
chunweii Nov 15, 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
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/.env
**/.env.*
**/secrets
.git
2 changes: 2 additions & 0 deletions .env.development.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENVIRONMENT_TYPE="local-dev"
NEXT_PUBLIC_ENVIRONMENT_TYPE="local-dev"
19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"node": true,
"es2021": true
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"no-unused-vars": "off"
}
}
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "peerprep-group11-dev"
}
}
72 changes: 72 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Continuous Integration

on:
push:
branches-ignore:
- gh-pages

env:
NODE_VER: '18.x'
JAVA_DISTRIBUTION: 'zulu'
JAVA_VER: 11
FIREBASE_AUTH_EMULATOR_HOST: "127:0:0:1:9099"
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CI_TOKEN }}
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
PRISMA_DATABASE_URL: ${{ secrets.SYSTEMTEST_DATABASE_URL }}
PRISMA_DATABASE_PASSWORD: ${{ secrets.SYSTEMTEST_DATABASE_PASSWORD }}
NEXT_PUBLIC_FRONTEND_FIREBASE_CONFIG: ${{ secrets.FRONTEND_FIREBASE_CONFIG_DEV }}

jobs:
mainbuild:
name: CI on Ubuntu 22.04
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VER }}

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VER }}

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

- name: Run linting
run: |
yarn workspace admin-service lint
yarn workspace collaboration-service lint
yarn workspace frontend lint
yarn workspace gateway lint
yarn workspace matching-service lint
yarn workspace question-service lint
yarn workspace user-service lint

- name: Run unit tests
run: |
yarn workspace user-service test
yarn workspace admin-service test:ci

- name: Run system tests
run: |
yarn workspace user-service systemtest:ci
yarn workspace admin-service systemtest:ci

- name: Simulate production build
run: |
yarn workspace admin-service build
yarn workspace collaboration-service build
yarn workspace gateway build
yarn workspace matching-service build
yarn workspace question-service build
yarn workspace user-service build
yarn workspace frontend build
133 changes: 133 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Adapted from: https://github.com/actions/starter-workflows/blob/main/deployments/google.yml

name: Build and Deploy Production App

on:
workflow_run:
workflows: ["Continuous Integration"] # Run only after CI passes
types: [completed]
branches:
- prod

env:
PROJECT_ID: peerprep-group11-prod
ARTIFACT_REPOSITORY_NAME: codeparty-prod-images
GKE_CLUSTER: codeparty-g11-prod # Add your cluster name here.
GKE_REGION: asia-southeast1 # Add your cluster zone here.
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROD }}
PRISMA_DATABASE_URL: ${{ secrets.PRISMA_DATABASE_URL_PROD }}
MONGO_ATLAS_URL: ${{ secrets.MONGO_ATLAS_URL_PROD }}
NEXT_PUBLIC_FRONTEND_FIREBASE_CONFIG: ${{ secrets.FRONTEND_FIREBASE_CONFIG_PROD }}
NEXT_PUBLIC_HTTP_PROXY_GATEWAY_ADDRESS: https://api.codeparty.org/
NEXT_PUBLIC_WS_MATCH_PROXY_GATEWAY_ADDRESS: https://wsmatch.codeparty.org
NEXT_PUBLIC_WS_COLLABORATION_PROXY_GATEWAY_ADDRESS: https://wscollab.codeparty.org
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }}
TWILIO_API_SECRET: ${{ secrets.TWILIO_API_SECRET }}

jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: production
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: 'read'
id-token: 'write'

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

- id: 'auth'
name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v1'
with:
token_format: 'access_token'
workload_identity_provider: projects/345207492413/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-oidc
service_account: 'github-actions-service@peerprep-group11-prod.iam.gserviceaccount.com'

# Setup gcloud CLI
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1

# Configure Docker to login to google cloud
- name: Configure Docker
run: |-
echo ${{steps.auth.outputs.access_token}} | docker login -u oauth2accesstoken --password-stdin https://$GKE_REGION-docker.pkg.dev

# Get the GKE credentials so that we can deploy to the cluster
- name: Get Google Kubernetes Engine credentials for production
uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_REGION }}

# Copy the JSON secrets (Firebase configs) into JSON files
- name: Copy JSON secrets into JSON files
run: |-
echo -n "$FIREBASE_SERVICE_ACCOUNT" > ./firebase_service_account.json
echo -n "$NEXT_PUBLIC_FRONTEND_FIREBASE_CONFIG" > ./next_public_frontend_firebase_config.json

# Set the secrets that are used as env variables in the manifest files
- name: Set kubectl secrets
run: |-
kubectl delete secret firebase-service-account \
--ignore-not-found
kubectl create secret generic firebase-service-account \
--from-file=firebase-service-account=./firebase_service_account.json
kubectl delete secret prisma-database-url \
--ignore-not-found
kubectl create secret generic prisma-database-url \
--from-literal=prisma-database-url=$PRISMA_DATABASE_URL
kubectl delete secret mongo-atlas-url \
--ignore-not-found
kubectl create secret generic mongo-atlas-url \
--from-literal=mongo-atlas-url=$MONGO_ATLAS_URL
kubectl delete secret frontend-firebase-config \
--ignore-not-found
kubectl create secret generic frontend-firebase-config \
--from-file=frontend-firebase-config=./next_public_frontend_firebase_config.json
kubectl delete secret twilio-account-sid \
--ignore-not-found
kubectl create secret generic twilio-account-sid \
--from-literal=twilio-account-sid=$TWILIO_ACCOUNT_SID
kubectl delete secret twilio-api-key \
--ignore-not-found
kubectl create secret generic twilio-api-key \
--from-literal=twilio-api-key=$TWILIO_API_KEY
kubectl delete secret twilio-api-secret \
--ignore-not-found
kubectl create secret generic twilio-api-secret \
--from-literal=twilio-api-secret=$TWILIO_API_SECRET

# Remove the JSON files
- name: Delete JSON files
if: ${{ always() }}
run: |-
rm ./firebase_service_account.json
rm ./next_public_frontend_firebase_config.json

# Install the dependencies such as prisma
- name: Install dependencies with immutable lockfile
run: yarn install --frozen-lockfile

# Apply prisma migrations to production prisma database
- name: Apply prisma database migrations
run: |-
yarn prisma migrate deploy

# Build the Docker images and push to Google Artifact Repository
- name: Build and push Docker images
run: |-
chmod u+x ./build-export-prod-images.sh
./build-export-prod-images.sh
working-directory: ./deployment

# Deploy the Docker images to the GKE cluster
- name: Deploy production application
run: |-
kubectl apply -f ./gke-prod-manifests
kubectl rollout status deployment
kubectl get services -o wide
working-directory: ./deployment
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
.env
.idea/
.env.firebase_emulators_test
secrets/
yarn-error.log
bash.exe.stackdump
sh.exe.stackdump
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
hooks:
- id: gitleaks
stages: [commit]
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 2,
"useTabs": false
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"master"
]
}
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Base image
FROM node:18

# Set working directory
WORKDIR /app

# Copy package.json and yarn.lock files
COPY package.json yarn.lock ./
Binary file added G11_Report.pdf
Binary file not shown.
Loading