Welcome to the Chat Application! This is a modern, real-time chat platform built with React, Node.js, Express, MongoDB, and Socket.IO. It allows users to engage in private and group chats, share files, and manage groups with an intuitive interface.
- Real-time private and group messaging using Socket.IO.
- User authentication and profile management.
- File sharing within chats.
- Group creation, member addition, and deletion.
- Responsive design for desktop and mobile devices.
- Modern UI with a cohesive color scheme (root color:
#2E7D32). - Message deletion for senders.
- Auto-scrolling chat interface.
- Node.js (v14.x or later)
- MongoDB (local or remote instance)
- npm or yarn
-
Clone the repository:
git clone https://github.com/sarthak03dot/chat-app.git cd chat-app -
Install server dependencies:
cd server npm install -
Install client dependencies:
cd ../client npm install -
Set up environment variables:
- PORT=5000
- MONGODB_URI=mongodb://localhost:27017/chatapp
- JWT_SECRET=your-secret-key
- Sign Up/Login: Register a new account or log in with existing credentials.
- Chat: Navigate to /chat/:userId for private chats or /chat/group/:groupId for group chats.
- Groups: Create or join groups via the Groups page (/groups).
- Profile: Manage your profile settings on the Profile page (/profile).
- Logout: Use the logout button in the navbar.
chat-application/ ├── client/ # React frontend │ ├── src/ │ │ ├── components/ # React components (e.g., Navbar, Chat, Footer) │ │ ├── styles/ # CSS files │ │ ├── App.js # Main React app │ │ └── ... │ ├── package.json ├── server/ # Node.js backend │ ├── models/ # Mongoose schemas │ ├── routes/ # API routes │ ├── middleware/ # Authentication middleware │ ├── .env # Environment variables │ ├── index.js # Server entry point │ └── package.json ├── README.md # This file └── ...
- Frontend: React, React Router, Axios
- Backend: Node.js, Express, MongoDB, Mongoose
- Real-Time: Socket.IO
- Styling: CSS with custom variables
- Authentication: JWT (JSON Web Tokens)
-
Fork the repository.
-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit:
git commit -m "Add your feature or fix" -
Push to the branch:
git push origin feature/your-feature-name
-
Open a Pull Request with a clear description of your changes.
- Please ensure your code follows the project's style guidelines and includes tests where applicable.
- This project is licensed under the MIT License. See the file for details.
- Author: [Sarthak Singh] (sarthak03december@gmail.com)
- GitHub: https://github.com/sarthak03dot
- Issues: Report bugs or suggest features here.
- If you like this project, give it a ⭐ on GitHub and share it with others!