Skip to content

venkateshtagulla/CodeSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeSync: Real-time Collaborative Code Editor πŸ§‘β€πŸ’»

CodeSync is a real-time collaborative code editor designed for developers to work together on projects seamlessly. With a modern, intuitive interface, it offers features like live code editing, multi-file support, and integrated chat. The application is built with the MERN stack, leveraging Socket.IO for real-time communication and Render for hosting.

Live Project


✨ Features

Core Functionality

  • Real-time Collaboration: Synchronized code editing for all users in a room.
  • Multi-file Support: Create, delete, and switch between multiple code files within a single room.
  • Integrated Chat: Real-time room chat with history persistence.
  • Online User Presence: See who's currently in your room.
  • Code Execution: Run your code instantly in Node.js, Python, Java, C, and C++ through the JDoodle API.
  • Secure Authentication: Email/password authentication using JSON Web Tokens (JWT).

Architecture & Design

  • Scalable Real-time Engine: Designed to handle 1k+ concurrent users with a scalable Socket.IO architecture.
  • Persistence: Code and chat history are saved in MongoDB Atlas for reliability.
  • Modular Backend: Clear separation of concerns with dedicated controllers and services.
  • Cost-effective Hosting: Deployed on Render to ensure a low-cost, scalable solution.

πŸ›  Tech Stack

Frontend

  • React 18: Frontend UI library.
  • Monaco Editor: The powerful code editor component.
  • Socket.IO-Client: For real-time WebSocket communication.
  • Axios: HTTP client for API requests.
  • React Router v6: For client-side routing.
  • React-Bootstrap: Responsive UI components.

Backend

  • Node.js & Express.js: Backend web server.
  • Socket.IO: Real-time engine for event-driven communication.
  • Mongoose: MongoDB object modeling.
  • bcryptjs: Password hashing.
  • jsonwebtoken: For JWT authentication.
  • cors: To manage Cross-Origin Resource Sharing.

Database

  • MongoDB Atlas: A cloud-hosted NoSQL database service.

External APIs

  • JDoodle: For multi-language code execution.

Deployment

  • Render: Cloud platform for hosting the backend and frontend.

πŸ“ Project Structure

codesync/
β”œβ”€β”€ client/                      # React Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ CodeEditor.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Chat.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FileTabs.jsx
β”‚   β”‚   β”‚   └── OnlineUsers.jsx
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthContext.js
β”‚   β”‚   β”‚   └── SocketContext.js
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Room.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”‚   └── Signup.jsx
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── api.js
β”‚   β”‚   └── App.jsx
β”œβ”€β”€ server/                      # Node.js Backend
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ User.js
β”‚   β”‚   β”œβ”€β”€ Room.js
β”‚   β”‚   └── Chat.js
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   └── rooms.js
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ authController.js
β”‚   β”‚   β”œβ”€β”€ roomController.js
β”‚   β”‚   └── jDoodleService.js
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── auth.js
β”‚   └── index.js                 # Main server entry point
β”œβ”€β”€ package.json
└── README.md

About

CodeSync is a real-time collaborative code editor built with the MERN stack and Socket.IO. It allows developers to work together seamlessly with features like live code editing, multi-file support, integrated chat, online presence tracking, and multi-language code execution through JDoodle. The app is scalable, secure, and deployed on Render .

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors