https://github.com/mrmuhammadhussain/real-time-code-editor
https://github.com/mrmuhammadhussain/real-time-code-editor
avvvatars codemirror codemirror-editor deployed expressjs railway-app reactjs realtime server socket-io synchronized
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrmuhammadhussain/real-time-code-editor
- Owner: MrMuhammadHussain
- Created: 2025-07-01T06:16:02.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-15T18:26:00.000Z (3 months ago)
- Last Synced: 2025-07-16T16:03:30.454Z (3 months ago)
- Topics: avvvatars, codemirror, codemirror-editor, deployed, expressjs, railway-app, reactjs, realtime, server, socket-io, synchronized
- Language: JavaScript
- Homepage: https://realtime-codeeditor.up.railway.app/
- Size: 366 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π§βπ» Real-Time Collaborative JavaScripts Code Editor
A real-time collaborative code editor built with **React**, **Socket.IO**, **Node.js**, and **Express**. Users can write and run JavaScript code together, see who is typing, get code output in real-time, and even receive AI code suggestions.
---
## π Features
* π§βπ₯ Real-time collaboration
* β¨ See who is typing
* π§ AI-based code suggestion (free, no API key needed)//Temporary Disable or under Development
* π Instant code sync
* π» Terminal-style code output
* π₯ Show connected users
* π Copy Room ID & share with others
* β‘ Smooth UI with CodeMirror
* π¨βπ» Instant code output for all users real-time
* β¨οΈ Press "Ctrl+Space" together to get hints
* β¨οΈ Press "Shift+Enter" together to Run Code
* π₯ All connected users notified when someone Join or Leave the Room---
## πΌοΈ Preview

---
## π οΈ Technologies Used
* React
* CodeMirror
* Node.js
* Express
* Socket.IO
* Railway (for deployment)---
## π Project Structure
```bash
πΊοΈ real-time-code-editor/ # React frontend
β βββ public/...
β βββ src/...
πΊοΈ server.mjs # Express backend
πΊοΈ package.json
πΊοΈ README.md
```---
## π§ Setup Instructions
### 1. Clone the Repository
```bash
git clone https://github.com/your-username/real-time-code-editor.git
cd real-time-code-editor
```### 2. Install Dependencies
```bash
npm install
```Or if using Yarn:
```bash
yarn
yarn add
```### 3. Set Environment Variable
Create a `.env` file at root Folder:
```env
REACT_APP_BACKEND_URL="http://localhost:5080/"
```### 4. Run the App (Development)
```bash
# For frontendnpm run fornt
# For backend
npm run server:dev
```---
## π Live App
π [https://realtime-codeeditor.up.railway.app/](https://realtime-codeeditor.up.railway.app/)
---
## β οΈ Known Issues
* `eval()` is used to run code (JavaScript only). Avoid running unsafe code.
* React 19+ may conflict with some libraries like `react-avatar`. Use alternatives like `avvvatars-react`.
* π₯οΈ It's compatible with desktop
* π± to use in mobile rotate the phone or use desktop site version---
## π Credits
This project was made by **\[Me]** based on a tutorial, with additional features added manually (AI suggestions, typing status, code output, how many users are connected, code hints, etc.).
---
## π License
This project is open-source and available under the MIT License
---