Chatty is a modern realtime chat application built using React, TailwindCSS, DaisyUI, Node.js, Express, MongoDB, Cloudinary, and Socket.io. It supports instant messaging, multiple UI themes, image sharing, authentication, and more — all with a smooth and elegant interface.
- User registration & login
- Password hashing with bcrypt
- JWT-based authentication
- Protected API routes
- Instant messaging with Socket.io
- Online/offline status tracking
-
Full theme system powered by DaisyUI
-
Multiple built-in theme styles:
- Light
- Dark
- Cupcake
- Bumblebee
- Emerald
- Synthwave
- Corporate
- …and more
-
Smooth theme switching
-
Theme preference stored locally
- Upload and send images via Cloudinary
- Optimized media URLs
- Preview
- User search
- One-to-one conversation
- Timestamps & status
- Responsive and clean UI
- DaisyUI component library (cards, buttons, chat-bubbles, themes, etc.)
- Organized component structure
- Local state management using Zustand
- REST API for auth, chat, users, messages
- Socket.io server
- Secure JWT auth
- Cloudinary image handling
- React
- TailwindCSS
- DaisyUI
- Axios
- React Router
- Zustand
- Node.js
- Express.js
- MongoDB (Mongoose)
- Socket.io
- Cloudinary
- JWT
- Bcrypt
Follow these instructions to set up the project locally.
- Node.js (v18 or higher recommended)
- MongoDB (Local instance or Atlas URI)
- Cloudinary Account (for image storage)
git clone [https://github.com/CodecAnuj/Chat-app.git](https://github.com/CodecAnuj/Chat-app.git)
cd Chat-appNavigate to the backend directory and install dependencies:
cd backend
npm installCreate a .env file in the backend directory with the following variables:
PORT=5001
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_super_secret_jwt_key
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
NODE_ENV=developmentStart the backend server:
npm run devThe server should run on http://localhost:5001.
Open a new terminal, navigate to the frontend directory, and install dependencies:
cd frontend
npm installStart the frontend development server:
npm run devThe frontend will launch (usually on http://localhost:5173) and automatically connect to the backend at http://localhost:5001.
Chat-app/
├── backend/
│ ├── src/
│ │ ├── controllers/ # Auth and Message logic
│ │ ├── lib/ # DB, Socket, Cloudinary configs
│ │ ├── middleware/ # Auth protection middleware
│ │ ├── models/ # Mongoose User and Message schemas
│ │ ├── routes/ # API routes
│ │ └── index.js # Server entry point
│ └── package.json
│
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable UI components (Navbar, Sidebar, etc.)
│ │ ├── lib/ # Axios setup and utilities
│ │ ├── pages/ # Full pages (Home, Login, Profile, etc.)
│ │ ├── store/ # Zustand state stores
│ │ └── App.jsx # Main application component
│ └── package.json
└── README.md
Contributions are welcome! Please fork the repository and submit a pull request for any improvements.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Anuj Tiwari
- GitHub: @CodecAnuj
Made with ❤️ by Anuj Tiwari