Chattrix is a full-stack real-time chat application built with the powerful MERN stack and enhanced with Socket.io, TailwindCSS, DaisyUI, and Zustand for state management. It allows users to communicate one-to-one, share images, track online user status, and personalize their experience with 32 dynamic background themes.
- ✅ JWT-based Authentication & Authorization
- 📸 Real-Time Image and Text Messaging
- 🟢 Live Online User Status
- 🎨 32 Background Themes to choose from
- 🧑🎨 Profile Image Upload & Update
- 🚀 Deployed on Render
- 🗃️ Global State Management with Zustand
- 📡 Powered by Socket.io for instant communication
- 🛡️ Robust Error Handling on both client & server sides
- MongoDB – NoSQL database used for storing users, messages, and media.
- Express.js – Handles the backend logic and RESTful APIs.
- React.js – Dynamic frontend UI framework with reusable components.
- Node.js – JavaScript runtime environment powering the server.
Enables real-time bi-directional communication between clients and the server for a seamless messaging experience.
- TailwindCSS: Utility-first CSS framework for rapid UI development.
- DaisyUI: A Tailwind component library that adds beautiful, customizable components — fast.
Lightweight, scalable global state management for React. Used here to handle app-wide data like user authentication and theme preferences.
Used for secure user authentication and session management.
###🖼️ Cloudinary- 🆕 Image Hosting & Media Management
All user-uploaded profile photos and message images are handled via Cloudinary. This ensures: Fast and reliable image delivery Automatic optimization and resizing Secure upload and access via signed URLs
Chattrix/
├── backend/ # Express server, DB models, auth & socket setup
├── frontend/ # React app with Zustand, themes, chat UI
│ ├── components/ # Navbar, chat window, message list, etc.
│ ├── lib/axios.js # Axios instance for API calls
│ ├── store/ # Zustand stores (e.g., theme, auth)
│ ├── assets/ # Icons, images, etc.
│ └── ...
├── .env
└── README.md
git clone https://github.com/ShahiCodes/Chattrix.git
cd ChattrixCreate .env files in both /backend and /frontend directories:
PORT=5000
MONGO_URI=your-mongodb-connection
JWT_SECRET=your_jwt_secret
VITE_API_URL=http://localhost:5000
npm install --prefix backend
npm install --prefix frontendnpm run dev --prefix backend
npm run dev --prefix frontend- Register or log in with an account.
- Start a chat with another user.
- Try switching between different background themes.
- Upload a profile picture.
- Watch live user count update in real-time!
- Passwords are hashed using bcrypt.
- JWT tokens are securely stored and verified.
- Image uploads are validated.
🟢 [Check it out here] Chattrix
Contributions are welcome! Feel free to submit issues or PRs if you'd like to improve Chattrix.
MIT License