Skip to content

Commit

Permalink
Merge branch 'dhruvpatidar359:master' into feature/pan-Using-Space-key
Browse files Browse the repository at this point in the history
  • Loading branch information
a-khushal authored Jun 6, 2024
2 parents a8556ee + b11f393 commit 31ae380
Show file tree
Hide file tree
Showing 73 changed files with 8,864 additions and 4,784 deletions.
39 changes: 39 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
root: true,
ignorePatterns: ["node_modules/**", "dist/**"],
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"next",
"prettier",
],
overrides : [
{ plugins: ["react", "@typescript-eslint"],
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
parser: "@typescript-eslint/parser",


rules: {
"react/no-direct-mutation-state": [
"error", // Keep the default as error
{
ignoreCallbacks: true, // Allow mutation within callbacks (optional)
mutators: ["this.setState"], // Allow mutation using this.setState (optional)
},
],
"react/no-unescaped-entities": "off",
"@next/next/no-page-custom-font": "off",
},}],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
};
// eslint-disable-next-line no-undef
24 changes: 13 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
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 '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
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]

- 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]

- 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.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Please describe your feature.**
Expand Down
38 changes: 38 additions & 0 deletions .github/Pull_Request_Template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
### Description
A clear and concise description of what the PR does.
- This PR does the following:
- Adds ...
- Fixes ...
- Updates ...

### Related Issues
Link any related issues using the format `Fixes #issue_number`.
This helps to automatically close related issues when the PR is merged.
- Placeholder: "Fixes #123"

### Changes
List the detailed changes made in this PR.
- Added a new feature to ...
- Refactored the ...
- Fixed a bug in ...

### Testing Instructions
Detailed instructions on how to test the changes. Include any setup needed and specific test cases.
1. Pull this branch.
2. Run `npm install` to install dependencies.
3. Run `npm test` to execute the test suite.
4. Verify that ...

### Screenshots (if applicable)
Add any screenshots that help explain or visualize the changes.

### Additional Context
Any additional context or information that reviewers should be aware of.
- This PR is based on the following...

### Checklist
Make sure to check off all the items before submitting. Mark with [x] if done.
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings
- [ ] I am working on this issue under GSSOC
23 changes: 23 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# check jest standards
npm run test ||
(
echo 'Jest test failed. '
false;
)
# check prettier standards
npm run check-format ||
(
echo 'Prettier check Failed,Run npm run format, add changes and try commit again.'
false;
)

#check ESLint standards
npm run check-lint ||
(
echo 'eslint check failed. '
false;
)
echo 'All Done I am committing this now'
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
build
coverage
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "endOfLine": "lf", "printWidth": 80, "tabWidth": 2, "trailingComma": "es5" }
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.format": "explicit"
}
}
14 changes: 4 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@

## Installation(LOCAL SETUP)

WARNING : First install the backend through this repository
WARNING : First install the backend through this repository
https://github.com/dhruvpatidar359/nextDrawBackend



**FrontEnd Installation**

1. Fork the Project

```bash
use the github fork button
```
2. Create a .env.local file in the directory and create the below field: Put the url of the locally hosted server that we have created before

2. Create a .env.local file in the directory and create the below field: Put the url of the locally hosted server that we have created before

```bash
NEXT_PUBLIC_WEB_SOCKET= url of the server
```


3. Install DependenciesNavigate to the project directory in your terminal and run:


```bash
npm install
# or
Expand All @@ -35,7 +31,5 @@ https://github.com/dhruvpatidar359/nextDrawBackend
npm run dev
# or
yarn dev

```


