Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
497b2eb
Setting up GitHub Classroom Feedback
github-classroom[bot] Aug 25, 2022
e171f0a
setup(feat): Setup typescript and eslint
EltonGohJH Aug 29, 2022
2bf9141
feat(user): prevent duplicate account creation and set up repo
BrendonLau Aug 28, 2022
4a6b7d8
Merge pull request #8 from CS3219-AY2223S1/feat/user-service
BrendonLau Aug 30, 2022
f2e6378
Merge pull request #9 from CS3219-AY2223S1/setup-typescript
EltonGohJH Aug 30, 2022
03931c3
fix(env): rename db
BrendonLau Aug 30, 2022
834f576
Merge pull request #10 from CS3219-AY2223S1/feat/user-service
BrendonLau Aug 30, 2022
4194fec
fix(lint): update lint command and lint code
BrendonLau Aug 30, 2022
d6415a0
fix(lint): update frontend to typescript
BrendonLau Aug 30, 2022
7b9a4a0
fix(user): convert to ts
BrendonLau Aug 30, 2022
c9ac31f
typescript(fix): Update settings and transpile ts before running
EltonGohJH Aug 30, 2022
baa18ac
refactor(user-service): Change library
EltonGohJH Aug 31, 2022
ceedcff
feat(user-service): Refactor to use typescript decorator library
EltonGohJH Aug 31, 2022
e261d07
fix(lint): update linter
BrendonLau Aug 31, 2022
ce95b76
Merge pull request #11 from CS3219-AY2223S1/typescript
BrendonLau Aug 31, 2022
b67dc8b
setup(tailwind): for frontend
BrendonLau Aug 31, 2022
5da5215
Merge pull request #12 from CS3219-AY2223S1/setup(tailwind)-frontend
BrendonLau Aug 31, 2022
d807739
feat(match): difficulty buttons and timer
BrendonLau Sep 1, 2022
62de8d1
feat(user): handle user login in backend
justinyjt Sep 1, 2022
2937807
Merge pull request #13 from CS3219-AY2223S1/feat/match/frontend
EltonGohJH Sep 2, 2022
721339b
Merge pull request #18 from CS3219-AY2223S1/feat/user/backend
pyk595 Sep 2, 2022
066ad1c
feat(user): create ui for login
pyk595 Sep 3, 2022
239e9f8
feat(setup-socket): Setup socket io server and frontend for testing
EltonGohJH Sep 3, 2022
642807f
Merge branch 'main' into feat/login/frontend
pyk595 Sep 3, 2022
e797da9
Merge pull request #20 from CS3219-AY2223S1/setup-socket
BrendonLau Sep 3, 2022
7821a5d
feat(user): hashing and salting of passwords
justinyjt Sep 4, 2022
85792a8
Update postman json and documentation
justinyjt Sep 4, 2022
ba8cfd6
Save jwt token to cookie and update routes
pyk595 Sep 4, 2022
8d0b866
Handle merge conflicts
pyk595 Sep 4, 2022
2983a8d
Handle merge conflicts
pyk595 Sep 4, 2022
91d6286
Merge pull request #21 from CS3219-AY2223S1/feat/user/hashpw
pyk595 Sep 6, 2022
c3e8da3
Handle merge conflicts
pyk595 Sep 6, 2022
9d1a0d2
Merge pull request #19 from CS3219-AY2223S1/feat/login/frontend
pyk595 Sep 6, 2022
1e3d9f6
feat(user): auth context
BrendonLau Sep 7, 2022
b3663c7
Implement Signup and Login on same page
pyk595 Sep 7, 2022
87a472e
Remove deprecated signup page
pyk595 Sep 7, 2022
8789d5a
Merge pull request #23 from CS3219-AY2223S1/feat/user/context
EltonGohJH Sep 8, 2022
8967382
feat(match): Update and refactor socket logic
EltonGohJH Sep 10, 2022
7e6ec26
Handle merge conflicts
pyk595 Sep 10, 2022
97de47e
Merge pull request #26 from CS3219-AY2223S1/update-socket-logic
BrendonLau Sep 10, 2022
8144e51
Handle merge conflicts
pyk595 Sep 10, 2022
5a8efb2
Run lint fix
pyk595 Sep 10, 2022
c3de792
Merge pull request #24 from CS3219-AY2223S1/chore/user/login
BrendonLau Sep 10, 2022
ea992c9
feat(NavBar): create Navbar common component
justinyjt Sep 10, 2022
947a3e1
feat(NavBar): Merge conflicts
justinyjt Sep 11, 2022
6c5cad4
feat(NavBar): Fix bug
justinyjt Sep 11, 2022
de6fe7b
Merge pull request #27 from CS3219-AY2223S1/feat/user/navbar
pyk595 Sep 11, 2022
d72add9
Create middleware for JWT Authentication
pyk595 Sep 11, 2022
63b983d
Merge pull request #29 from CS3219-AY2223S1/chore/user/verify
pyk595 Sep 11, 2022
1a0e7a5
feat(match): update socket context and room page
BrendonLau Sep 11, 2022
b768604
fix(match): update route
BrendonLau Sep 11, 2022
22291de
Create settings page
pyk595 Sep 11, 2022
7ee9685
Create delete functionality for backend
pyk595 Sep 11, 2022
b24d12e
Add styling for card
pyk595 Sep 11, 2022
c1e54c2
Merge pull request #31 from CS3219-AY2223S1/user/frontend/delete
pyk595 Sep 12, 2022
7dddd4f
Merge pull request #32 from CS3219-AY2223S1/feat/user/delete/backend
pyk595 Sep 12, 2022
c2f0151
Merge branch 'main' into feat/room/frontend
BrendonLau Sep 12, 2022
061d2cc
Merge pull request #30 from CS3219-AY2223S1/feat/room/frontend
BrendonLau Sep 13, 2022
5190f55
feat(room): create code editor
BrendonLau Sep 13, 2022
759c4fa
Add functionality for delete user button in settings
pyk595 Sep 19, 2022
debc068
Merge pull request #35 from CS3219-AY2223S1/feat/deleteUser
justinyjt Sep 22, 2022
36407fe
Add change password functionality on backend
pyk595 Sep 22, 2022
b94ec25
Merge pull request #36 from CS3219-AY2223S1/feat/changepw/backend
justinyjt Sep 22, 2022
5c53dfc
feat(user): Beautify delete FE and complete change password FE/BE
justinyjt Sep 22, 2022
8279ab1
Fix (setting): merge conflict
BrendonLau Sep 24, 2022
f7d7c99
Update SettingsPage.tsx
BrendonLau Sep 24, 2022
9afca28
fix(import): import error
BrendonLau Sep 24, 2022
6aecc59
Merge pull request #38 from CS3219-AY2223S1/feat/frontend/settings/style
pyk595 Sep 25, 2022
95e8112
feat(user): Add numerical user id to DB
justinyjt Sep 29, 2022
11baf17
Fix bug where password field for delete account and change password s…
justinyjt Sep 29, 2022
8be05d8
Merge pull request #43 from CS3219-AY2223S1/bugfix/frontend/passwordprop
EltonGohJH Oct 2, 2022
5275fd9
Update communication and collaboration
BrendonLau Oct 4, 2022
fb940fa
fix merge conflict
BrendonLau Oct 4, 2022
83358c7
Update package.json for simple-peer types
BrendonLau Oct 6, 2022
909378e
Merge pull request #34 from CS3219-AY2223S1/feat/room/frontend
BrendonLau Oct 6, 2022
35c954b
Create question service backend
justinyjt Oct 7, 2022
326c7e9
Update postman doc
justinyjt Oct 7, 2022
c70b427
Room(feat): Implement Room service
EltonGohJH Oct 5, 2022
4d8942f
Room(fix): Fix minor bug
EltonGohJH Oct 5, 2022
37668c9
Update room schema and api
EltonGohJH Oct 9, 2022
1a31d34
Init collaboration service
EltonGohJH Oct 9, 2022
2da1a47
Merge pull request #45 from CS3219-AY2223S1/room-socket
BrendonLau Oct 10, 2022
b711e93
Merge pull request #46 from CS3219-AY2223S1/feat/question/backend
BrendonLau Oct 10, 2022
def810a
Add frontend elements for question service
pyk595 Oct 11, 2022
414620e
Handle merge conflicts
pyk595 Oct 11, 2022
951b8d6
feat(room/chat): update to use Uuid
BrendonLau Oct 11, 2022
90d69a8
Merge pull request #48 from CS3219-AY2223S1/feat/room/frontend
pyk595 Oct 11, 2022
dbcb327
Update question modal to make calls to backend api
pyk595 Oct 11, 2022
6b0de43
Handle merge conflicts
pyk595 Oct 11, 2022
56c6889
Enable question service to get difficulty from socket context
pyk595 Oct 14, 2022
dcc2f4e
Merge pull request #47 from CS3219-AY2223S1/feat/question/frontend
BrendonLau Oct 14, 2022
9902698
feat(collab): Allow users to collab
EltonGohJH Oct 13, 2022
d41bd9a
Merge pull request #49 from CS3219-AY2223S1/collab
BrendonLau Oct 14, 2022
51645ec
feat(collab): integration collaboration and fix bugs
BrendonLau Oct 14, 2022
b0c49ca
doc(readme): update
BrendonLau Oct 14, 2022
9f35795
Merge pull request #50 from CS3219-AY2223S1/feat/room/frontend
EltonGohJH Oct 16, 2022
4483d32
Fix(Question/Setting): Minor fix
BrendonLau Oct 21, 2022
bbe69e5
Merge pull request #51 from CS3219-AY2223S1/feat/room/frontend
BrendonLau Oct 21, 2022
b872b22
Feat(communication): integrate authentication
BrendonLau Oct 21, 2022
c392102
Merge pull request #52 from CS3219-AY2223S1/feat/com/auth
BrendonLau Oct 21, 2022
153a912
feat(history): history service
BrendonLau Oct 22, 2022
4dd43c0
create env
BrendonLau Oct 22, 2022
fa1731e
feat(history): history service
BrendonLau Oct 22, 2022
d0fb272
Merge pull request #53 from CS3219-AY2223S1/feat/history/service
EltonGohJH Oct 22, 2022
f188aa8
feat(history): update duplication checks and refractor
BrendonLau Oct 22, 2022
a12ea8a
fix(history): schema enable unique for roomUuid
BrendonLau Oct 23, 2022
ed4e782
Merge pull request #54 from CS3219-AY2223S1/feat/history/service
BrendonLau Oct 23, 2022
9901206
feat(history): Create session when room closes
EltonGohJH Oct 24, 2022
bbc37e6
feat(history): Implement frontend
justinyjt Oct 25, 2022
8a46b2a
Merge pull request #55 from CS3219-AY2223S1/elton-create-session
pyk595 Oct 25, 2022
7490f22
Fix merge conflicts
justinyjt Oct 25, 2022
949c1e3
Implement User Authentication for Question Service
pyk595 Oct 27, 2022
7940c79
feat(history): Implement history frontend
justinyjt Oct 28, 2022
0e382d1
feat(history): add history page navigation to navbar
justinyjt Oct 28, 2022
603ba18
Fix bug where duration was showing 0:0:0 on editor view
justinyjt Oct 28, 2022
fc3fca5
Update question service endpoint names
justinyjt Nov 1, 2022
9888026
Update profile coming soon
justinyjt Nov 1, 2022
d7cca4c
Merge pull request #56 from CS3219-AY2223S1/feat/history/frontend
justinyjt Nov 1, 2022
b519b1e
Merge branch 'main' into chore/question/auth
justinyjt Nov 1, 2022
6f9652b
Merge pull request #58 from CS3219-AY2223S1/chore/question/auth
justinyjt Nov 1, 2022
feab543
feat(docker): Dockerize microservices except for frontend
EltonGohJH Nov 2, 2022
10b65bc
Update history response interface
BrendonLau Nov 2, 2022
f610700
Merge pull request #60 from CS3219-AY2223S1/elton-dockerize
BrendonLau Nov 2, 2022
8c89a69
Merge pull request #61 from CS3219-AY2223S1/feat/history/dto
BrendonLau Nov 2, 2022
30d774d
Update history bug and sort session by id
BrendonLau Nov 2, 2022
9acbcd6
Beatify Login Page
justinyjt Nov 2, 2022
a550375
Merge pull request #62 from CS3219-AY2223S1/feat/history/frontend
justinyjt Nov 2, 2022
dae1daa
Fix Login background
BrendonLau Nov 2, 2022
7bb0295
Update confirm button
BrendonLau Nov 2, 2022
9504830
Merge pull request #63 from CS3219-AY2223S1/frontend/signup
BrendonLau Nov 2, 2022
5dd1ed6
Fix bigbang export error
BrendonLau Nov 2, 2022
dec6422
Merge pull request #64 from CS3219-AY2223S1/frontend/signup
BrendonLau Nov 2, 2022
9e07886
Update EditorView props
pyk595 Nov 3, 2022
92b30b6
Merge pull request #65 from CS3219-AY2223S1/chore/history/editorview
pyk595 Nov 3, 2022
855134a
Update Big Bang
BrendonLau Nov 8, 2022
5344fc3
Merge pull request #67 from CS3219-AY2223S1/feat/user/auth
BrendonLau Nov 8, 2022
bdce726
docs: Update README.md
EltonGohJH Nov 8, 2022
9269714
Merge branch 'main' into elton-docs-update
BrendonLau Nov 8, 2022
eb48615
Merge pull request #66 from CS3219-AY2223S1/elton-docs-update
BrendonLau Nov 8, 2022
746ff94
Update login button colour
pyk595 Nov 8, 2022
ad68e54
Merge pull request #68 from CS3219-AY2223S1/chore/history/editorview
pyk595 Nov 8, 2022
77a01fc
Update historypage bug
BrendonLau Nov 8, 2022
2193fa2
Merge pull request #69 from CS3219-AY2223S1/frontend/historypage/bugfix
BrendonLau Nov 8, 2022
ee1445a
Final Report V1
BrendonLau Nov 8, 2022
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
text=auto
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Status

