LetsChat is a real-time chat application designed to facilitate seamless communication. It leverages modern web technologies to deliver a fast and responsive user experience. It's live! 🚀
- Node.js with Express.js
- MongoDB with Mongoose ORM
- Socket.io for real-time communication
- Cloudinary for media storage
- dotenv for environment variable management
- React.js for building the user interface
- Vite for fast development and bundling
- Tailwind CSS and DaisyUI for styling
- Axios for HTTP requests
- Zustand for state management
- React Router for routing
- Real-time messaging with WebSockets (Socket.io)
- User authentication and authorization
- Media upload functionality with Cloudinary
- Responsive and interactive UI with React and Tailwind CSS
- Environment-specific configuration using dotenv
-
Navigate to the backend folder:
cd backend
-
Install dependencies:
npm install
-
Create a
.env
file in thebackend
directory and add the following secrets:MONGO_URI="mongodb+srv://<username>:<password>@cluster0.iwv13.mongodb.net/LetsChat?retryWrites=true&w=majority&appName=Cluster0" PORT=5001 JWT_SECRET="YourJWTSecret" NODE_ENV="development" CLOUDINARY_CLOUD_NAME="YourCloudinaryCloudName" CLOUDINARY_API_KEY="YourCloudinaryAPIKey" CLOUDINARY_API_SECRET="YourCloudinaryAPISecret"
-
Replace
<username>
,<password>
, and other placeholders with your own values. Keep these credentials secure! -
Run the backend server:
npm run dev
-
Navigate to the client folder:
cd client
-
Install dependencies:
npm install
-
Create a
.env
file in theclient
directory and add the following environment variables:# For development mode VITE_API_URL=http://localhost:5001/api # For production mode VITE_API_URL=/api
-
Start the development server:
npm run dev
npm run dev
: Starts the backend server with nodemon.
npm run dev
: Starts the frontend development server with Vite.npm run build
: Builds the production-ready frontend.npm run preview
: Previews the built project.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the ISC License.
Aman Dubey
Happy Chatting! 🚀