```
108 changes: 53 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,51 @@
# GSSOC'24 Guidelines
- Issues Level
- Level 1: 10 points
- Level 2: 25 points
- Level 3: 45 points

- Issue Assignment
- Remember assigning an issue to someone does not means that he is the only person to contribute on that particular issue . Other persons can also make PR to that particular issue .
# Welcome to NextDraw🎨

# NextDraw
A Next.js based whiteboard application using Rough.js under the hood .

A Next.js based whiteboard application using Rough.js under the hood .
- Supports websockets
- Supports shapes like : rectangle || square || ellipse || freehand etc
- Record feature
- Pan | zoom and lot more . Just click on the hosted link.




## Table of Contents
- Project Introduction
- Features
- Built with
- Contributing
- GSSOC'24 Guidelines
- Local Setup
- License
- Contact


## Screenshots

![image](https://github.com/dhruvpatidar359/nextdraw/assets/103873587/19f1fa93-8b93-4713-adc5-306605bb8a6f)


## Features
## Features🎨

- RECORDING ✅

<img width="182" alt="image" src="https://github.com/dhruvpatidar359/nextdraw/assets/103873587/64637de6-60e6-4192-99a5-054864edb6e2">

<img width="182" alt="image" src="https://github.com/dhruvpatidar359/nextdraw/assets/103873587/64637de6-60e6-4192-99a5-054864edb6e2">

- Middle Mouse Click ToolBar
-
![image](https://github.com/dhruvpatidar359/nextdraw/assets/103873587/9ba4a9e8-3397-4c89-91da-0932d2012d90)
- Middle Mouse Click ToolBar 🖱️
- ![image](https://github.com/dhruvpatidar359/nextdraw/assets/103873587/9ba4a9e8-3397-4c89-91da-0932d2012d90)

- Collaboration(Websockets) 🤝

- Collaboration(Websockets)

![image](https://github.com/dhruvpatidar359/nextdraw/assets/103873587/b33557e4-c205-4785-b3f8-4c6f1be50951)

- Supports various shapes: Rectangle , square , ellipse , freehand , etc .

### Built With 🛠️

### Built With
* [Next.js]()
* [Canvas API]()
* [MongoDb]()
* [Node.js]()
* [Websockets]()

- [Next.js]()
- [Canvas API]()
- [MongoDb]()
- [Node.js]()
- [Websockets]()


## Frontend
https://github.com/dhruvpatidar359/nextdraw
## Backend
https://github.com/dhruvpatidar359/nextDrawBackend





## Contributing
## Contributing 🚀

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

Expand All @@ -71,13 +55,31 @@ Contributions are what make the open source community such an amazing place to b
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request


## Installation(LOCAL SETUP)
## GSSOC'24 Guidelines

- Issues Level

- Level 1: 10 points
- Level 2: 25 points
- Level 3: 45 points

- Issue Assignment
- Remember assigning an issue to someone does not means that he is the only person to contribute on that particular issue . Other persons can also make PR to that particular issue .


## Repositories 📂
- Frontend
https://github.com/dhruvpatidar359/nextdraw

- Backend

WARNING : First install the backend through this repository
https://github.com/dhruvpatidar359/nextDrawBackend


## Installation(LOCAL SETUP)

WARNING : First install the backend through this repository
https://github.com/dhruvpatidar359/nextDrawBackend

**FrontEnd Installation**

Expand All @@ -86,16 +88,15 @@ https://github.com/dhruvpatidar359/nextDrawBackend
```bash
use the github fork button
```
2. Create a .env.local file in the directory and create the below field: Put the url of the locally hosted server that we have created before

2. Create a .env.local file in the directory and create the below field: Put the url of the locally hosted server that we have created before

```bash
NEXT_PUBLIC_WEB_SOCKET= url of the server
```


3. Install DependenciesNavigate to the project directory in your terminal and run:


```bash
npm install
# or
Expand All @@ -108,22 +109,19 @@ https://github.com/dhruvpatidar359/nextDrawBackend
npm run dev
# or
yarn dev

```


```

**Remember that this project uses .env for both the backend and frontend part**



## License
## License 📜

Distributed under the MIT License. See `LICENSE` for more information.




## Contact

## Contact 📧
dhruvpatidar - dhruvpatidar35@gmail.com

We appreciate your contributions and look forward to collaborating with you!!
Thank you for contributing . Happy Coding💖.
Loading

0 comments on commit 31ae380

Please sign in to comment.