A feature-rich, real-time chat application built with Node.js, Express, and Socket.IO. Experience modern messaging with a beautiful, responsive interface and advanced features.
- 💬 Real-time messaging with WebSocket technology
- 👥 Multiple users support with unique usernames
- 🏠 Multiple chat rooms with password protection
- 💌 Private messaging system (
/pm username message) - ↩️ Reply to messages with quoted context
- ✏️ Message editing capabilities (edit your own messages)
- 😀 Message reactions with emoji picker (👍❤️😂😮😢🎉)
- 👤 User profiles with custom status and bio
- 🎨 User avatars with color coding based on username
- 📱 Mobile-responsive design with touch-friendly interface
- 🌙 Dark/Light theme toggle with persistent preferences
- 🔊 Sound notifications (toggle on/off)
- 💬 Message grouping for cleaner conversation flow
- ⌨️ Typing indicators showing who's currently typing
- 📎 File upload and sharing (up to 10MB)
- 🖼️ Image preview with click-to-enlarge
- 📄 Document sharing (PDF, DOC, TXT, etc.)
- 🎵 Audio and video file support
- ⬇️ One-click file downloads
- 📊 File size and type indicators
- 🌍 Public rooms for open discussions
- 🔒 Password-protected private rooms
- 👑 Room ownership and creation
- 📋 Online user list with status indicators
- 🚪 Real-time join/leave notifications
- 🎨 Modern gradient design with smooth animations
- 📲 Responsive layout (desktop, tablet, mobile)
- ⚡ Smooth hover effects and transitions
- 🎯 Intuitive button placements and controls
- 🔄 Real-time updates without page refresh
- Node.js (v14 or higher)
- npm (comes with Node.js)
- Clone the repository:
git clone https://github.com/param20h/chat-app.git
cd chat-app- Install dependencies:
npm install- Start the server:
npm start- Open your browser and go to:
http://localhost:3002
- 🏷️ Enter your username to join the chat (must be unique)
- 💬 Start chatting with other users in real-time
- 👥 See who's online in the sidebar with their status
- ⌨️ View typing indicators when others are typing
- 🏠 Create Rooms: Click "Create Room" to make public or private rooms
- 👤 Edit Profile: Click the profile button (👤) to set status and bio
- 📎 Share Files: Click the paperclip (📎) to upload and share files
- 💌 Private Messages: Type
/pm username your messagefor private chats - 😀 React: Click the reaction button to add emoji reactions
- ↩️ Reply: Click reply to quote and respond to specific messages
- 🌙 Toggle Theme: Switch between light and dark modes
- 🔊 Sound Control: Enable/disable notification sounds
- Node.js - JavaScript runtime environment
- Express.js - Web application framework
- Socket.IO - Real-time bidirectional event-based communication
- Multer - Middleware for handling file uploads
- HTML5 - Modern markup with semantic elements
- CSS3 - Advanced styling with CSS Grid, Flexbox, and custom properties
- Vanilla JavaScript - No frameworks, pure JavaScript for maximum performance
- WebSocket - Real-time communication protocol
- File Upload System - Secure file handling with type validation
- Responsive Design - Mobile-first approach with CSS media queries
- Local Storage - Persistent user preferences (theme, sound settings)
- Web Audio API - Custom notification sounds
chat-app/
├── public/ # Static files served to clients
│ ├── uploads/ # User uploaded files
│ ├── index.html # Main HTML page
│ ├── script.js # Client-side JavaScript
│ └── style.css # CSS styles and themes
├── server.js # Main server file with Socket.IO
├── package.json # Dependencies and scripts
├── .gitignore # Git ignore patterns
└── README.md # This file
npm start
# Server runs on http://localhost:3002The app can be deployed to platforms like:
- Heroku - Add
Procfilewithweb: node server.js - Railway - Automatic deployment from Git
- DigitalOcean - App Platform or Droplets
- AWS - Elastic Beanstalk or EC2
PORT=3002 # Server port (default: 3002)
NODE_ENV=production # Environment mode- Server-side: Add Socket.IO event handlers in
server.js - Client-side: Add event listeners and UI updates in
script.js - Styling: Update themes and responsive design in
style.css
- Max file size: 10MB (configurable in
server.js) - Allowed types: Images, documents, audio, video, archives
- Storage: Local filesystem (
public/uploads/)
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is open source and available under the MIT License.
- 🔍 Message search and history
- 📞 Voice and video calling
- 🤖 Bot integration
- 🔐 End-to-end encryption
- 💾 Database persistence
- 📱 Mobile app (React Native)
- Messages are stored in memory (restart clears history)
- No user authentication system
- File storage is local (not cloud-based)
- Socket.IO - For excellent real-time communication
- Express.js - For robust web framework
- Modern CSS - For beautiful responsive design
- Contributors - Thank you for making this project better!
⭐ Star this repository if you found it helpful!
🐛 Found a bug? Create an issue
💡 Have a suggestion? Start a discussion