Skip to content

Commit abdd1fb

Browse files
evanyan13Jajaredjmsandiegoorickkoh
authored
Milestone 5 (#96)
* Add base code for collaboration service * Added additional services for collaboration and code improvements * Add basic collab page with resizeable panels * Add collab-test page component for real-time collaboration * Add capturing of selection in onInputCapture function * Add matching history * Integrate ide in collaboration page * Fix lint errors for collaboration page * Add server.js for Socket.io and YJS integration * Basic collab editor function done * Remove unecessary dep in useCallback * Add monaco editor and y-websocket dependencies * Add MonacoEditor component for collaborative code editing * Add cursor indicators for collaboration ide * Add dracula theme for monaco ide * Collab-test (to be removed) * Add todo * Add subscribe button * Refactor async function to fetch and display question (temp) * Add CollaborativeEditor and InjectableCursorStyles components * Get user and add todo * Refactor matching logic (#104) * Implement y-websocket and host it as a separate gateway (#101) * Refactor code structure for collab to maintain consistency * Adding a new yjs ws gateway * Update merge error * Attempt to create yjs gateway * Remove yjs in nestjs * Implement y-websocket as service * Ms5 jared/refactor matching (#102) * Add base code for collaboration service * Added additional services for collaboration and code improvements * Add matching history * Refactor matching logic --------- Co-authored-by: Evan Yan <[email protected]> * Revert "Ms5 jared/refactor matching (#102)" (#103) This reverts commit ef07356. --------- Co-authored-by: Jajabonks <[email protected]> * Add new features and update layout in collaboration page * Improve error handling for question creation/editing * Update UI components in Chatbox and DescriptionTabContent * Add y-utility package dependency * Add useYjsStore custom hook for syncing with Yjs store * Update CollaborativeWhiteboard to use our own yjs backend * Refactor cursor styles and WebSocket connection in Editor * Fix build errors * Update default socket URLs in collaborative editor and whiteboard components * Add cursorColors.ts with array of colors and getRandomColor() function * Use random color for the cursors * Implement get collab session (#105) * Implement get collab session * Remove unused schema * Check session status before returning session details * Patch: Connect collab message with gateway * Add get question by ID endpoint * Fix get question by id endpoint * Reorder setupWSConnection to fix sync issues * Update collaboration page to fetch session info before rendering * Refactor code for passing sessionId to editor components * Create SessionInfo schema for storing session details * Add getSessionInfo function to collaborationService * Add redirect user to collaboration page * Setup y-mongo db provider (#106) * Patch import error : * fix get question by id endpoint * Update CreateQuestionModal.tsx with quill editor * Update EditQuestionModal.tsx to include quill functionalities * Update DescriptionTabContent.tsx to display updated description format * Update pages to display correct question for collab session * Add QuestionSchema parsing and update DescriptionTabContent * Quill (#109) * Update CreateQuestionModal.tsx with quill editor * Update EditQuestionModal.tsx to include quill functionalities * Update DescriptionTabContent.tsx to display updated description format * Update pages to display correct question for collab session * Add QuestionSchema parsing and update DescriptionTabContent --------- Co-authored-by: shavonneg <> * Fix build errors and eslint errors * Remove test server file * Remove duplicate QuestionTabPanel component * Add env file to fe --------- Co-authored-by: Jajared <[email protected]> Co-authored-by: jmsandiegoo <[email protected]> Co-authored-by: Rick <[email protected]> Co-authored-by: Jajabonks <[email protected]> Co-authored-by: shavonneg <>
1 parent 529ed36 commit abdd1fb

File tree

103 files changed

+25969
-862
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+25969
-862
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
tsconfigRootDir: __dirname,
6+
sourceType: 'module',
7+
},
8+
plugins: ['@typescript-eslint/eslint-plugin'],
9+
extends: [
10+
'plugin:@typescript-eslint/recommended',
11+
'plugin:prettier/recommended',
12+
],
13+
root: true,
14+
env: {
15+
node: true,
16+
jest: true,
17+
},
18+
ignorePatterns: ['.eslintrc.js'],
19+
rules: {
20+
'@typescript-eslint/interface-name-prefix': 'off',
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/explicit-module-boundary-types': 'off',
23+
'@typescript-eslint/no-explicit-any': 'off',
24+
},
25+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all"
4+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#################
2+
## DEVELOPMENT ##
3+
#################
4+
FROM node:18-alpine AS development
5+
6+
# Set the working directory in the container
7+
WORKDIR /app
8+
9+
# Copy the package.json and package-lock.json files
10+
COPY package*.json ./
11+
12+
# Install dependencies
13+
RUN npm install
14+
15+
# Copy the rest of the application code
16+
COPY . .
17+
18+
# Built the app to /dist folder
19+
RUN npm run build
20+
21+
# Expose the port the app runs on
22+
EXPOSE 4000
23+
24+
################
25+
## PRODUCTION ##
26+
################
27+
FROM node:18-alpine AS production
28+
29+
# Set node environment to production
30+
ARG NODE_ENV=production
31+
ENV NODE_ENV=${NODE_ENV}
32+
33+
# Set the working directory in the container
34+
WORKDIR /app
35+
36+
# Copy only the necessary files from the previous build stage
37+
COPY --from=development /peerprep/app/dist ./dist
38+
COPY package*.json ./
39+
40+
# Install production dependencies only
41+
RUN npm ci --only=production
42+
43+
# Expose the port the app runs on
44+
EXPOSE 4000
45+
46+
# Run the main file
47+
CMD ["node", "dist/main"]
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<p align="center">
2+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
3+
</p>
4+
5+
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6+
[circleci-url]: https://circleci.com/gh/nestjs/nest
7+
8+
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
9+
<p align="center">
10+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13+
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14+
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
15+
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
16+
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
17+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
18+
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
19+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
20+
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
21+
</p>
22+
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
23+
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
24+
25+
## Description
26+
27+
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
28+
29+
## Project setup
30+
31+
```bash
32+
$ npm install
33+
```
34+
35+
## Compile and run the project
36+
37+
```bash
38+
# development
39+
$ npm run start
40+
41+
# watch mode
42+
$ npm run start:dev
43+
44+
# production mode
45+
$ npm run start:prod
46+
```
47+
48+
## Run tests
49+
50+
```bash
51+
# unit tests
52+
$ npm run test
53+
54+
# e2e tests
55+
$ npm run test:e2e
56+
57+
# test coverage
58+
$ npm run test:cov
59+
```
60+
61+
## Resources
62+
63+
Check out a few resources that may come in handy when working with NestJS:
64+
65+
- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
66+
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
67+
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
68+
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
69+
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
70+
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
71+
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
72+
73+
## Support
74+
75+
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
76+
77+
## Stay in touch
78+
79+
- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
80+
- Website - [https://nestjs.com](https://nestjs.com/)
81+
- Twitter - [@nestframework](https://twitter.com/nestframework)
82+
83+
## License
84+
85+
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://json.schemastore.org/nest-cli",
3+
"collection": "@nestjs/schematics",
4+
"sourceRoot": "src",
5+
"compilerOptions": {
6+
"deleteOutDir": true
7+
}
8+
}

0 commit comments

Comments
 (0)