Skip to content

param20h/chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Chat App

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.

โœจ Features

Core Messaging

  • ๐Ÿ’ฌ 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 Experience

  • ๐Ÿ‘ค 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 Sharing

  • ๐Ÿ“Ž 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

Room Management

  • ๐ŸŒ 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 UI/UX

  • ๐ŸŽจ 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

๐Ÿš€ Quick Start

Prerequisites

  • Node.js (v14 or higher)
  • npm (comes with Node.js)

Installation

  1. Clone the repository:
git clone https://github.com/param20h/chat-app.git
cd chat-app
  1. Install dependencies:
npm install
  1. Start the server:
npm start
  1. Open your browser and go to:
http://localhost:3002

๐ŸŽฎ How to Use

Getting Started

  1. ๐Ÿท๏ธ Enter your username to join the chat (must be unique)
  2. ๐Ÿ’ฌ Start chatting with other users in real-time
  3. ๐Ÿ‘ฅ See who's online in the sidebar with their status
  4. โŒจ๏ธ View typing indicators when others are typing

Advanced Features

  • ๐Ÿ  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 message for 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

๐Ÿ› ๏ธ Technologies Used

Backend

  • Node.js - JavaScript runtime environment
  • Express.js - Web application framework
  • Socket.IO - Real-time bidirectional event-based communication
  • Multer - Middleware for handling file uploads

Frontend

  • 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

Features & Libraries

  • 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

๐Ÿ“ Project Structure

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

๐Ÿš€ Deployment

Local Development

npm start
# Server runs on http://localhost:3002

Production Deployment

The app can be deployed to platforms like:

  • Heroku - Add Procfile with web: node server.js
  • Railway - Automatic deployment from Git
  • DigitalOcean - App Platform or Droplets
  • AWS - Elastic Beanstalk or EC2

Environment Variables

PORT=3002                  # Server port (default: 3002)
NODE_ENV=production        # Environment mode

๐Ÿ”ง Development

Adding New Features

  1. Server-side: Add Socket.IO event handlers in server.js
  2. Client-side: Add event listeners and UI updates in script.js
  3. Styling: Update themes and responsive design in style.css

File Upload Configuration

  • Max file size: 10MB (configurable in server.js)
  • Allowed types: Images, documents, audio, video, archives
  • Storage: Local filesystem (public/uploads/)

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

๐Ÿ“ License

This project is open source and available under the MIT License.

๐Ÿ› Known Issues & Future Enhancements

Planned Features

  • ๐Ÿ” Message search and history
  • ๐Ÿ“ž Voice and video calling
  • ๐Ÿค– Bot integration
  • ๐Ÿ” End-to-end encryption
  • ๐Ÿ’พ Database persistence
  • ๐Ÿ“ฑ Mobile app (React Native)

Current Limitations

  • Messages are stored in memory (restart clears history)
  • No user authentication system
  • File storage is local (not cloud-based)

๐Ÿ™ Acknowledgments

  • 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

Releases

No releases published

Packages

No packages published