├── .DS_Store ├── .env.example ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── greetings.yml │ ├── node.js.yml │ └── npm-publish.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTE.md ├── Dockerfile ├── LICENSE ├── README.md ├── assets ├── CD.png ├── Readme.md ├── audio-room.png ├── chat-room.png ├── code-editor.png ├── codesync.png ├── compile-code.png ├── head.png ├── join.png ├── main.png ├── members.png ├── multi-theme.png ├── multi-theme2.png ├── text-editor.png ├── user-auth.png └── white-board.png ├── client ├── .env.example ├── .gitignore ├── Dockerfile ├── README.md ├── craco.config.js ├── package-lock.json ├── package.json ├── public │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── image │ │ ├── Logos │ │ │ ├── codesync-01.png │ │ │ ├── logo-01.svg │ │ │ ├── logo-02.svg │ │ │ ├── pattern-01.png │ │ │ ├── pattern-01.svg │ │ │ ├── sample.png │ │ │ ├── xyz.png │ │ │ └── xyz2.png │ │ ├── Team │ │ │ ├── 1637646334769.png │ │ │ ├── harsh.JPG │ │ │ ├── jayraj.jpg │ │ │ └── vivek.JPG │ │ ├── codesynclogo.png │ │ ├── email-pattern.png │ │ ├── eraser.png │ │ └── icons │ │ │ ├── CodeSync-type-logo.png │ │ │ ├── CodeSync-type-logo.svg │ │ │ ├── CodeSync.svg │ │ │ ├── chat-22.svg │ │ │ ├── chat.svg │ │ │ ├── close.svg │ │ │ ├── code-room.svg │ │ │ ├── coding.svg │ │ │ ├── compiler.svg │ │ │ ├── copy-svgrepo-com.svg │ │ │ ├── copy.svg │ │ │ ├── download.svg │ │ │ ├── drawing-svgrepo.svg │ │ │ ├── drawing.svg │ │ │ ├── input.svg │ │ │ ├── microphone-voice.svg │ │ │ ├── mute.svg │ │ │ ├── notes.svg │ │ │ ├── pensil.svg │ │ │ ├── send.svg │ │ │ ├── share.svg │ │ │ └── text-editor-repo.svg │ ├── index.html │ ├── link_icon.svg │ ├── manifest.json │ ├── robots.txt │ └── site.webmanifest ├── src │ ├── API.js │ ├── Action │ │ └── UserAction.js │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── BaseURL.js │ ├── Components │ │ ├── Auth │ │ │ ├── ForgotPassword │ │ │ │ └── ForgotPassword.js │ │ │ ├── Login │ │ │ │ ├── LoginPage.css │ │ │ │ └── LoginPage.js │ │ │ ├── Register │ │ │ │ ├── Icon.js │ │ │ │ └── Register.js │ │ │ └── ResetPassword │ │ │ │ └── ResetPassword.js │ │ ├── Editor │ │ │ └── Editor.js │ │ ├── Error │ │ │ └── NotFound.js │ │ ├── FrontPage │ │ │ ├── FrontPage.js │ │ │ ├── Landing.css │ │ │ └── LandingPage.js │ │ ├── Header │ │ │ ├── Header.css │ │ │ └── Header.js │ │ ├── HomePage │ │ │ └── HomePage.js │ │ ├── Input │ │ │ └── Input.js │ │ ├── Mobile │ │ │ └── Mobile.js │ │ ├── NotFound │ │ │ └── NotFound.js │ │ ├── Room │ │ │ ├── CreateRoom.js │ │ │ ├── DropDown │ │ │ │ └── LanguageDP.js │ │ │ ├── Email │ │ │ │ └── Invite.js │ │ │ ├── JoinRoom.js │ │ │ ├── Language │ │ │ │ └── Default.js │ │ │ ├── Message │ │ │ │ ├── Message.css │ │ │ │ └── Message.js │ │ │ ├── RichEditor │ │ │ │ └── Draft.js │ │ │ ├── Room.css │ │ │ ├── Room.js │ │ │ └── Slider │ │ │ │ └── Slider.js │ │ ├── Team Page │ │ │ └── TeamPage.js │ │ ├── TextEditor │ │ │ └── TextEditor.js │ │ ├── WhiteBoard │ │ │ ├── Board │ │ │ │ ├── Board.css │ │ │ │ └── Board.js │ │ │ ├── Container │ │ │ │ ├── Container.css │ │ │ │ └── Container.js │ │ │ └── Whiteboard.js │ │ ├── socket.io.js │ │ └── trial │ │ │ └── trial.js │ ├── Constant │ │ └── UserConst.js │ ├── Protected.js │ ├── Reducer │ │ ├── UserReducer.js │ │ └── index.js │ ├── bootstrap.min.css │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── reportWebVitals.js │ ├── setupTests.js │ └── store.js └── tailwind.config.js ├── docker-compose.yml ├── imageTour.md ├── package-lock.json ├── package.json └── server ├── config └── db.js ├── controllers ├── pwd.controllers.js ├── room.controllers.js └── user.controllers.js ├── middleware ├── auth.middleware.js └── ratelimiter.middleware.js ├── models ├── room.model.js └── user.modal.js ├── routes ├── pwd.route.js ├── room.route.js └── user.route.js ├── server.js └── socket.user.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/.DS_Store -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | NODE_ENV=development 2 | PORT=8080 3 | MONGO_URI="Write MongoDB URL" 4 | JWT_SECRET_KEY="Write Any JWR Secrets" 5 | FRONTEND_URL="Write Frontend PORT" 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: codewithvk 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [pull_request, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | steps: 12 | - uses: actions/first-interaction@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | issue-message: 'Message that will be displayed on users first issue' 16 | pr-message: 'Message that will be displayed on users first pull request' 17 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ main ] 9 | pull_request: 10 | branches: [ main ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [12.x, 14.x, 16.x] 20 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 21 | 22 | steps: 23 | - uses: actions/checkout@v2 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v2 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - run: npm ci 29 | - run: npm run build --if-present 30 | 31 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v2 16 | with: 17 | node-version: 12 18 | - run: npm ci 19 | - run: npm test 20 | 21 | publish-npm: 22 | needs: build 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v2 26 | - uses: actions/setup-node@v2 27 | with: 28 | node-version: 12 29 | registry-url: https://registry.npmjs.org/ 30 | - run: npm ci 31 | - run: npm publish 32 | env: 33 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 34 | 35 | publish-gpr: 36 | needs: build 37 | runs-on: ubuntu-latest 38 | permissions: 39 | contents: read 40 | packages: write 41 | steps: 42 | - uses: actions/checkout@v2 43 | - uses: actions/setup-node@v2 44 | with: 45 | node-version: 12 46 | registry-url: https://npm.pkg.github.com/ 47 | - run: npm ci 48 | - run: npm publish 49 | env: 50 | NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | .env 3 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | work.vivekjaviya@gmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTE.md: -------------------------------------------------------------------------------- 1 | ### Setup the repository to your local environment.💌 2 | 1. `Fork` the repository - Creates a replica of repository to your local environment. 3 | 2. Clone the repository - Downloads all repo files to your machine, using 4 | ```git 5 | git clone https://github.com/YOUR-USERNAME/code-sync 6 | ``` 7 | 3. Set working directory to the root directory of the project. 8 | ```sh 9 | cd code-sync 10 | ``` 11 | ## Frontend ⚛️ 12 | 13 | Following are the steps to run the frontend of the community-website on your local. All the frontend code will go in the `client` directory. 14 | 15 | 1. Navigate to `client` folder. 16 | ```sh 17 | cd client 18 | ``` 19 | 2. Install all the required packages and dependencies. 20 | ```node 21 | npm install 22 | ``` 23 | 3. Rename ```.env.example``` to ```.env``` & Fill data as described. 24 | 25 | 26 | ## Backend 💻 27 | 28 | Following are the steps to run the backend of the community-website on your local. All the backend code will go in the `@root` folder. 29 | 30 | 1. Install all the required packages and dependencies on ```@Root``` folder under ```code-sync``` directory. 31 | ```node 32 | npm install 33 | ``` 34 | 2. Rename ```.env.example``` to ```.env``` & Fill data as described. 35 | 36 | ## Run/Compile ⏱️ 37 | - If you wanna run frontend and backend at one time then you can run command 38 | 39 | ```node 40 | npm run dev 41 | ``` 42 | - For Just Frontend/Client 43 | 44 | ```node 45 | npm run client 46 | ``` 47 | - For Backend/Server 48 | 49 | ```node 50 | npm run server 51 | ``` 52 | - Backend Run on port ```localhost:ENV_PORT``` & Frontend Run on ```localhost:3000``` 53 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14.18 2 | 3 | LABEL version="1.0" 4 | LABEL description="This is the base docker image for the codeSync Backend Nodejs & Express Server." 5 | LABEL maintainer = ["codedeeper.work@gmail.com", "work.vivekjaviya@gmail.com"] 6 | 7 | WORKDIR /usr/src/app/backend 8 | 9 | COPY ["package.json", "package-lock.json", "./"] 10 | 11 | RUN npm install --production 12 | 13 | COPY . . 14 | 15 | EXPOSE 8080 16 | 17 | CMD ["npm", "run", "server"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Code Deeper 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CodeSync 2 | ### ⚠️ The site is no longer live, but you can watch the video to learn more 🛑 3 | CodeSync - Collaborative cloud platform for students & teachers | Product Hunt 4 | 5 | [![Issues](https://img.shields.io/github/issues/Code-Deeper/code-sync)](#issues) 6 | [![forks](https://img.shields.io/github/forks/Code-Deeper/code-sync)](#forks) 7 | [![license](https://img.shields.io/github/license/Code-Deeper/code-sync)](#license) 8 | 9 | [![Watch the video](https://github.com/Code-Deeper/media-repo/blob/main/CODESYNC.lIVE%20(1).png)](https://youtu.be/5IUfY_Pqj_s) 10 |

👨🏾‍💻 A Cloud Collebrative Platform 🧑‍🏫

11 | 12 | CodeSync is a Cloud Collaborative Platform for Competitive programmers, Educators & who like to code with friends. CodeSync Provide Collebrative Code-Editor, 13 | Real-Time Audio Communication, Collaborative Drawing board for explain idea, Collaborative text-editor for taking notes, Real-Time chat box for chatting 14 | with other room members & Many more things with smooth and attractive UI. 15 | 16 | ## Tech Stack 🗃 17 | ![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white) 18 | 19 | 20 | 21 | 22 | ## How to Setup Project In Local ? 🧑🏽‍💻 23 | - For Local Installation & Contribute , You can refer [Contribute.md](https://github.com/Code-Deeper/code-sync/blob/main/CONTRIBUTE.md) 24 | 25 | ## Features 📈 26 | - [x] Collebrative Room Create & Join 27 | - [x] Collebrative Code-Editor 28 | - [x] Collebrative White-Board 29 | - [x] Real Time Audio Communcation 30 | - [x] Real Time Chat Messaging 31 | - [x] Collebrative Text-editor 32 | - [x] Compiler Programe 33 | - [x] Invitation On Email 34 | - [x] Template added when change language 35 | 36 | ## Project Management 37 | - For Any Query / Improvement You can mail on ```work.vivekjaviya@gmail.com```. 38 | ## Image Tour 39 | - You can see Image Tour [here](https://github.com/Code-Deeper/code-sync/blob/main/imageTour.md) 40 | 41 | ## License & copyright 42 | - © 2021, Code-Deeper 43 | - Licensed under the [MIT License](LICENSE). 44 | -------------------------------------------------------------------------------- /assets/CD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/CD.png -------------------------------------------------------------------------------- /assets/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /assets/audio-room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/audio-room.png -------------------------------------------------------------------------------- /assets/chat-room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/chat-room.png -------------------------------------------------------------------------------- /assets/code-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/code-editor.png -------------------------------------------------------------------------------- /assets/codesync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/codesync.png -------------------------------------------------------------------------------- /assets/compile-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/compile-code.png -------------------------------------------------------------------------------- /assets/head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/head.png -------------------------------------------------------------------------------- /assets/join.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/join.png -------------------------------------------------------------------------------- /assets/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/main.png -------------------------------------------------------------------------------- /assets/members.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/members.png -------------------------------------------------------------------------------- /assets/multi-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/multi-theme.png -------------------------------------------------------------------------------- /assets/multi-theme2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/multi-theme2.png -------------------------------------------------------------------------------- /assets/text-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/text-editor.png -------------------------------------------------------------------------------- /assets/user-auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/user-auth.png -------------------------------------------------------------------------------- /assets/white-board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/assets/white-board.png -------------------------------------------------------------------------------- /client/.env.example: -------------------------------------------------------------------------------- 1 | REACT_APP_JAUDGE_LINK_HOST="HOSTURL" 2 | REACT_APP_JAUDGE_API_KEY="Compiler API KEY" 3 | REACT_APP_API_URL="Compiler API URL" 4 | REACT_APP_GOOGLE_CLIENT_API_KEY="Google Console API" 5 | REACT_APP_BASE_URL="Frontend URL" 6 | REACT_APP_BACKEND_URL="Backend URL" -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /client/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14.18 2 | 3 | LABEL version="1.0" 4 | LABEL description="This is the base docker image for the codeSync frontend react app." 5 | LABEL maintainer = [ "work.vivekjaviya@gmail.com"] 6 | 7 | WORKDIR /usr/src/app/client 8 | 9 | COPY ["package.json", "package-lock.json", "./"] 10 | 11 | RUN npm install --production 12 | 13 | COPY . . 14 | 15 | EXPOSE 3000 16 | 17 | CMD ["npm", "start"] -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /client/craco.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | style: { 3 | postcss: { 4 | plugins: [ 5 | require('tailwindcss'), 6 | require('autoprefixer'), 7 | ], 8 | }, 9 | }, 10 | } -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "license": "MIT", 6 | "description": "CodeSync is cloud collaborative tool for student , Teachers and Professional to enjoy coding!", 7 | "keywords": [ 8 | "CodeSync", 9 | "Coding tool", 10 | "Cloud tool for coding", 11 | "Real time IDE", 12 | "Real time drawing board" 13 | ], 14 | "author": "Vivekkumar Javiya", 15 | "dependencies": { 16 | "@craco/craco": "^6.3.0", 17 | "@emotion/react": "^11.4.1", 18 | "@emotion/styled": "^11.3.0", 19 | "@fortawesome/fontawesome-free": "^5.15.4", 20 | "@headlessui/react": "^1.4.1", 21 | "@mui/icons-material": "^5.0.1", 22 | "@mui/material": "^5.0.1", 23 | "@testing-library/jest-dom": "^5.14.1", 24 | "@testing-library/react": "^11.2.7", 25 | "@testing-library/user-event": "^12.8.3", 26 | "ace-builds": "^1.4.12", 27 | "axios": "^0.21.4", 28 | "base-64": "^1.0.0", 29 | "cross-env": "^7.0.3", 30 | "dotenv": "^10.0.0", 31 | "draft-js": "^0.11.7", 32 | "history": "^5.0.1", 33 | "jwt-decode": "^3.1.2", 34 | "peerjs": "^1.3.2", 35 | "prop-types": "^15.7.2", 36 | "react": "^17.0.2", 37 | "react-ace": "^9.4.1", 38 | "react-activity": "^2.1.1", 39 | "react-avatar": "^3.10.0", 40 | "react-dom": "^17.0.2", 41 | "react-draft-wysiwyg": "^1.14.7", 42 | "react-ga": "^3.3.0", 43 | "react-google-login": "^5.2.2", 44 | "react-helmet": "^6.1.0", 45 | "react-icons": "^4.3.1", 46 | "react-iframe": "^1.8.0", 47 | "react-loader-advanced": "^1.7.1", 48 | "react-redux": "^7.2.5", 49 | "react-responsive": "^9.0.0-beta.5", 50 | "react-router": "^5.2.0", 51 | "react-router-dom": "^5.2.0", 52 | "react-router-redux": "^4.0.8", 53 | "react-scripts": "4.0.3", 54 | "react-split-pane": "^0.1.92", 55 | "react-toastify": "^8.0.3", 56 | "redux": "^4.1.1", 57 | "redux-devtools-extension": "^2.13.9", 58 | "redux-thunk": "^2.3.0", 59 | "socket.io-client": "^4.1.2", 60 | "universal-cookie": "^4.0.4", 61 | "uuid": "^8.3.2", 62 | "web-vitals": "^1.1.2" 63 | }, 64 | "scripts": { 65 | "start": "TAILWIND_MODE=watch craco start", 66 | "build": "craco build", 67 | "test": "craco test" 68 | }, 69 | "eslintConfig": { 70 | "extends": [ 71 | "react-app", 72 | "react-app/jest" 73 | ] 74 | }, 75 | "browserslist": { 76 | "production": [ 77 | ">0.2%", 78 | "not dead", 79 | "not op_mini all" 80 | ], 81 | "development": [ 82 | "last 1 chrome version", 83 | "last 1 firefox version", 84 | "last 1 safari version" 85 | ] 86 | }, 87 | "devDependencies": { 88 | "autoprefixer": "^9.8.8", 89 | "postcss": "^7.0.39", 90 | "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17" 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /client/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /client/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /client/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/apple-touch-icon.png -------------------------------------------------------------------------------- /client/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/favicon-16x16.png -------------------------------------------------------------------------------- /client/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/favicon-32x32.png -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/favicon.ico -------------------------------------------------------------------------------- /client/public/image/Logos/codesync-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Logos/codesync-01.png -------------------------------------------------------------------------------- /client/public/image/Logos/logo-01.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/public/image/Logos/logo-02.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/public/image/Logos/pattern-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Logos/pattern-01.png -------------------------------------------------------------------------------- /client/public/image/Logos/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Logos/sample.png -------------------------------------------------------------------------------- /client/public/image/Logos/xyz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Logos/xyz.png -------------------------------------------------------------------------------- /client/public/image/Logos/xyz2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Logos/xyz2.png -------------------------------------------------------------------------------- /client/public/image/Team/1637646334769.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Team/1637646334769.png -------------------------------------------------------------------------------- /client/public/image/Team/harsh.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Team/harsh.JPG -------------------------------------------------------------------------------- /client/public/image/Team/jayraj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Team/jayraj.jpg -------------------------------------------------------------------------------- /client/public/image/Team/vivek.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/Team/vivek.JPG -------------------------------------------------------------------------------- /client/public/image/codesynclogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/codesynclogo.png -------------------------------------------------------------------------------- /client/public/image/email-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/email-pattern.png -------------------------------------------------------------------------------- /client/public/image/eraser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/eraser.png -------------------------------------------------------------------------------- /client/public/image/icons/CodeSync-type-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Deeper/code-sync/34acd71637fee3f324ee75da64786c2f45614622/client/public/image/icons/CodeSync-type-logo.png -------------------------------------------------------------------------------- /client/public/image/icons/chat-22.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /client/public/image/icons/chat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /client/public/image/icons/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/public/image/icons/code-room.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /client/public/image/icons/coding.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/public/image/icons/compiler.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /client/public/image/icons/copy-svgrepo-com.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 17 | 20 | 23 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /client/public/image/icons/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /client/public/image/icons/download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /client/public/image/icons/drawing-svgrepo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | 38 | 39 | 40 | 41 | 42 | 45 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /client/public/image/icons/drawing.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /client/public/image/icons/input.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /client/public/image/icons/microphone-voice.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 19 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /client/public/image/icons/mute.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/public/image/icons/notes.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 18 | 20 | 22 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /client/public/image/icons/pensil.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /client/public/image/icons/send.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /client/public/image/icons/share.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /client/public/image/icons/text-editor-repo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | Code Sync 31 | 84 | 85 | 86 | 87 | 88 | 89 |
90 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /client/public/link_icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "favicon-16x16.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "favicon-32x32.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /client/public/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /client/src/API.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { BaseURL } from './BaseURL' 3 | const AXIOS = axios.create({ 4 | baseURL: BaseURL, 5 | withCredentials: true 6 | }); 7 | 8 | AXIOS.interceptors.request.use((req) => { 9 | if (localStorage.getItem('authUser')) { 10 | req.headers.Authorization = 'Bearer ' + JSON.parse(localStorage.getItem('authUser')).token; 11 | } 12 | return req; 13 | }) 14 | 15 | 16 | 17 | export default AXIOS; -------------------------------------------------------------------------------- /client/src/Action/UserAction.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { ADD_USER, REMOVE_USER, ADD_USER_ERROR, REMOVE_USER_ERROR, AUTHORIZATION} from '../Constant/UserConst' 3 | import axios from 'axios' 4 | import { push } from 'react-router-redux' 5 | import AXIOS from '../API' 6 | 7 | export const addUser = (data) => 8 | async dispatch => { 9 | try { 10 | dispatch({ 11 | type: ADD_USER, 12 | payload: data 13 | }) 14 | } catch (err) { 15 | dispatch({ 16 | type: ADD_USER_ERROR, 17 | payload: err 18 | }) 19 | } 20 | } 21 | 22 | export const removeUser = () => 23 | async dispatch => { 24 | try { 25 | dispatch({ 26 | type: REMOVE_USER, 27 | payload: {} 28 | }) 29 | } catch (err) { 30 | dispatch({ 31 | type: REMOVE_USER_ERROR, 32 | payload: {} 33 | }) 34 | } 35 | } 36 | 37 | export const loginUser = (formData, push) => 38 | async dispatch => { 39 | try { 40 | 41 | // const { data } = await AXIOS.post('/api/user/login', formData); 42 | // console.log(formData) 43 | dispatch({ 44 | type: AUTHORIZATION, 45 | payload: formData 46 | }) 47 | // history.push('/room') 48 | // console.log(push) 49 | // console.log("hererer") 50 | // push('/room') 51 | } catch (err) { 52 | console.log(err) 53 | push('/') 54 | } 55 | } 56 | 57 | export const registerUser = (data, history) => 58 | async dispatch => { 59 | try { 60 | dispatch({ 61 | type: AUTHORIZATION, 62 | payload: data 63 | }) 64 | history.push('/room') 65 | } catch (err) { 66 | console.log(err) 67 | history?.push('/') 68 | } 69 | } -------------------------------------------------------------------------------- /client/src/App.css: -------------------------------------------------------------------------------- 1 | /* .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } */ 39 | -------------------------------------------------------------------------------- /client/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { BrowserRouter as Router, Route, Redirect } from 'react-router-dom'; 3 | import { createBrowserHistory } from 'history'; 4 | 5 | import Room from './Components/Room/Room'; 6 | import HomePage from './Components/HomePage/HomePage'; 7 | import Editor from './Components/Editor/Editor'; 8 | import JoinRoom from './Components/Room/JoinRoom'; 9 | import CreateRoom from './Components/Room/CreateRoom'; 10 | import FrontPage from './Components/FrontPage/FrontPage'; 11 | import LoginPage from './Components/Auth/Login/LoginPage'; 12 | import ForgotPassword from './Components/Auth/ForgotPassword/ForgotPassword'; 13 | import ResetPassword from './Components/Auth/ResetPassword/ResetPassword'; 14 | import Register from './Components/Auth/Register/Register'; 15 | import Cookies from 'universal-cookie'; 16 | import ProtectedRoute from './Protected'; 17 | import Trial from './Components/trial/trial'; 18 | import ReactGA from 'react-ga'; 19 | import TeamPage from './Components/Team Page/TeamPage'; 20 | import NotFound from './Components/NotFound/NotFound'; 21 | import { Helmet } from 'react-helmet'; 22 | import { useMediaQuery } from 'react-responsive'; 23 | import Mobile from './Components/Mobile/Mobile'; 24 | const cookies = new Cookies(); 25 | const history = createBrowserHistory(); 26 | 27 | const isAuthenticated = JSON.parse(localStorage.getItem('authUser'))?.token; 28 | function App() { 29 | // useEffect(() => { 30 | // console.log({ authroot: isAuthenticated }); 31 | // }, [isAuthenticated]) 32 | useEffect(() => { 33 | ReactGA.initialize('UA-213485416-1'); 34 | ReactGA.pageview(window.location.pathname + window.location.search); 35 | }, []); 36 | 37 | const [loginUser, setLoginUser] = useState(null); 38 | const isDesktopOrLaptop = useMediaQuery({ 39 | query: '(min-width: 1224px)', 40 | }); 41 | const isBigScreen = useMediaQuery({ query: '(min-width: 1200px)' }); 42 | 43 | console.log({ isBigScreen }); 44 | 45 | return ( 46 | <> 47 | 48 | CodeSync 49 | 53 | 54 | {isBigScreen == true ? ( 55 | 56 | 57 | 58 | 59 | 60 | } 63 | exact 64 | /> 65 | 66 | 67 | 70 | isAuthenticated ? : 71 | } 72 | exact 73 | /> 74 | 75 | 78 | isAuthenticated ? ( 79 | 80 | ) : ( 81 | 82 | ) 83 | } 84 | exact 85 | /> 86 | 87 | } exact /> 88 | 89 | 90 | ) : ( 91 | 92 | )} 93 | 94 | ); 95 | } 96 | 97 | export default App; 98 | -------------------------------------------------------------------------------- /client/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /client/src/BaseURL.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | dotenv.config(); 3 | 4 | export const BaseURL = process.env.REACT_APP_BACKEND_URL -------------------------------------------------------------------------------- /client/src/Components/Auth/Login/LoginPage.css: -------------------------------------------------------------------------------- 1 | .login-container { 2 | margin-top: 18%; 3 | margin-left: 65%; 4 | text-align: center; 5 | width: 25%; 6 | height: 50% !important; 7 | } 8 | .submit-buttons { 9 | /* margin-left: ; */ 10 | width: 100%; 11 | margin-top: 5%; 12 | margin-left: 4%; 13 | } 14 | .google-button { 15 | margin-top: 2%; 16 | } 17 | 18 | .google-btn { 19 | background-color: rgba(99, 102, 241, 1) !important; 20 | color: #fff !important; 21 | width: 100% !important; 22 | margin: 0 auto !important; 23 | padding: 12px 0 !important; 24 | border-radius: 7px !important; 25 | max-width: 84% !important; 26 | } 27 | 28 | .google-btn:hover { 29 | background-color: rgba(67, 56, 202) !important; 30 | } 31 | -------------------------------------------------------------------------------- /client/src/Components/Auth/Register/Icon.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const icon = () => ( 4 | 5 | 9 | 10 | ); 11 | 12 | export default icon; -------------------------------------------------------------------------------- /client/src/Components/Editor/Editor.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import AceEditor from "react-ace"; 3 | import 'ace-builds/src-noconflict/mode-rust'; 4 | import 'ace-builds/src-noconflict/mode-kotlin'; 5 | import "ace-builds/src-noconflict/ext-language_tools"; 6 | import "ace-builds/src-noconflict/mode-java"; 7 | import "ace-builds/src-noconflict/mode-c_cpp"; 8 | import "ace-builds/src-noconflict/mode-python"; 9 | import "ace-builds/src-noconflict/mode-javascript"; 10 | import "ace-builds/src-noconflict/theme-github"; 11 | import "ace-builds/src-noconflict/theme-solarized_dark"; 12 | import "ace-builds/src-noconflict/theme-dracula"; 13 | import "ace-builds/src-noconflict/theme-monokai"; 14 | import 'ace-builds/src-noconflict/theme-eclipse'; 15 | import 'ace-builds/src-noconflict/theme-tomorrow_night'; 16 | import 'ace-builds/src-noconflict/theme-tomorrow_night_blue'; 17 | import 'ace-builds/src-noconflict/theme-xcode'; 18 | import 'ace-builds/src-noconflict/theme-ambiance'; 19 | import 'ace-builds/src-noconflict/theme-solarized_light'; 20 | function Editor({ language, theme, body, setBody, height, readOnly, width, fontSize }) { 21 | return ( 22 | setBody(value)} 26 | value={body} 27 | width={width} 28 | height={height ? height : "78.7vh"} 29 | readOnly={readOnly ? readOnly : false} 30 | fontSize={fontSize ? (isNaN(+fontSize) ? 12 : +fontSize) : 12} 31 | name="UNIQUE_ID_OF_DIV" 32 | showGutter={true} 33 | editorProps={{ $blockScrolling: true }} 34 | setOptions={{ 35 | enableBasicAutocompletion: true, 36 | enableLiveAutocompletion: true, 37 | enableSnippets: true, 38 | }} 39 | /> 40 | ); 41 | } 42 | 43 | export default Editor; 44 | -------------------------------------------------------------------------------- /client/src/Components/Error/NotFound.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function NotFound() { 4 | return ( 5 |
6 | 404 Error! 7 |
8 | ) 9 | } 10 | 11 | export default NotFound 12 | -------------------------------------------------------------------------------- /client/src/Components/FrontPage/FrontPage.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react' 2 | import { connect } from 'react-redux' 3 | import { Link } from 'react-router-dom' 4 | import Avatar from 'react-avatar'; 5 | import { useHistory } from 'react-router-dom' 6 | import { Transition } from "@headlessui/react"; 7 | import LandingPage from './LandingPage'; 8 | 9 | const submitHandler = (e) => { 10 | e.preventDefault() 11 | } 12 | function FrontPage(props) { 13 | const history = useHistory(props); 14 | useEffect(() => { 15 | 16 | const isAuthenticated = JSON.parse(localStorage.getItem('authUser'))?.token 17 | if (isAuthenticated) { 18 | history.push("/room"); 19 | // window.location.reload(); 20 | } 21 | }, []) 22 | 23 | const [isOpen, setIsOpen] = useState(false); 24 | 25 | 26 | return ( 27 |
28 | 179 | 180 |
181 | ) 182 | } 183 | 184 | 185 | 186 | const mapStateToProps = state => ({ 187 | authUser: state.user 188 | }) 189 | 190 | export default connect(mapStateToProps)(FrontPage) 191 | 192 | 193 | -------------------------------------------------------------------------------- /client/src/Components/FrontPage/Landing.css: -------------------------------------------------------------------------------- 1 | .home-div-con{ 2 | display: flex; 3 | justify-content: flex-start; 4 | height: 100%; 5 | align-items: center; 6 | 7 | 8 | 9 | } 10 | .home-child-1{ 11 | display: flex; 12 | width: 50%; 13 | justify-content: flex-start; 14 | align-items: center; 15 | 16 | } 17 | 18 | .home-child-2{ 19 | display: flex; 20 | width: 50%; 21 | justify-content: flex-start; 22 | align-items: center; 23 | 24 | } 25 | .con-home-l { 26 | padding-left: 15%; 27 | } 28 | .home-child-1 .con-home-l h1{ 29 | font-size: 57px; 30 | line-height: 70px; 31 | font-weight: 900; 32 | } 33 | .home-child-1 .con-home-l .home-cont-text{ 34 | font-size: 18px; 35 | /* color: gray; */ 36 | /* color: rgba(243, 244, 246); */ 37 | --tw-text-opacity: 1; 38 | color: rgba(107, 114, 128, var(--tw-text-opacity)); 39 | margin: 2% 0; 40 | line-height: 26px; 41 | } 42 | .bt-home-screen{ 43 | 44 | } -------------------------------------------------------------------------------- /client/src/Components/FrontPage/LandingPage.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Iframe from 'react-iframe' 3 | 4 | import './Landing.css' 5 | function LandingPage() { 6 | return ( 7 | <> 8 |
9 |
10 |
11 |
12 |
13 |

Start Writing Your
Best Code.

14 |
Crafting Your Code, Dry Run, Talk To Friends, Chat With Friend, Keep a notes of code & Many More!
15 | 16 |
17 |
18 | {/* rgba(243, 244, 246,1) */} 19 | {/*
20 |
21 |
22 |

Start Writing Your Best Code.

23 |
Crafting Your Code, Dry Run, Talk To Friends, Chat With Friend, Keep a notes of code & Many More!
24 |
25 | 26 | 27 | Explore Now 28 | 29 | 30 |
31 |
32 |
33 |
*/} 34 |
35 | 36 |
37 |
38 |
39 |
40 | {/*
41 |
42 |
43 |

Start Writing Your Best Code.

44 |
Crafting Your Code, Dry Run, Talk To Friends, Chat With Friend, Keep a notes of code & Many More!
45 |
46 | 47 | 48 | Explore Now 49 | 50 | 51 |
52 |
53 |
54 |
*/} 55 | 56 |
57 |
58 |

Our Features

59 |

Check out our list of awesome features below.

60 |
61 |
62 |
63 | 64 |
65 |

Code Editors

66 |

Flexible and draggable code editors with multiple themes, Auto Suggest.

67 |
68 | 69 |
70 |
71 | 72 |
73 |

Voice Chat

74 |

Voice chat between the room that help room member to keep them engaged.

75 |
76 |
77 |
78 | 79 |
80 |

White Board

81 |

White Board for visualizing and showcasing your thought to members.

82 |
83 |
84 |
85 | 86 |
87 |

Compiler

88 |

Compiler your code which written on code editor with input.

89 |
90 |
91 |
92 | 93 |
94 |

Note Book

95 |

To keep write-down your thought and share among room member.

96 |
97 |
98 |
99 | 100 |
101 |

Chat App

102 |

Stay Updated with friends by writing piece of message :)

103 |
104 |
105 |
106 |
107 |
108 |