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

Draw #37

Closed
Closed

Draw #37

Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 41 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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
27 changes: 27 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# check jest standards
#uncomment when writting test cases in __test__ file
# 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

```


```
63 changes: 21 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,55 @@
# GSSOC'24 Guidelines

- Issues Level
- Level 1: 10 points

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

# 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.






## Screenshots

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


## 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)

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

- Collaboration(Websockets)

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


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

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


https://github.com/dhruvpatidar359/nextdraw

## Backend

https://github.com/dhruvpatidar359/nextDrawBackend

## Contributing

Expand All @@ -71,31 +61,27 @@ 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)

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 @@ -108,22 +94,15 @@ 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

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




## Contact

dhruvpatidar - [email protected]
Loading