Giter Site home page Giter Site logo

piyushn28 / code-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sahilatahar/code-sync

0.0 0.0 0.0 1.39 MB

Code Sync offers a real-time collaborative code editor featuring unique room generation, syntax highlighting, and auto-suggestions. Users can seamlessly edit, save, and download files while communicating through group chat

Home Page: https://code-sync-live.vercel.app/

License: MIT License

JavaScript 95.04% CSS 1.84% HTML 3.12%

code-sync's Introduction

Code Sync - A Realtime Code Editor

screenshot

Code Sync is a collaborative, real-time code editor where users can seamlessly code together. It provides a platform for multiple users to enter a room, share a unique room ID, and collaborate on code simultaneously.

GitHub contributors GitHub Repo stars GitHub issues GitHub pull requests GitHub License Visitors

๐Ÿ”ฎ Features

  • ๐Ÿ’ป Real-time collaboration on code editing across multiple files
  • ๐Ÿš€ Unique room generation with room ID for collaboration
  • ๐ŸŒˆ Syntax highlighting for various file types with auto-language detection
  • ๐Ÿ’ก Auto suggestion based on programming language
  • โฑ๏ธ Instant updates and synchronization of code changes across all files
  • ๐Ÿ“ฃ Notifications for user join and leave events
  • ๐ŸŽจ Multiple themes for personalized coding experience
  • ๐ŸŒ Comprehensive language support for versatile programming
  • ๐Ÿ”  Option to change font size and font family
  • ๐Ÿ‘ฅ User presence list of users currently in the collaboration session, including online/offline status indicators
  • ๐Ÿ“ Open, edit, save, and delete file functionalities
  • ๐Ÿ’พ Option to download files edited within the collaboration session
  • ๐Ÿ’ฌ Group chatting allows users to communicate in real-time while working on code.

๐Ÿš€ Live Preview

You can view the live preview of the project here.

๐Ÿ’ป Tech Stack

JavaScript React React Router Tailwind CSS NodeJS ExpressJS Git GitHub

๐Ÿ–ฅ๏ธ Frontend

  • React JS: A JavaScript library for building user interfaces, facilitating the creation of dynamic and efficient web applications.
  • React Router: Enables navigation and routing in React applications, managing the UI based on the URL.
  • Tailwind CSS: A utility-first CSS framework that streamlines the styling process with pre-defined classes.
  • Vite: A build tool for modern web development, providing faster development and better performance.
  • PropTypes: Runtime type checking for React props, helping to catch bugs early in development.
  • UUID: Generates unique identifiers, useful for key assignments in databases or component instances.
  • Socket.io-client: Implements real-time communication between the client and server using WebSockets.
  • React-hot-toast: A React library for creating customizable and responsive toast notifications.
  • React-avatar: Simplifies the display of avatars or profile pictures in React applications.
  • @uiw/react-codemirror: A versatile text editor implemented in React, providing an embeddable code editor for web applications.
  • @uiw/codemirror-extensions: Extensions for CodeMirror, enhancing the editor with additional features and capabilities.
  • React Icons: A collection of popular icons for React projects, providing easy integration of icons into the user interface.
  • JSZIP: A JavaScript library for creating, reading, and editing .zip files, useful for downloading multiple files as a single .zip file.

๐ŸŒ Backend

  • Node.js: A server-side JavaScript runtime, allowing the execution of JavaScript code outside the browser.
  • Express: A web application framework for Node.js, simplifying the creation of robust and scalable APIs.
  • Socket.io: Facilitates real-time bidirectional communication between clients and servers using WebSockets.
  • Dotenv: Loads environment variables from a .env file, enhancing the configuration of Node.js applications.
  • CORS: Stands for Cross-Origin Resource Sharing, a mechanism that permits or restricts web page access to resources on another domain.

๐Ÿ“‚ Folder Structure

client/
โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ style.css // Tailwind output
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ assets/
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ chat/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ChatInput.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ChatPanel.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ common/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Clients.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Footer.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Select.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ editor/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Editor.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ EditorComponent.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ files/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ FileEditor.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ FileSystem.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ forms/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ FormComponent.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ loading/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Loading.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ sidebar/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Sidebar.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ tabs/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ FileTab.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ SettingsTab.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ UsersTab.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ TabButton.jsx
โ”‚   โ”‚   โ””โ”€โ”€ toast/
โ”‚   โ”‚       โ””โ”€โ”€ Toast.jsx
โ”‚   โ”œโ”€โ”€ context/
โ”‚   โ”‚   โ”œโ”€โ”€ AppContext.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ AppProvider.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ChatContext.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ FileContext.jsx
โ”‚   โ”‚   โ””โ”€โ”€ TabContext.jsx
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ useChatRoom.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ useFileSystem.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ useLocalStorage.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ usePageEvents.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ useSocket.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ useUserActivity.jsx
โ”‚   โ”‚   โ””โ”€โ”€ useWindowDimensions.jsx
โ”‚   โ”œโ”€โ”€ layouts/
โ”‚   โ”‚   โ””โ”€โ”€ EditorLayout.jsx
โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”œโ”€โ”€ EditorPage.jsx
โ”‚   โ”‚   โ””โ”€โ”€ HomePage.jsx
โ”‚   โ”œโ”€โ”€ resources/
โ”‚   โ”‚   โ”œโ”€โ”€ Font.js
โ”‚   โ”‚   โ”œโ”€โ”€ Languages.js
โ”‚   โ”‚   โ””โ”€โ”€ Themes.js
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ””โ”€โ”€ socket.js
โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ”œโ”€โ”€ actions.js
โ”‚   โ”‚   โ”œโ”€โ”€ editorPlaceholder.js
โ”‚   โ”‚   โ”œโ”€โ”€ formateDate.js
โ”‚   โ”‚   โ”œโ”€โ”€ initialFile.js
โ”‚   โ”‚   โ””โ”€โ”€ tabs.js
โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ”œโ”€โ”€ index.css
โ”‚   โ””โ”€โ”€ main.jsx
โ”œโ”€โ”€ .env
โ”œโ”€โ”€ .eslintrc.cjs
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tailwind.config.js
โ””โ”€โ”€ vite.config.js

server/
โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ actions.js
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ server.js

screenshots/
CONTRIBUTING.md
LICENSE
README.md

โš™๏ธ Installation

  1. Clone the repository:

    git clone https://github.com/sahilatahar/Code-Sync.git
  2. Set .env file: Inside the client and server directory, create or edit the .env file and add the following line:
    Frontend:

    VITE_BACKEND_URL=<your_server_url>

    Backend:

    PORT=3000
  3. Install dependencies: Navigate to the frontend and backend directories separately and run:

     npm install
  4. Start the frontend and backend servers:
    Frontend:

    cd client
    npm run dev

    Backend:

    cd server
    npm run dev
  5. Access the application: Open a browser and enter the following URL:

    http://localhost:5173/

๐Ÿ”ฎ Features for next release

  • Admin Permission: Implement an admin permission system to manage user access levels and control over certain platform features.
  • Search and Replace: Implement a search and replace functionality for efficient code navigation.

๐Ÿค Contribute

We welcome contributions to make Code Sync even better! Whether you're reporting a bug, suggesting a new feature, or fixing a typo, your input is valuable to us. Follow the contribution guidelines to get started.

๐Ÿงพ License

This project is licensed under the MIT License.

โœ๏ธ About Developer

  • Sahil Atahar (Aspiring Full Stack Developer)
    GitHub LinkedIn-social

code-sync's People

Contributors

sahilatahar avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.