An interactive, real-time collaborative code editor for building decision trees with HTML, CSS, and JavaScript. Features live collaboration similar to Google Docs with Kahoot-style room codes!
- Multi-tab Editor: Separate tabs for HTML, CSS, and JavaScript
- Live Preview: Instant preview of your decision tree
- Syntax Highlighting: Visual feedback for code errors
- Smart Autocomplete: Context-aware code completion
- Emoji Support: Type
:emoji_name:to insert emojis (e.g.,:fire:π₯) - Auto-save: Automatic saving to local storage
- Import/Export: Save and load your projects
The standout feature of this editor is real-time collaboration:
- Room Creation: Generate a unique 6-character room code (like Kahoot!)
- Easy Joining: Others can join using the room code
- Live Sync: All code changes sync in real-time across all participants
- Participant List: See everyone currently editing (like Google Docs)
- Color-coded Users: Each participant gets a unique color indicator
- Instant Notifications: Get notified when people join or leave
- Persistent Sessions: Room state is maintained as long as someone is connected
- Node.js >= 14.0.0
- npm or yarn
-
Clone the repository
git clone <your-repo-url> cd EditorETHS
-
Install dependencies
npm install
-
Start the server
npm start
-
Open your browser Navigate to
http://localhost:3000
For development with auto-restart on file changes:
npm run dev- Click the π₯ Collaborate button in the header
- Click OK when asked if you want to create a new room
- Enter your name
- You'll receive a unique 6-character room code
- Share this code with your collaborators!
- Click the π₯ Collaborate button in the header
- Click Cancel when asked if you want to create a new room
- Enter the room code shared with you
- Enter your name
- You're in! You'll see all other participants in the panel
- Room Code Display: The active room code is prominently displayed in the top-right
- Copy to Clipboard: Click the π button to copy the room code
- Participants Panel: See all active collaborators with their colored indicators
- Real-time Updates: Code changes sync instantly across all participants
- Leave Session: Click the π΄ Leave button to exit the collaboration
You can also share a direct join link:
http://your-domain.com/?room=ROOMCODE
Replace ROOMCODE with your actual room code. When someone opens this link, they'll be prompted to enter their name and will join automatically.
EditorETHS/
βββ index.html # Main application (frontend + UI)
βββ server.js # Node.js server with Socket.IO
βββ package.json # Dependencies and scripts
βββ render.yaml # Render deployment configuration
βββ .gitignore # Git ignore rules
βββ README.md # This file
This application is configured for easy deployment on Render.
-
Push to GitHub
git add . git commit -m "Initial commit" git push origin main
-
Create a Render Account
- Go to render.com and sign up
-
Deploy from Repository
- Click "New +" β "Web Service"
- Connect your GitHub repository
- Render will automatically detect the
render.yamlfile - Click "Create Web Service"
-
Access Your App
- Once deployed, Render will provide a URL like
https://your-app.onrender.com - Share this URL with your users!
- Once deployed, Render will provide a URL like
If not using render.yaml:
- Build Command:
npm install - Start Command:
npm start - Environment: Node
- Plan: Free (or upgrade as needed)
The application works with default settings, but you can customize:
PORT: Server port (default: 3000, Render auto-assigns)NODE_ENV: Set toproductionfor production builds
- Express.js: Web server framework
- Socket.IO: WebSocket library for real-time communication
- Room Management: In-memory storage of active rooms and participants
- Auto-cleanup: Rooms are automatically cleaned up 1 hour after being empty
- Pure JavaScript: No frameworks, vanilla JS for maximum compatibility
- Socket.IO Client: Real-time bidirectional communication
- Local Storage: Project persistence
- Responsive Design: Works on desktop and tablet
The collaboration uses Socket.IO events:
create-room: Create a new collaboration roomjoin-room: Join an existing roomcode-change: Broadcast code changescursor-move: Share cursor positionsparticipant-joined: New participant notificationparticipant-left: Participant departure notification
- β Chrome (recommended)
- β Firefox
- β Safari
- β Edge
β οΈ IE11 (limited support)
If port 3000 is in use:
PORT=3001 npm start- Check if the server is running
- Verify firewall settings
- Ensure WebSocket connections are allowed
- Room codes are case-insensitive but must be exact
- Rooms expire after 1 hour of being empty
- Try creating a new room
- Check your internet connection
- Verify you're in the same room (check the room code)
- Try refreshing the page and rejoining
If you see errors in the console like:
grm ERROR [iterable] Not supported: in app messages from Iterable
This is NOT a bug in the application! These errors come from browser extensions (Grammarly, Iterable, email tools, etc.) and can be safely ignored. They do not affect the collaboration functionality.
To eliminate these errors:
- Test in Incognito/Private mode (extensions are usually disabled)
- Temporarily disable browser extensions
- Or simply ignore them - they won't affect your experience
The codebase is organized into clear sections:
- HTML Structure (line ~730): Header, menus, panels
- CSS Styles (line ~7): All styling
- Core Editor Logic (line ~880): Code editing functionality
- Collaboration System (line ~2920): Real-time collaboration
To test collaboration locally:
- Start the server
- Open two browser windows
- In the first, create a room
- In the second, join using the room code
- Make changes in either window and see them sync!
- Lightweight: ~3MB total including all assets
- Fast Sync: Sub-100ms latency for local networks
- Scalable: Handles multiple concurrent rooms
- Efficient: Uses WebSocket for minimal overhead
- Rooms use random 6-character codes (36^6 = 2+ billion combinations)
- No authentication required (designed for educational use)
- Code is not persisted server-side (privacy by design)
- For production use, consider adding authentication
Potential features to add:
- Cursor position indicators (Google Docs style)
- Chat functionality
- Voice chat integration
- Project templates library
- Code history/undo across sessions
- Room passwords for private sessions
- Persistent rooms with database storage
- User authentication (OAuth, etc.)
Contributions are welcome! Please feel free to submit a Pull Request.
For issues or questions:
- Open an issue on GitHub
- Check existing issues for solutions
- Review the troubleshooting section above
MIT License - feel free to use this project for educational purposes.
Built for ETHS (Evanston Township High School) educational purposes.
Made with β€οΈ for collaborative learning
Start collaborating now by clicking the π₯ Collaborate button!