This chat app, built with the MERN (MongoDB, Express.js, React.js, Node.js) stack and socket.io, allows users to create accounts, log in, and delete accounts. Users can engage in real-time messaging, initiate new chats, and delete messages. Additionally, users have the ability to change their name, username, and password.
chat-app
(Root Folder):client
(Frontend)server
(Backend)
-
Account Management:
- Create accounts
- Log in
- Delete accounts
- Change name, username, and password
-
Messaging:
- Real-time messaging
- Start new chats
- Delete messages
The front-end of this application is built with Vite, a fast web development build tool. It utilizes the Tailwind CSS framework for styling.
- Clone the repository:
git clone https://github.com/jiyade/chat-app.git
- Navigate to the project directory:
cd chat-app
- Install dependencies:
- Frontend:
cd client && npm install
- Backend:
cd server && npm install
- Frontend:
In the server
directory, the server expects the following environment variables:
MONGO_URI
: URI for MongoDB connection (connection string).JWT_SECRET
: Secret for JSON Web Token.REACT_URL
: URL of the React app (frontend).
Create a .env
file in the server
directory and add these variables.
In the client
directory (frontend), the React app expects the following environment variable:
VITE_SERVER_BASE_URL
: URL of the server (backend).
Create a .env
file in the client
directory and add this variable.
- Run the app:
- Frontend:
cd client && npm run dev
- Backend:
cd server && npm start
- Frontend:
- Visit http://localhost:5173 in your browser.
Check out the working preview of the app at https://chat-app-jiyade.netlify.app/.
- MongoDB
- Express.js
- React.js
- Node.js
- Socket.io
- Vite
- Tailwind CSS