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