A modern, feature-rich real-time chat application built with React, Node.js, and Socket.io. Experience seamless communication with support for direct messages, group channels, file sharing, and video calling.
- Secure Authentication - JWT-based authentication system
- Protected Routes - Middleware-protected API endpoints
- Session Management - Persistent user sessions
- Real-time Messaging - Instant message delivery via WebSockets
- Direct Messages - Private one-on-one conversations
- Group Channels - Create and manage group conversations
- Message History - Persistent message storage
- Modern UI - Clean, responsive design built with Tailwind CSS
- Profile Management - User profile customization
- Contact Management - Add and manage contacts
- Real-time Updates - Socket.io powered real-time communication
- State Management - Redux Toolkit for efficient state handling
- Responsive Design - Mobile-first responsive interface
- React 18 - Modern UI library with hooks
- Vite - Fast build tool and dev server
- Redux Toolkit - State management
- Tailwind CSS - Utility-first CSS framework
- Shadcn/ui - High-quality UI components
- Socket.io Client - Real-time communication
- Lucide React - Beautiful icons
- Node.js - JavaScript runtime
- Express.js - Web application framework
- Socket.io - Real-time bidirectional communication
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - JSON Web Tokens for authentication
- Multer - File upload handling
Ensure you have the following installed:
- Node.js (v18.0.0 or higher)
- npm or yarn
- MongoDB (local or cloud instance)
-
Clone the repository
git clone https://github.com/0x4nud33p/chat-app.git cd chat-app
-
Install server dependencies
cd server npm install
-
Install client dependencies
cd ../client npm install
Create .env
files in both client and server directories:
Server (.env)
# Database
MONGODB_URI=mongodb://localhost:27017/chatapp
# or for MongoDB Atlas:
# MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/chatapp
# JWT Secret
JWT_SECRET=your-super-secure-jwt-secret-key
# Server Configuration
PORT=8747
NODE_ENV=development
# CORS Origin
ORIGIN=http://localhost:5173
Client (.env)
# API Configuration
VITE_SERVER_URL=http://localhost:8747
VITE_API_URL=http://localhost:8747/api
-
Start the server
cd server npm start
-
Start the client (in a new terminal)
cd client npm run dev
Built with ❤️ by 0x4nud33p
⭐ Star this repository if you found it helpful!