READY | IN DEVELOPMENT | HOLD

## Description

A few sentences describing the overall goals of the pull request's commits.

## Screenshots

A few screenshots displaying the changes made by the pull request.

## Todos

* [ ] Have you cleaned up your code? (Eg. remove redundant code/comments, fix warnings, refactor duplicate code etc.)
* [ ] Have you manually tested your code extensively? (Eg. execute the happy path, try out edge cases etc.)
* [ ] Have you linked your PR to the respective issues?
* [ ] Have you generated documentation for your changes?
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
.env
.DS_Store
frontend/.DS_Store
frontend/src/components/.DS_Store
user-service/.DS_Store
user-service/src/.DS_Store
frontend/src/.DS_Store
Binary file added 10-ProjectReport.pdf
Binary file not shown.
78 changes: 71 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,78 @@
# CS3219-AY22-23-Project-Skeleton
# CS3219-AY22-23

This is a template repository for CS3219 project.
## Prerequisites to be installed

Please install the following applications/software before proceeding to use/evolve the project
skeleton.

- Nodejs (and the npm that comes with it)
- nodemon
- create-react-app
- Any IDE of your choice
- Any Git client
- MongoDB Community Server
- MongoShell
- MongoDB Compass (Optional)
- Docker

## User Service
1. Rename `.env.sample` file to `.env`.
2. Create a Cloud DB URL using Mongo Atlas.
3. Enter the DB URL created as `DB_CLOUD_URI` in `.env` file.
4. Install npm packages using `npm i`.
5. Run User Service using `npm run dev`.

