# Chat App š¬
Chat App šØļø is a real-time messaging web application built with React, ShadCN, and Tailwind CSS. The app supports both group chats and direct messaging, enabling users to communicate seamlessly with others. It leverages socket.io for real-time updates, JWT for secure authentication, and MongoDB for scalable data storage.
š Connect with friends, share media, and enjoy smooth, instant messaging with Chat App today!
Experience the Chat App live:
Follow these steps to set up the project on your local machine:
git clone https://github.com/abhishekcultivates/chat-app.git
cd chat-app
Navigate to the server directory:
cd server
Install the backend dependencies:
npm install
Create a .env file in the server directory with the following contents:
PORT=8747
JWT_KEY="your-jwt-secret-key-here"
ORIGIN="http://localhost:5173"
DATABASE_URL="mongodb+srv://username:[email protected]/dbname?retryWrites=true&w=majority"
Note: Replace DATABASE_URL with your MongoDB connection string if necessary.
Start the backend server:
npm run dev
The backend will be running at http://localhost:8747 (or whatever port you set in .env).
Navigate to the client directory:
cd ../client
Install the frontend dependencies:
npm install
Create a .env file in the client directory with the following contents:
VITE_SERVER_URL="http://localhost:8747"
VITE_SOCKET_URL="http://localhost:8747"
Note: When you are ready to deploy, change it to the production URLs and provide as environment variables.
Start the frontend development server:
npm run dev
The frontend will be running at http://localhost:5173.
Once both servers are running, you can open your browser and navigate to http://localhost:5173 to start using the app.
For questions, suggestions, or feedback, feel free to reach out!
Ā© 2024 Abhishek Raj