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.
- ๐ป 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.
You can view the live preview of the project here.
- 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.
- 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.
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
-
Clone the repository:
git clone https://github.com/sahilatahar/Code-Sync.git
-
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
-
Install dependencies: Navigate to the frontend and backend directories separately and run:
npm install
-
Start the frontend and backend servers:
Frontend:cd client npm run dev
Backend:
cd server npm run dev
-
Access the application: Open a browser and enter the following URL:
http://localhost:5173/
- 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.
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.
This project is licensed under the MIT License.