A real-time chat application built with the MERN stack, featuring responsive layout, and messaging capabilities.
- Real-time Messaging: Instant message delivery using Socket.io
- User Authentication: Secure signup/login with JWT tokens
- Image Sharing: Send and receive images in conversations
- Online Status: See who's online in real-time
- Responsive Design: Works on desktop, tablet, and mobile
- Profile Management: Update profile picture and fullname
- Message History: Persistent chat history with MongoDB
- React - UI library
- Vite - Build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Zustand - State management
- Socket.io-client - Real-time communication
- React Hot Toast - Showing errors
- Lucide React - Icon library
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- Socket.io - Real-time communication
- JWT - JSON Web Tokens for authentication
- bcryptjs - Password hashing
- Cloudinary - Image hosting and management
Before running this application, make sure you have:
- Node.js (v16 or higher)
- MongoDB Atlas account or local MongoDB instance
- Cloudinary account for image uploads
git clone https://github.com/yourusername/chatflow.git
cd chatflowNavigate to the backend directory and install dependencies:
cd backend
npm installCreate a .env file in the backend directory with the following variables:
MONGODB_URI=your_mongodb_connection_string
PORT=5001
JWT_SECRET=your_jwt_secret_key
NODE_ENV=development
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
FRONTEND_URL=http://localhost:5173Start the backend server:
npm run devOpen a new terminal, navigate to the frontend directory, and install dependencies:
cd frontend
npm installCreate a .env file in the frontend directory (if needed for additional configuration).
Start the frontend development server:
npm run devOpen your browser and navigate to http://localhost:5173 to start using ChatFlow!
- Sign Up: Create a new account with your full name, email, and password
- Login: Sign in with your credentials
- Start Chatting: Select a user from the sidebar to begin a conversation
- Type your message in the input field
- Press Enter or click the send button to send text messages
- Click the image icon to upload and send images
- Click on your profile picture in the navbar to access profile settings
- Update your profile picture by clicking the camera icon
- Edit your full name by clicking the edit button next to your name
- View your account information including member since date
- See online users with green indicators
- Receive instant notifications for new messages
- Messages automatically scroll to show the latest content
POST /api/auth/signup- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutGET /api/auth/check- Check authentication statusPUT /api/auth/update-profile- Update user profile
GET /api/messages/users- Get all users for chatGET /api/messages/:id- Get messages with specific userPOST /api/messages/send/:id- Send message to user
Ibrahim Aliyev - @ibrahimaliyevv2
- Thanks to the open-source community for the amazing tools and libraries
- Special thanks to the developers of Socket.io, React, and Tailwind CSS
- Inspired by modern chat applications and their user experience
Happy Chatting! 🎉