1. Copy `.env.example` file as `.env`.
2. Update the relevant environment variables
3. Install npm packages using `npm i`.
4. Run User Service using `npm run dev`.

## Matching Service

1. Copy `.env.example` file as `.env`.
2. Update the relevant environment variables
3. Install npm packages using `npm i`.
4. Run `docker run -d -e POSTGRES_PASSWORD=root -p 5455:5432 postgres`
5. Run `npx prisma migrate dev` to update data in db or `npx prisma migrate reset` to reset db
6. Run User Service using `npm run dev`.

## Communication Service

1. Copy `.env.example` file as `.env`.
2. Update the relevant environment variables
3. Install npm packages using `npm i`.
4. Run User Service using `npm run dev`.

## Collaboration Service

1. Copy `.env.example` file as `.env`.
2. Update the relevant environment variables
3. Install npm packages using `npm i`.
4. Run `docker compose up` to start redis
5. Run Collaboration Service using `npm run dev`.

## Question service

1. Copy `.env.example` file as `.env`.
2. Update the relevant environment variables
3. Install npm packages using `npm i`.
4. Run Question Service using `npm run dev`.

## History service

1. Copy `.env.example` file as `.env`.
2. Update the relevant environment variables
3. Install npm packages using `npm i`.
4. Run History Service using `npm run dev`.

