Huddle is a modern, real-time chat application built with the MERN stack (MongoDB, Express.js, React, Node.js) and Socket.io. It offers a sleek, responsive design with real-time messaging, online user tracking, media sharing, and a beautiful glassmorphism UI.
- π Secure Authentication - JWT-based login/signup system
- π¬ Real-Time Messaging - Instant messaging with Socket.io
- π₯ Online Status - See who's online in real-time
- πΈ Media Sharing - Share images seamlessly
- π¨ Modern UI/UX - Glassmorphism design with smooth animations
- π± Fully Responsive - Works perfectly on all devices
- π Message Notifications - Unread message counters
- π€ Profile Management - Update profile pictures and bio
- π User Search - Find users quickly with search functionality
- React 19.0.0 - Modern UI library
- TailwindCSS 4.1.4 - Utility-first CSS framework
- Vite - Fast build tool and development server
- React Router DOM - Client-side routing
- Socket.io Client - Real-time communication
- Axios - HTTP client for API calls
- React Hot Toast - Beautiful notifications
- Node.js - JavaScript runtime
- Express.js 5.1.0 - Web application framework
- Socket.io 4.8.1 - Real-time bidirectional communication
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - Secure authentication tokens
- Bcrypt - Password hashing
- Cloudinary - Media storage and optimization
- CORS - Cross-origin resource sharing
- Node.js (v14 or higher)
- MongoDB (local or cloud instance)
- Cloudinary account (for image uploads)
-
Clone the repository
git clone https://github.com/krishiv274/Huddle.git cd Huddle -
Install server dependencies
cd server npm install -
Install client dependencies
cd ../client npm install -
Environment Setup
Create
.envfile in theserverdirectory:PORT=5002 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret
Create
.envfile in theclientdirectory:VITE_BACKEND_URL=http://localhost:5002
-
Start the application
Terminal 1 - Start the server:
cd server npm run serverTerminal 2 - Start the client:
cd client npm run dev -
Open your browser
http://localhost:5173
- Sign Up: Create account with email, full name, and bio
- Login: Secure login with JWT token authentication
- Password Security: Bcrypt hashing for password protection
- Instant Messaging: Send and receive messages in real-time
- Message Status: See if messages are delivered and seen
- Typing Indicators: Know when someone is typing
- Message History: Access previous conversations
- Online Status: Green indicator for online users
- User Search: Find users by name with search functionality
- Profile Pictures: Upload and display custom avatars
- User Profiles: View user bio and information
- Image Sharing: Upload and share images instantly
- Media Gallery: View all shared media in conversations
- Image Preview: Click to view images in full size
- Cloudinary Integration: Optimized image storage and delivery
- Glassmorphism Design: Modern glass-like interface
- Smooth Animations: Fluid transitions and hover effects
- Responsive Layout: Perfect on desktop, tablet, and mobile
- Dark Theme: Easy on the eyes with dark mode aesthetics
- Custom Scrollbars: Stylized scroll bars for better UX
Huddle/
βββ client/ # React frontend
β βββ public/ # Static files
β βββ src/
β β βββ assets/ # Images and icons
β β βββ components/ # Reusable components
β β β βββ Sidebar.jsx
β β β βββ ChatContainer.jsx
β β β βββ RightSidebar.jsx
β β βββ context/ # React contexts
β β β βββ AuthContext.jsx
β β β βββ ChatContext.jsx
β β βββ pages/ # Main pages
β β β βββ HomePage.jsx
β β β βββ LoginPage.jsx
β β β βββ ProfilePage.jsx
β β βββ lib/ # Utility functions
β β βββ App.jsx # Main app component
β βββ package.json
βββ server/ # Node.js backend
β βββ controllers/ # Request handlers
β β βββ userController.js
β β βββ messageController.js
β βββ middleware/ # Custom middleware
β β βββ auth.js
β βββ models/ # Database models
β β βββ User.js
β β βββ Message.js
β βββ routes/ # API routes
β β βββ userRoutes.js
β β βββ messageRoutes.js
β βββ lib/ # Utility functions
β β βββ db.js
β β βββ utils.js
β β βββ cloudinary.js
β βββ server.js # Main server file
β βββ package.json
βββ README.md
POST /api/auth/signup # User registration
POST /api/auth/login # User login
GET /api/auth/check # Check authentication
PUT /api/auth/update-profile # Update user profile
GET /api/messages/users # Get all users for sidebar
GET /api/messages/:id # Get messages with specific user
POST /api/messages/send/:id # Send message to user
PUT /api/messages/mark/:id # Mark message as seen
Beautiful animated login interface with glassmorphism design.
Three-panel layout with user list, chat area, and user profile.
Easy profile editing with image upload functionality.
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Create production environment variables
- Update CORS settings for production URL
- Deploy using platform-specific instructions
- Create cluster on MongoDB Atlas
- Whitelist IP addresses
- Update connection string in environment variables
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the existing code style
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
Krishiv
- GitHub: @krishiv274
- Email: krishiv270406@gmail.com
- Thanks to the React and Node.js communities
- Socket.io for real-time communication
- TailwindCSS for the amazing utility-first approach
- Cloudinary for image management
- MongoDB for the flexible database solution
If you have any questions or need support, please:
- Check the Issues page
- Create a new issue if your question isn't answered
- Contact the author directly
Made with β€οΈ by Krishiv
