Converse is a full-stack real-time chat application that provides seamless communication with a modern and responsive design. It supports features like user authentication, real-time messaging, AI-powered responses, and video/audio calling.
-
User Authentication:
- Login and Signup with email and password.
- Email verification using OTP.
-
Real-Time Messaging:
- Send and receive text messages.
- Support for multimedia (images, audio).
-
AI-Powered Responses:
- Integration with AI to generate responses.
-
Video/Audio Calling:
- Initiate and receive video/audio calls.
- Call management (accept, reject, end).
-
User Profile Management:
- Update profile details (name, about, profile picture).
-
Responsive Design:
- Optimized for both desktop and mobile devices.
-
Dark Mode:
- Toggle between light and dark themes.
-
Authentication:
- JWT-based authentication.
- Secure password hashing with bcrypt.
-
Database:
- MongoDB for storing user and message data.
-
File Uploads:
- Cloudinary integration for storing images and audio files.
-
WebSocket Communication:
- Real-time communication using
socket.io
.
- Real-time communication using
-
RESTful APIs:
- Endpoints for user authentication, messaging, and calling.
-
Environment Configuration:
- Secure environment variables for sensitive data.
- Node.js (v16 or higher)
- MongoDB
- Cloudinary account
- Email service credentials (e.g., Gmail)
-
Clone the repository:
git clone https://github.com/your-repo/converse.git cd converse
-
Install dependencies:
npm install --prefix Client npm install --prefix Server
-
Build the client:
npm run build --prefix Client
-
Set up environment variables:
- Create
.env
files in bothClient
andServer
directories. - Add the following variables:
- Create
MONGODB_URI=<your-mongodb-uri>
PORT=3000
JWT_SECRET=<your-jwt-secret>
NODE_ENV=production
CLOUDINARY_CLOUD_NAME=<your-cloudinary-cloud-name>
CLOUDINARY_API_KEY=<your-cloudinary-api-key>
CLOUDINARY_API_SECRET=<your-cloudinary-api-secret>
CLIENT_KEY=http://localhost:5173
EMAIL_USER=<your-email-address>
EMAIL_PASS=<your-email-password>
GEMINI_API_KEY=<your-gemini-api-key>
VITE_API_URL=http://localhost:3000/api
VITE_SOCKET_URL=http://localhost:3000
-
Start the server:
npm run start --prefix Server
-
Start the client (for development):
npm run dev --prefix Client
-
Access the application:
- Open your browser and navigate to
http://localhost:5173
.
- Open your browser and navigate to
src/
: Contains React components, hooks, pages, and assets.public/
: Static assets like icons and images.tailwind.config.js
: Tailwind CSS configuration.vite.config.js
: Vite configuration for the client.
src/
: Contains controllers, routes, middleware, and utility functions.models/
: Mongoose models for MongoDB.lib/
: Utility libraries (e.g., Cloudinary, Socket.io).routes/
: API route definitions.
POST /auth/signup
: Register a new user.POST /auth/login
: Login a user.POST /auth/logout
: Logout a user.
GET /message/users
: Fetch users for the sidebar.GET /message/:id
: Fetch messages with a specific user.POST /message/send-message/:id
: Send a message.DELETE /message/delete-message
: Delete a message.
POST /message/generateCall
: Initiate a call.POST /message/acceptCall
: Accept a call.POST /message/rejectCall
: Reject a call.POST /message/endCall
: End a call.
- React.js
- Tailwind CSS
- Vite
- Redux Toolkit
- Simple-Peer (WebRTC)
- Node.js
- Express.js
- MongoDB
- Socket.io
- Cloudinary
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
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.