## Frontend

1. Install npm packages using `npm i`.
2. Run Frontend using `npm start`.

## Starting with Docker compose instead (Alternate way to start up)

1. Update all the relevant environment variables across all the services.
2. Run docker compose up on the root of the project (this will start all the microservices except for frontend).
3. Follow the instruction at [Frontend](#Frontend) to start the frontend service.

## Generating API Documentation

1. Follow the instructions [here](https://github.com/thedevsaddam/docgen) to install docgen
2. Export postman collection as Collection v2.1 to docs/peerdep-api directory
3. Run `docgen build -i peerdep-api.postman_collection.json -o api-doc.md -m` to generate documentation
1 change: 1 addition & 0 deletions collaboration-service/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions collaboration-service/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOGIN_SECRET_KEY=''
15 changes: 15 additions & 0 deletions collaboration-service/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": "tsconfig.json" },
"extends": ["airbnb-base", "airbnb-typescript/base"],
"rules" : {
"@typescript-eslint/no-use-before-define": "off",
"class-methods-use-this": "off",
"@typescript-eslint/no-shadow": "off",
"implicit-arrow-linebreak": "off",
"no-param-reassign": "off",
"no-promise-executor-return": "off",
"import/prefer-default-export": "off",
"consistent-return": "off"
}
}
3 changes: 3 additions & 0 deletions collaboration-service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
# Keep environment variables out of version control
.env
7 changes: 7 additions & 0 deletions collaboration-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:16-alpine
WORKDIR /usr/collaboration-service
COPY package.json .
RUN npm install --quiet
COPY . .
EXPOSE 9001
CMD ["npm", "run", "dev"]
7 changes: 7 additions & 0 deletions collaboration-service/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3.8'
services:
redis:
image: redis:6.2-alpine
container_name: redis-6
ports:
- "6379:6379"
Loading