This project is a real-time chatting application built using the MERN stack (MongoDB, Express, React, and Node.js). It allows users to engage in dynamic, real-time conversations with one another. The application is responsive and scalable, designed to deliver a seamless chatting experience.
- 🚀 Features
- 🖼️ Screenshots
- 🛠️ Technologies
- 🧰 Getting Started
- 📱 Usage
- 🤝 Contributing
- 📬 Contact
- 🎉 Hacktoberfest
- 📄 License
- ⚡ Real-time messaging with Socket.io
- 📦 MongoDB for efficient data storage of conversations and user info.
- 🖥️ Responsive UI built with React.
- 🌐 RESTful API with Express and Node.js.
- 🔐 Secure User authentication with JWT
Thanks to all these amazing people for contributing 💖
| 💻 Frontend | ⚙️ Backend | 🗄️ Database | 🔁 Real-Time |
|---|---|---|---|
|
|
|
|
|
Before you begin, ensure you have the following installed:
- Node.js (v12 or higher)
- MongoDB (Ensure MongoDB is running locally or on a remote server)
- npm or yarn
-
Clone this repository:
git clone https://github.com/shambhaveesrivastava12/ChittChat.git cd ChittChat -
Install dependencies for both the frontend and backend:
- Backend:
cd backend npm install - Frontend:
cd ../frontend npm install
- Backend:
-
Create a
.envfile in the backend folder to configure environment variables (e.g., MongoDB connection string, JWT secret).PORT=5000 MONGO_DB_URI=mongodb://localhost:27017/ JWT_SECRET=your_jwt_secret NODE_ENV=development BREVO_API_KEY=your_api_key FRONTEND_URLS=<your_localhost>,<official_domain>[Multiple links can be provided separated by ','] SMTP_EMAIL=your_brevo_smtp_mail SMTP_HOST=smtp-relay.brevo.com SMTP_PASS=your_smtp_brevo_master_password SMTP_PORT=587 SMTP_USER=your_smtp_brevo_user VITE_API_URL=your_backend_link VITE_SOCKET_URL=your_backend_link
-
💡For
mongodblink, usecloud.mongodb.com -> Create Deployment -> Create User -> Allow Traffic 0.0.0.0 -> Connect via drivers ->Use username and password in project. -
💡To generate
jwttoken, useopenssl rand -base64 32in your terminal.
-
To enable the GIF search feature, you will need a free API key from GIPHY.
-
Create an Account: Go to the GIPHY Developers website and create a free account.
-
Create an App: After logging in to your developer dashboard, click "Create an App". Select the "API" option.
-
Get Your API Key: Give your app a name and description. GIPHY will then provide you with your API Key. Copy this key.
-
Add Key to
.envFile: Open the.envfile in the root of the project. Find theVITE_GIPHY_API_KEYline (or add it if it's not there) and paste your key after the equals sign.The line in your
.envfile should look like this:VITE_GIPHY_API_KEY=d2s4f6g8h0j1k2l3... -
Restart Your Server: Stop and restart your development server for the key to be loaded.
-
Start the backend server:
cd backend npm run server -
Start the frontend React app:
cd ../frontend npm run dev -
Access the application: Open your browser and go to
http://localhost:5000.
- Ensure Docker Desktop is installed and running on your machine.
- No need to install Node.js, MongoDB, or any dependencies manually.
- 🖥️ Frontend setup:
cd frontend
docker-compose up -d
✅ This will:
- Build and run the frontend React app in a container.
- Serve the app at http://localhost:3001.
- Automatically install dependencies inside the container.
- 🔧 Backend setup:
cd backend
docker-compose up -d
✅ This will:
- Build and run the backend Node.js server in a container.
- Connect to MongoDB (also containerized if configured).
- Serve the API at http://localhost:3000.
- Automatically install backend dependencies.
- Register for an account or log in with an existing one.
- Start a chat with online users and enjoy real-time messaging.
If you'd like to contribute, feel free to submit a pull request or open an issue.
For questions or suggestions, reach out via GitHub Issues or connect with the maintainer @shambhaveesrivastava12.
This project is participating in Hacktoberfest 2025! 🍂 We welcome contributions from developers of all levels.
✅ You Can:
- Fix bugs 🐛
- Add features 🚀
- Improve documentation 📚
- Enhance UI/UX 🎨
❌ Please Avoid:
- Spammy or low-quality PRs
- Automated PRs without meaningful changes
This project is licensed under The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The credit notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



