WiChat 2.0 is a feature-rich MERN stack real-time chat application, designed for seamless communication with a modern and intuitive user experience. It supports individual, media sharing, and advanced messaging features.
- Features
- Tech Stack
- Getting Started
- Environment Variables
- Folder Structure
- Features in Detail
- Screenshots
- Contributing
- License
- User Authentication: Secure login and registration using JWT.
- Real-time Messaging: Send and receive messages instantly.
- Reply to Messages: Double-tap a message to reply and view contextual replies.
- Media Sharing: Share images and files within chats.
- Online Status: Real-time status indicators for users.
- Responsive Design: Optimized for both desktop and mobile devices.
- Frontend:
- React.js
- Tailwind CSS
- Socket.io-client
- Backend:
- Node.js
- Express.js
- MongoDB (Mongoose for schema management)
- Socket.io
- Others:
- JWT for authentication
- Multer for file uploads
Ensure you have the following installed:
- Node.js Latest for .env file support
- MongoDB
-
Clone the repository:
git clone https://github.com/thekiranmahajan/witchat2.o.git cd witchat2.o
-
Install dependencies for both frontend and backend:
cd backend && npm install cd ../frontend && npm install
-
Run the development servers:
# Start backend cd backend npm start # Start frontend cd ../frontend npm start
-
Open your browser and navigate to
http://localhost:5173
.
Create a .env
file in the backend
directory with the following:
PORT=5001
MONGO_URI=<your-mongodb-uri>
JWT_SECRET=<your-secret-key>
CLOUDINARY_CLOUD_NAME=<cloudinary-cloud-name>
CLOUDINARY_API_KEY=<cloudinary-api-key>
CLOUDINARY_API_SECRET=<cloudinary-api-secret>
NODE_ENV=development || production
backend/
├── src/
│ ├── controllers/
│ ├── lib/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── index.js
frontend/
├── src/
│ ├── components/
│ ├── lib/
│ ├── pages/
│ ├── store/
│ ├── App.jsx
│ ├── index.css
│ ├── main.jsx
- Secure registration and login.
- JWT-based session management.
- Socket.io integration for instantaneous communication.
- Double-tap a message to set it as a reply.
- Display the original message when viewing a reply.
- Auto-scroll and highlight the referenced message when clicked.
- Upload and share images directly in chats.
- Preview shared media.
- View real-time online/offline status of users.
- Fully optimized for desktops, tablets, and mobile devices.
...
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name
). - Make your changes and commit them (
git commit -m 'Add feature-name'
). - Push to the branch (
git push origin feature-name
). - Open a pull request.
This project is licensed under the MIT License.
For any queries or suggestions, feel free to reach out!