{"id":50294756,"url":"https://github.com/chrisrobison/crchat","last_synced_at":"2026-05-28T08:04:02.922Z","repository":{"id":269615831,"uuid":"907998246","full_name":"chrisrobison/crchat","owner":"chrisrobison","description":"A simple, real-time group chat server that uses websockets and webworkers to keep everything in sync","archived":false,"fork":false,"pushed_at":"2025-01-22T22:06:21.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T23:19:13.390Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisrobison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-12-24T20:27:40.000Z","updated_at":"2025-01-22T22:06:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"123b78a7-1a96-4fda-9ba5-fdc06e76e1b4","html_url":"https://github.com/chrisrobison/crchat","commit_stats":null,"previous_names":["chrisrobison/crchat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chrisrobison/crchat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fcrchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fcrchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fcrchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fcrchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisrobison","download_url":"https://codeload.github.com/chrisrobison/crchat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fcrchat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33599495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":"2026-05-28T08:04:00.158Z","updated_at":"2026-05-28T08:04:02.914Z","avatar_url":"https://github.com/chrisrobison.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 CR Chat: Real-time WebSocket Chat\n\nA modern, secure WebSocket and WebWorker based chat application with support for rich media sharing, user profiles, and real-time updates.\n\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![Node](https://img.shields.io/badge/node-%3E%3D%2016.0.0-brightgreen)\n![WebSocket](https://img.shields.io/badge/WebSocket-Enabled-brightgreen)\n\n## ✨ Features\n\n- **🔐 Secure WebSocket Communication**\n  - SSL/TLS encryption\n  - Secure message handling\n  - Automatic reconnection with exponential backoff\n\n- **👥 User Management**\n  - User profiles with avatars\n  - Real-time online user list\n  - Join/leave notifications\n\n- **💬 Rich Message Support**\n  - Text messages\n  - Image sharing with paste support\n  - File uploads with mime-type detection\n  - Embedded video player for video files\n  - Message history persistence\n\n- **🎨 Modern UI**\n  - Dark theme\n  - Responsive design\n  - Clean, minimalist interface\n  - Real-time typing indicators\n  - Message timestamps\n  - User avatars\n\n## 🛠️ Technical Stack\n\n- **Backend**\n  - Node.js\n  - Express\n  - ws (WebSocket library)\n  - multer (file uploads)\n\n- **Frontend**\n  - Vanilla JavaScript\n  - WebSocket API\n  - Web Workers\n  - CSS3 with custom properties\n\n## 📋 Prerequisites\n\n- Node.js \u003e= 16.0.0\n- SSL/TLS certificates (Let's Encrypt recommended)\n- Modern web browser with WebSocket support\n\n## 🚀 Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/websocket-chat.git\ncd websocket-chat\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Set up SSL certificates:\n```bash\n# Using Let's Encrypt\ncertbot certonly --webroot -w /var/www/html -d yourdomain.com\n```\n\n4. Create required directories:\n```bash\nmkdir uploads\nchmod 755 uploads\n```\n\n5. Configure the application:\n```javascript\n// Update certPath in server.js\nconst certPath = '/etc/letsencrypt/live/yourdomain.com';\n```\n\n6. Start the server:\n```bash\nnode server.js\n```\n\n## 🔧 Configuration\n\n### SSL/TLS Certificates\nThe application requires valid SSL/TLS certificates. Update the `certPath` in `server.js`:\n\n```javascript\nconst certPath = '/path/to/your/certificates';\nconst credentials = {\n    cert: fs.readFileSync(path.join(certPath, 'fullchain.pem')),\n    key: fs.readFileSync(path.join(certPath, 'privkey.pem')),\n    ca: fs.readFileSync(path.join(certPath, 'chain.pem'))\n};\n```\n\n### Port Configuration\nDefault port is 3210. Change it using the PORT environment variable:\n```bash\nPORT=8080 node server.js\n```\n\n## 💻 Usage\n\n1. Access the chat application through your browser: `https://yourdomain.com:3000`\n2. Enter your username when prompted\n3. Start chatting!\n\n### Sharing Files\n- **Images**: Paste directly from clipboard\n- **Files**: Paste any file to upload and share\n- **Videos**: Paste video files for embedded playback\n\n## 🔒 Security Features\n\n- SSL/TLS encryption for all communications\n- Secure WebSocket connection (WSS)\n- File upload validation and sanitization\n- Automatic connection recovery\n- Input sanitization\n\n## 📝 API Documentation\n\n### WebSocket Messages\n\nMessages follow this format:\n```javascript\n{\n    type: 'chat|system|users|join',\n    content: String|Object,\n    timestamp: ISOString,\n    username?: String,\n    messageType?: 'text|image|file'\n}\n```\n\n### REST Endpoints\n\n- `GET /health` - Server health check\n- `GET /api/chat/history` - Get chat history\n- `POST /upload` - File upload endpoint\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch: `git checkout -b feature/AmazingFeature`\n3. Commit your changes: `git commit -m 'Add some AmazingFeature'`\n4. Push to the branch: `git push origin feature/AmazingFeature`\n5. Open a pull request\n\n## 📜 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Node.js community\n- ws WebSocket library\n- All contributors\n\n## 📞 Support\n\nFor support, email cdr@cdr2.com or open an issue in the GitHub repository.\n\n---\nMade with ❤️ by [Christopher Robison](mailto:cdr@cdr2.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisrobison%2Fcrchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisrobison%2Fcrchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisrobison%2Fcrchat/lists"}