A real-time chat application built with the MERN(MongoDB,Express.js,React and NodeJS) stack.
🔗 Live Demo: https://chatify-zbcq.onrender.com/
- Real-time messaging
- User authentication
- Rate limiting
- Image uploads
- Modern and responsive UI
Frontend: React , Zustand, Tailwind CSS , DaisyUI
Backend: Node.js, Express, MongoDB, Socket.IO
Creates a new user account with email and password.
POST /api/auth/signup
Content-Type: application/json
{
"fullName": "John Doe",
"email": "johndoe@gmail.com",
"password": "1234567"
}Authenticates a user and returns a JWT token.
POST /api/auth/login
Content-Type: application/json
{
"email": "johndoe@gmail.com",
"password": "1234567"
}Logs out the current user and invalidates the session.
POST /api/auth/logoutVerifies if the current user is authenticated.
GET /api/auth/checkRetrieves a list of all users available for chatting.
GET /api/messages/contactsFetches all active chat conversations for the authenticated user.
GET /api/messages/chatsRetrieves the message history between the authenticated user and another user.
GET /api/messages/:idSends a text message to a specific user.
POST /api/messages/send/:id
Content-Type: application/json
{
"text": "Your message here"
}- Clone the repository
git clone https://github.com/iurig21/chatify.git
cd chatify- Install dependencies
npm run build- Configure environment variables
Create .env in the backend folder:
MONGODB_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_API_SECRET=your_cloudinary_secret
RESEND_API_KEY=your_resend_key
ARCJET_KEY=your_arcjet_key
PORT=5000- Run the app
Development:
cd backend && npm run dev
cd frontend && npm run dev- Node.js >= 18.17.0
- MongoDB database
Made by @iurig21