The Ultimate Real-Time Collaborative Coding Platform
Code together, talk together. CodeFlow brings your team closer with a shared code editor and built-in voice chat, no matter where you are.
🎨 Real-Time Code Editor Collaborate seamlessly with Monaco Editor integration, syntax highlighting, and live code synchronization |
🎙️ Voice Chat Integration Crystal-clear voice communication with WebRTC, audio messages, and noise cancellation |
🤖 AI Code Assistant Intelligent suggestions, automated reviews, and smart refactoring recommendations |
- 🔄 Real-Time Collaboration: Multiple developers can edit code simultaneously with instant synchronization
- 🎯 Multi-Language Support: JavaScript, TypeScript, Python, C++, and more
- 💬 Live Chat: Text and voice messages with message history
- 📱 Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- 🌙 Dark/Light Mode: Toggle between beautiful dark and light themes
- ⚡ Code Execution: Run code directly in the browser with instant output
- 🏠 Room Management: Create and join coding rooms with unique IDs
- 👥 User Presence: See who's online and track participant activity
- 🔐 Secure Connections: All communications are encrypted and secure
- Node.js (v16 or higher)
- npm or yarn
- Modern web browser with WebRTC support
-
Clone the repository
git clone https://github.com/muhammadyaqoobmuet/code-flow cd codeflow
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.env
and add your configuration:VITE_REACT_APP_BACKEND_URL=http://localhost:3000
-
Start the development servers
Frontend (Terminal 1):
npm run dev
Backend (Terminal 2):
npm run server
-
Open your browser
Navigate to
http://localhost:5173
and start coding together! 🎉
codeflow/
├── 📁 public/ # Static assets
│ ├── image.png # App logo and images
│ └── vite.svg
├── 📁 src/ # Source code
│ ├── 📁 components/ # Reusable UI components
│ │ ├── 📁 ui/ # Base UI components (buttons, cards, etc.)
│ │ └── background-gradient-animation.jsx
│ ├── 📁 lib/ # Utility functions
│ │ └── utils.js # Class name utilities
│ ├── 📁 pages/ # Application pages
│ │ ├── 📁 CreateRoom/ # Room creation page
│ │ ├── 📁 Home/ # Landing page
│ │ ├── 📁 JoinRoom/ # Room joining page
│ │ └── 📁 Room/ # Main collaboration room
│ │ ├── 📁 components/ # Room-specific components
│ │ │ ├── ChatComponent.jsx
│ │ │ ├── SharedCodeEditor.jsx
│ │ │ ├── CollabPanel.jsx
│ │ │ └── Header.jsx
│ │ └── page.jsx # Room main component
│ ├── App.jsx # Main app component
│ ├── main.jsx # App entry point
│ ├── socket.js # Socket.io client configuration
│ └── index.css # Global styles
├── 📄 server.js # Express + Socket.io server
├── 📄 actions.js # Socket event constants
├── 📄 servers.js # WebRTC configuration
├── 📄 package.json # Dependencies and scripts
├── 📄 tailwind.config.js # Tailwind CSS configuration
├── 📄 vite.config.js # Vite configuration
└── 📄 README.md # You are here!
- Click "Create a Room" on the homepage
- Enter your username
- A unique room ID will be generated automatically
- Share the room ID with your collaborators
- Start coding together!
- Click "Join a Room" on the homepage
- Enter your username and the room ID
- Join the collaborative session instantly
- 🎙️ Start Voice Call: Click the phone icon in the chat panel
- 🔇 Mute/Unmute: Toggle microphone during calls
- 📢 Voice Messages: Record and send voice messages
- 🔊 Audio Playback: Play received voice messages
Create a .env
file in the root directory:
# Backend URL
VITE_REACT_APP_BACKEND_URL=http://localhost:3000
# Optional: Judge0 API for code execution
RAPIDAPI_KEY=your_rapidapi_key_here
The project uses Tailwind CSS v4 with custom configurations:
// tailwind.config.js
export default {
darkMode: ["class"],
content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {
colors: {
primary: "#8D84B2",
secondary: "#7D84B2",
// ... custom color palette
},
},
},
};
Event | Description | Payload |
---|---|---|
JOIN |
Join a room | { roomId, username } |
SYNC_CODE |
Synchronize code | { roomId, code } |
MESSAGE_SEND |
Send chat message | { roomId, message, username } |
VOICE_CALL_OFFER |
Start voice call | { roomId, offer, username } |
VOICE_CALL_ANSWER |
Answer voice call | { roomId, answer } |
Currently, the application uses WebSocket connections for all real-time features. REST API endpoints may be added in future versions.
We love contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run tests
npm test
- Commit your changes
git commit -m 'Add amazing feature'
- Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the existing code style
- Write clear commit messages
- Add tests for new features
- Update documentation as needed
- Be respectful and inclusive
🔧 Socket connection fails
Problem: Cannot connect to the server
Solution:
- Ensure the backend server is running on port 3000
- Check your firewall settings
- Verify the
VITE_REACT_APP_BACKEND_URL
environment variable
🎙️ Voice chat not working
Problem: Cannot hear other participants
Solution:
- Check browser permissions for microphone access
- Ensure you're using HTTPS in production
- Verify WebRTC support in your browser
💻 Code not syncing
Problem: Changes not appearing for other users
Solution:
- Check network connectivity
- Refresh the page and rejoin the room
- Ensure you're in the same room ID
- File System Integration: Upload and manage project files
- Git Integration: Version control with commit history
- Advanced AI Features: Code completion and bug detection
- Screen Sharing: Share your screen with collaborators
- Whiteboard: Visual collaboration tools
- Mobile App: Native iOS and Android apps
- Docker Support: Containerized development environments
- Plugin System: Extensible architecture
- Team Management: User roles and permissions
- Analytics Dashboard: Usage metrics and insights
- Themes Marketplace: Custom UI themes
This project is licensed under the MIT License - see the LICENSE file for details.
![]() Muhammad Yaqoob 💻 |
- Monaco Editor for the amazing code editor experience
- Socket.io for real-time communication
- Tailwind CSS for the beautiful UI components
- Framer Motion for smooth animations
- Lucide Icons for the beautiful icon set
- WebRTC for peer-to-peer communication
If you found this project helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs
- 💡 Suggesting new features
- 🤝 Contributing to the codebase
- 📢 Sharing with your friends and colleagues