Ichat
A full-featured real-time chat application built using the MERN stack with Socket.io for real-time communication.
Install / Use
/learn @chauhan-varun/IchatREADME
iChat - Real Time Chat Application
A full-featured real-time chat application built using the MERN stack (MongoDB, Express, React, Node.js) with Socket.io for real-time communication.
Features
- 🌟 Modern Tech Stack: MERN (MongoDB, Express, React, Node.js) + Socket.io + TailwindCSS + Daisy UI
- 🔐 Secure Authentication: JWT-based authentication and authorization
- 💬 Real-time Messaging: Instant messaging with Socket.io
- 🟢 Online Status: Real-time user online/offline status indicators
- 📱 Responsive Design: Works seamlessly on desktop and mobile devices
- 🔄 State Management: Global state handling with Zustand
- 🛡️ Error Handling: Comprehensive error handling on both client and server
- 🔍 User Search: Find and connect with other users
Project Structure
ichat/
├── backend/ # Server-side code
│ ├── controllers/ # Route controllers
│ ├── db/ # Database connection
│ ├── middleware/ # Express middleware
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ ├── socket/ # Socket.io implementation
│ └── utils/ # Utility functions
├── frontend/ # Client-side code
│ ├── public/ # Static files
│ └── src/
│ ├── assets/ # Images, sounds, etc.
│ ├── components/ # React components
│ ├── context/ # React context
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Page components
│ ├── utils/ # Utility functions
│ └── zustand/ # State management
Prerequisites
- Node.js (v14+ recommended)
- MongoDB (local or Atlas)
- npm or yarn
Installation
- Clone the repository
git clone https://github.com/chauhan-varun/ichat.git
cd ichat
- Install server dependencies
npm install
- Install client dependencies
cd frontend
npm install
cd ..
- Create a .env file in the root directory with the following variables
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
NODE_ENV=development
Running the Application
Development Mode
Run backend server
npm run server
Run frontend (in a separate terminal)
cd frontend
npm run dev
Production Mode
Build the app
npm run build
Start the app
npm start
Technologies Used
Backend
- Node.js & Express.js - Server framework
- MongoDB & Mongoose - Database and ODM
- Socket.io - Real-time communication
- JWT - Authentication
- bcrypt.js - Password hashing
Frontend
- React.js - UI library
- Vite - Build tool
- TailwindCSS & Daisy UI - Styling
- Socket.io-client - Real-time communication
- Zustand - State management
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the ISC License.
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
