{"id":19362806,"url":"https://github.com/aadhar41/nodejs-chat-app","last_synced_at":"2026-05-13T01:33:15.147Z","repository":{"id":210198217,"uuid":"368590258","full_name":"aadhar41/nodejs-chat-app","owner":"aadhar41","description":"Node.js Real-Time Chat Application is a simple yet powerful real-time chat application built using Node.js, Express, and Socket.io. This project demonstrates real-time communication between clients and server using WebSockets, allowing users to chat instantly without page refreshes.","archived":false,"fork":false,"pushed_at":"2025-12-12T04:13:32.000Z","size":1030,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-13T11:59:13.371Z","etag":null,"topics":["chat-application","nodejs","socket-io","socket-programming","web"],"latest_commit_sha":null,"homepage":"https://adg-chat-app.herokuapp.com/","language":"HTML","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/aadhar41.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}},"created_at":"2021-05-18T16:01:55.000Z","updated_at":"2025-12-12T05:45:13.000Z","dependencies_parsed_at":"2023-12-01T10:43:33.993Z","dependency_job_id":null,"html_url":"https://github.com/aadhar41/nodejs-chat-app","commit_stats":null,"previous_names":["aadhar41/nodejs-chat-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aadhar41/nodejs-chat-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadhar41%2Fnodejs-chat-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadhar41%2Fnodejs-chat-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadhar41%2Fnodejs-chat-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadhar41%2Fnodejs-chat-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aadhar41","download_url":"https://codeload.github.com/aadhar41/nodejs-chat-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadhar41%2Fnodejs-chat-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32963954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"ssl_error","status_checked_at":"2026-05-12T23:30:18.191Z","response_time":102,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chat-application","nodejs","socket-io","socket-programming","web"],"created_at":"2024-11-10T07:30:50.446Z","updated_at":"2026-05-13T01:33:15.139Z","avatar_url":"https://github.com/aadhar41.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# **Node.js Real-Time Chat Application 💬**\n\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D12.0.0-green.svg)](https://nodejs.org/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![GitHub Stars](https://img.shields.io/github/stars/aadhar-gaur/nodejs-chat-app.svg)](https://github.com/aadhar-gaur/nodejs-chat-app/stargazers)\n[![GitHub Issues](https://img.shields.io/github/issues/aadhar-gaur/nodejs-chat-app.svg)](https://github.com/aadhar-gaur/nodejs-chat-app/issues)\n\n## **🚀 Overview**\n\n**Node.js Real-Time Chat Application** is a simple yet powerful real-time chat application built using Node.js, Express, and Socket.io. This project demonstrates real-time communication between clients and server using WebSockets, allowing users to chat instantly without page refreshes.\n\nPerfect for developers looking to understand:\n- Real-time web applications\n- Socket.io for WebSocket communication\n- Basic Node.js server architecture\n- Frontend-backend integration\n\n## **✨ Features**\n\n* **Real-time messaging** - Instant message delivery to all connected users\n* **User management** - Unique usernames for each participant\n* **Simple UI** - Clean, responsive interface using Bootstrap 5\n* **Cross-browser compatibility** - Works on all modern browsers\n* **Easy deployment** - Simple setup with Node.js\n* **Scalable architecture** - Ready for expansion with additional features\n\n## **🛠️ Tech Stack**\n\n- **Backend**: Node.js, Express, Socket.io\n- **Frontend**: HTML5, CSS3, Bootstrap 5\n- **Real-time Communication**: WebSockets via Socket.io\n- **Development Environment**: Node.js 12+\n- **Package Manager**: npm\n\n## **📦 Installation**\n\n### **Prerequisites**\n\nEnsure you have the following installed:\n- [Node.js](https://nodejs.org/) (v12 or higher)\n- [npm](https://www.npmjs.com/) (comes with Node.js)\n- A modern web browser\n\n### **Quick Start**\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/aadhar-gaur/nodejs-chat-app.git\n   cd nodejs-chat-app\n   ```\n\n2. **Install dependencies**:\n   ```bash\n   npm install\n   ```\n\n3. **Start the server**:\n   ```bash\n   node server.js\n   ```\n\n4. **Open the application**:\n   - Open your browser and navigate to `http://localhost:3000`\n\n### **Development Setup**\n\nFor development, you can use:\n```bash\nnpm run dev\n```\nThis will start the server with nodemon for automatic restarting during development.\n\n## **🎯 Usage**\n\n### **Basic Usage**\n\n1. **Access the application** in your browser at `http://localhost:3000`\n2. **Create a username** by entering a unique name and clicking \"Submit\"\n3. **Start chatting** by typing messages in the input field and pressing Enter\n4. **See all messages** in real-time as they are sent by other users\n\n### **Example Code Snippets**\n\n#### **Server-side Socket.io Events**\n```javascript\n// server.js\nio.sockets.on(\"connection\", function(socket) {\n    // Handle new user connection\n    socket.on(\"new user\", function(data, callback) {\n        if (usernames.indexOf(data) != -1) {\n            callback(false); // Username taken\n        } else {\n            callback(true);\n            socket.username = data;\n            usernames.push(socket.username);\n            updateUsernames();\n        }\n    });\n\n    // Handle message sending\n    socket.on(\"send message\", function(data) {\n        io.sockets.emit(\"new message\", {msg: data, user: socket.username});\n    });\n\n    // Handle user disconnection\n    socket.on(\"disconnect\", function() {\n        if (!socket.username) return;\n        usernames.splice(usernames.indexOf(socket.username), 1);\n        updateUsernames();\n    });\n});\n```\n\n#### **Client-side Socket.io Connection**\n```javascript\n// Inside your client-side JavaScript\nconst socket = io();\nsocket.on('connect', () =\u003e {\n    console.log('Connected to server');\n});\n\nsocket.on('new message', (data) =\u003e {\n    // Display received message\n    const messageElement = document.createElement('div');\n    messageElement.textContent = `${data.user}: ${data.msg}`;\n    document.getElementById('chatWindow').appendChild(messageElement);\n});\n```\n\n## **📁 Project Structure**\n\n```\nnodejs-chat-app/\n├── node_modules/          # Dependencies\n├── public/                # Static files\n│   ├── css/               # CSS files\n│   ├── js/                # JavaScript files\n│   └── index.html         # Main HTML file\n├── views/                 # View templates (if any)\n├── .gitignore             # Git ignore file\n├── package.json           # Project dependencies and scripts\n├── package-lock.json      # Lock file for dependency versions\n├── README.md              # This file\n└── server.js              # Main server file\n```\n\n## **🔧 Configuration**\n\n### **Environment Variables**\n\nYou can configure the application using environment variables:\n\n```bash\n# Set the port\nPORT=8080 node server.js\n```\n\n### **Customization Options**\n\n1. **Change the port**:\n   Modify the `PORT` variable in `server.js` or set it via environment variables.\n\n2. **Customize the UI**:\n   Edit the CSS in `public/css/chat.css` or modify the Bootstrap components in `index.html`.\n\n3. **Add new features**:\n   Extend the Socket.io event handlers in `server.js` to add new functionality.\n\n## **🤝 Contributing**\n\nWe welcome contributions from the community! Here's how you can contribute:\n\n1. **Fork the repository** and create your branch from `main`.\n2. **Write tests** for your new features.\n3. **Commit your changes** with descriptive messages.\n4. **Open a pull request** explaining your changes.\n\n### **Development Setup**\n\nTo set up the development environment:\n\n1. Clone the repository\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n3. Start the development server:\n   ```bash\n   npm run dev\n   ```\n\n### **Code Style Guidelines**\n\n- Follow the existing code style\n- Use consistent indentation (2 spaces)\n- Write clear, concise comments\n- Ensure all new code is tested\n\n## **📝 License**\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.\n\n## **👥 Authors \u0026 Contributors**\n\n**Maintainer**: [Aadhar Gaur](https://github.com/aadhar-gaur)\n\n**Contributors**:\n- [Your Name](https://github.com/yourusername) - Your Contribution\n- [Another Contributor](https://github.com/anotheruser) - Another Contribution\n\n## **🐛 Issues \u0026 Support**\n\n### **Reporting Issues**\n\nIf you encounter any problems or have feature requests, please open an issue on GitHub. Include:\n\n- Detailed description of the issue\n- Steps to reproduce\n- Expected behavior\n- Screenshots or code snippets if applicable\n\n### **Getting Support**\n\nFor questions or support, you can:\n\n- Open an issue on GitHub\n- Join our community discussion (link to be added)\n- Contact the maintainer directly\n\n## **🗺️ Roadmap**\n\nHere's what we have planned for future updates:\n\n- **Feature 1**: Add user authentication\n- **Feature 2**: Implement private messaging\n- **Feature 3**: Add message persistence\n- **Feature 4**: Implement user presence indicators\n- **Feature 5**: Add support for file sharing\n\n## **🎉 Star and Share!**\n\nIf you found this project helpful, please consider giving it a star ⭐ on GitHub. Sharing is caring!\n\n[![GitHub Stars](https://img.shields.io/github/stars/aadhar-gaur/nodejs-chat-app.svg?style=social)](https://github.com/aadhar-gaur/nodejs-chat-app/stargazers)\n```\n\nThis README.md provides a comprehensive guide for developers, making it easy to understand, install, and contribute to the project. It follows modern GitHub README best practices with clear sections, engaging content, and practical examples. The emojis and visual elements make it more appealing, while the detailed structure ensures all necessary information is easily accessible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faadhar41%2Fnodejs-chat-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faadhar41%2Fnodejs-chat-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faadhar41%2Fnodejs-chat-app/lists"}