{"id":30068443,"url":"https://github.com/depapp/codesync","last_synced_at":"2025-08-08T10:11:14.571Z","repository":{"id":307036981,"uuid":"1028083433","full_name":"depapp/codesync","owner":"depapp","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-29T04:04:47.000Z","size":193,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-29T05:38:27.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codesync-murex.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/depapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-29T02:33:43.000Z","updated_at":"2025-07-29T04:05:27.000Z","dependencies_parsed_at":"2025-07-29T05:38:28.693Z","dependency_job_id":"873f96ef-6c69-48ee-9665-1119608a9e6b","html_url":"https://github.com/depapp/codesync","commit_stats":null,"previous_names":["depapp/codesync"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/depapp/codesync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depapp%2Fcodesync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depapp%2Fcodesync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depapp%2Fcodesync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depapp%2Fcodesync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/depapp","download_url":"https://codeload.github.com/depapp/codesync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/depapp%2Fcodesync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269403564,"owners_count":24411228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-08T10:11:10.586Z","updated_at":"2025-08-08T10:11:14.545Z","avatar_url":"https://github.com/depapp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeSync - Real-time Collaborative Code Editor\n\n## ✨ Features\n\n### Real-time Collaboration\n- **Instant Synchronization**: Changes appear in real-time across all connected users\n- **User Presence**: See who's online and their cursor positions\n- **Conflict Resolution**: Smart handling of concurrent edits\n- **Visual Indicators**: Color-coded user cursors and selections\n\n### Advanced Code Editor\n- **Monaco Editor**: Full-featured code editor with syntax highlighting\n- **Code Execution**: Run JavaScript code directly in the browser\n- **Theme Support**: Light and dark themes\n\n### Communication \u0026 Collaboration\n- **Real-time Chat**: Integrated chat system for team communication\n- **User Management**: Join with custom names and colors\n- **Document Sharing**: Share documents via URL\n- **Session Persistence**: Documents persist across sessions\n\n### Modern UI/UX\n- **Responsive Design**: Works on desktop and mobile devices\n- **Intuitive Interface**: Clean, professional design\n- **Accessibility**: ARIA labels and keyboard navigation\n- **Performance**: Optimized for smooth real-time updates\n\n## 🏗️ Architecture\n\n### Redis as the Core Platform\n\nThis application showcases Redis in multiple roles:\n\n1. **Real-time Pub/Sub**: Powers instant collaboration using Redis pub/sub channels\n2. **Data Storage**: Documents and user sessions stored in Redis\n3. **Session Management**: User presence and state management\n4. **Message Queuing**: Chat messages and system events\n5. **Caching**: Performance optimization for frequently accessed data\n\n### Technology Stack\n\n**Backend:**\n- Node.js with Express\n- Socket.IO for WebSocket connections\n- Redis for data storage and pub/sub\n- VM2 for secure code execution\n\n**Frontend:**\n- React with modern hooks\n- Monaco Editor (VS Code editor)\n- Tailwind CSS for styling\n- Socket.IO client for real-time communication\n\n## 🛠️ Installation \u0026 Setup\n\n### Prerequisites\n- Node.js (v16 or higher)\n- Redis instance (local or cloud)\n- npm or yarn\n\n### Environment Setup\n\n1. **Clone the repository:**\n```bash\ngit clone \u003crepository-url\u003e\ncd beyond-the-cache\n```\n\n2. **Install dependencies:**\n```bash\n# Backend dependencies\ncd backend\nnpm install\n\n# Frontend dependencies\ncd ../frontend\nnpm install\n```\n\n3. **Configure Redis connection:**\nCreate a `.env` file in the backend directory:\n```env\nREDIS_USERNAME=your_redis_username\nREDIS_PASSWORD=your_redis_password\nREDIS_HOST=your_redis_host\nREDIS_PORT=your_redis_port\nPORT=5002\n```\n\n### Running the Application\n\n1. **Start the backend server:**\n```bash\ncd backend\nnpm start\n```\n\n2. **Start the frontend development server:**\n```bash\ncd frontend\nnpm start\n```\n\n3. **Open your browser:**\nNavigate to `http://localhost:3000`\n\n## 🔧 Key Redis Operations\n\n### Document Synchronization\n```javascript\n// Publishing document changes\nawait redis.publish(`doc:${documentId}:changes`, JSON.stringify({\n  userId,\n  content,\n  timestamp,\n  operation\n}));\n\n// Storing document state\nawait redis.hset(`doc:${documentId}`, {\n  content: JSON.stringify(content),\n  lastModified: Date.now(),\n  version: version + 1\n});\n```\n\n### User Presence Management\n```javascript\n// Track active users\nawait redis.sadd(`doc:${documentId}:users`, userId);\nawait redis.expire(`doc:${documentId}:users`, 3600);\n\n// Store user information\nawait redis.hset(`user:${userId}`, {\n  name: user.name,\n  color: user.color,\n  lastSeen: Date.now()\n});\n```\n\n### Real-time Chat\n```javascript\n// Publish chat messages\nawait redis.publish(`doc:${documentId}:chat`, JSON.stringify({\n  userId,\n  message,\n  timestamp\n}));\n\n// Store chat history\nawait redis.lpush(`doc:${documentId}:messages`, JSON.stringify(message));\nawait redis.ltrim(`doc:${documentId}:messages`, 0, 100); // Keep last 100 messages\n```\n\n## 🚀 Deployment\n\n### Production Considerations\n\n1. **Redis Configuration:**\n   - Enable persistence (RDB + AOF)\n   - Configure appropriate memory policies\n   - Set up Redis clustering for high availability\n\n2. **Security:**\n   - Use Redis AUTH and TLS\n   - Implement rate limiting\n   - Sanitize user inputs\n\n3. **Scaling:**\n   - Use Redis Cluster for horizontal scaling\n   - Implement load balancing for multiple app instances\n   - Consider Redis Streams for more complex event processing\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details\n\n---\n\n**Built with ❤️ and Redis**\n\n*Showcasing Redis as the ultimate multi-model platform for modern applications*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdepapp%2Fcodesync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdepapp%2Fcodesync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdepapp%2Fcodesync/lists"}