Chatzy
Chatzy is a real-time chat application built with the MERN stack, Socket.io, and Docker, featuring instant messaging, AI chatbot (Gemini API), OTP authentication, media sharing, and 30+ customizable themes. Users can search, filter online users, and update profiles, ensuring a seamless and interactive chat experience.
Install / Use
/learn @EcstaticFly/ChatzyREADME
🚀 Chatzy – Real-Time Chat Application
Chatzy is a real-time chat platform that enables users to send messages, share images & PDFs, and engage with an AI-powered chatbot. Built with the MERN stack, Socket.io, and Docker, it offers secure OTP authentication, user search, online status filtering, and customizable themes (32+ options) for a seamless experience.
🔗 Live Demo: Chatzy
📂 Source Code: GitHub
🐳 Docker Hub: suyash310
✨ Features
- 💬 Real-Time Messaging – Instant text & image sharing via Socket.io.
- 🤖 AI Chatbot – Integrated Gemini API for interactive conversations.
- 🔍 User Search & Filters – Find users and filter by online status.
- 🔒 Secure Authentication – OTP-based verification for enhanced security.
- 🌆 Media Uploads – Users can update/delete profile images via Cloudinary.
- 🎨 Customization – Choose from 32+ themes with Daisy UI & TailwindCSS.
- 🐳 Containerized with Docker – Ensures scalability and efficient deployment.
🛠 Tech Stack
- Frontend: React.js, TailwindCSS, Daisy UI
- Backend: Node.js, Express.js, MongoDB, Brevo-api
- Real-Time Communication: Socket.io
- Authentication: OTP Verification
- AI Integration: Gemini API
- Media Management: Cloudinary
- Deployment: Docker, Render
🚀 Installation & Setup
Choose one of the following methods based on your needs:
📋 Prerequisites
- Node.js (v18 or higher) - Required for Method 1
- Docker & Docker Compose - Required for Methods 2 & 3
- MongoDB - Local installation or MongoDB Atlas account
- Cloudinary Account - For image & PDF uploads
- Brevo Account - For OTP email delivery
- Google Gemini API Key - For AI chatbot
Method 1: 🖥️ Local Development (without Docker)
Best for: Active development and debugging
Setup Steps
1. Clone the repository
git clone https://github.com/EcstaticFly/Chatzy.git
cd Chatzy
2. Setup Server
cd server
npm install
# Create .env file
touch .env
3. Configure server/.env
MONGODB_URL=your_mongodb_url
CORS_ORIGIN=your_cors_origin
JWT_SECRET=your_jwt_secret
NODE_ENV=development
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
MAIL_USER=your_mail_to_send_otp
BREVO_API_KEY=your_brevo_api_key
CHATBOT_API_KEY=your_gemini_chatbot_api_key
4. Setup Client
cd ../client
npm install
5. Start the Application
Open two terminal windows:
Terminal 1 - Start Server:
cd server
npm run dev
Terminal 2 - Start Client:
cd client
npm run dev
6. Access the Application
- Client: http://localhost:5173
- Server API: http://localhost:5000
Stop the Application
- Press
Ctrl + Cin both terminal windows
Method 2: 🐳 Local Docker Development
Best for: Testing in containerized environment with source code access
Setup Steps
1. Clone the repository
git clone https://github.com/EcstaticFly/Chatzy.git
cd Chatzy
2. Configure Environment
cd server
touch .env
3. Configure server/.env
MONGODB_URL=your_mongodb_url
CORS_ORIGIN=your_cors_origin
JWT_SECRET=your_jwt_secret
NODE_ENV=development
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
MAIL_USER=your_mail_to_send_otp
BREVO_API_KEY=your_brevo_api_key
CHATBOT_API_KEY=your_gemini_chatbot_api_key
4. Build and Start Containers
cd .. # Back to root directory
docker compose up --build
Or run in detached mode (background):
docker compose up --build -d
if already built once:
docker compose up -d
5. Access the Application
- Client: http://localhost:5173
- Server API: http://localhost:5000
- MongoDB: localhost:27017
Stop Containers
# Stop and remove containers (keeps data)
docker compose down
# Stop and remove containers + volumes (deletes data)
docker compose down -v
Method 3: 🚀 Production Deployment (Pre-built Images)
Best for: Quick deployment without source code, production environments
Setup Steps
1. Download Production Compose File (docker-compose.prod.yaml): Download
# Create a directory
mkdir chatzy-app
cd chatzy-app
# Create docker-compose.prod.yaml inside this folder
2. Create Environment Configuration
mkdir server
cd server
touch .env
3. Configure server/.env
MONGODB_URL=your_mongodb_url
CORS_ORIGIN=your_cors_origin
JWT_SECRET=your_jwt_secret
NODE_ENV=development
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
MAIL_USER=your_mail_to_send_otp
BREVO_API_KEY=your_brevo_api_key
CHATBOT_API_KEY=your_gemini_chatbot_api_key
4. Pull and Start Containers
cd .. # Back to root directory
docker compose -f docker-compose.prod.yaml up -d
5. Access the Application
- Client: http://localhost:5173
- Server API: http://localhost:5000
Stop Containers
# Stop and remove containers (keeps data)
docker compose down
# Stop and remove containers + volumes (deletes data)
docker compose down -v
🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to fork the repo and submit a pull request.
📜 License
This project is licensed under the GNU GENERAL PUBLIC LICENSE v3.
📬 Contact
For inquiries, reach out to me at Suyash Pandey.
