A modern real-time chat application with video calling capabilities. Built with React, Node.js, and WebRTC. Features instant messaging, peer-to-peer video calls, typing indicators, and real-time notifications, all wrapped in a beautiful UI.
- 💬 Real-time messaging
- 📹 Video calling with WebRTC
- 🔔 Real-time notifications
- ✍️ Typing indicators
- 👤 User authentication
- 🎨 Modern UI with dark mode
- 🔒 Secure communication
- React with TypeScript
- Tailwind CSS for styling
- Shadcn UI components
- Socket.io client for real-time communication
- WebRTC for video calls
- Zustand for state management
- React Router for navigation
- Node.js with Express
- PostgreSQL with Prisma ORM
- Socket.io for WebSocket communication
- JWT for authentication
- Docker for containerization
- Node.js (v16 or higher)
- PostgreSQL
- Docker (optional)
- Clone the repository:
git clone <repository-url>
cd chatApp
- Install dependencies:
# Install client dependencies
cd client
npm install
# Install server dependencies
cd ../server
npm install
- Set up environment variables:
Create .env
files in both client and server directories:
Client .env
:
VITE_API_URL=http://localhost:3000
Server .env
:
DATABASE_URL="postgresql://user:password@localhost:5432/chatapp"
JWT_SECRET="your-jwt-secret"
CLIENT_URL="http://localhost:5173"
- Initialize the database:
cd server
npx prisma migrate dev
- Start the server:
cd server
npm run dev
- Start the client:
cd client
npm run dev
docker-compose up
- Instant message delivery
- Read receipts
- Message history
- Typing indicators
- WebRTC-based peer-to-peer connection
- Camera and microphone controls
- Connection quality indicators
- Picture-in-picture view
- JWT-based authentication
- Secure password handling
- Persistent sessions
- Responsive design
- Modern animations
- Dark mode support
- Intuitive layout
chatApp/
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── store/ # Zustand store
│ │ ├── pages/ # Page components
│ │ └── types/ # TypeScript types
│ └── ...
├── server/ # Backend Node.js application
│ ├── src/
│ │ ├── controllers/ # Route controllers
│ │ ├── middleware/ # Express middleware
│ │ ├── routes/ # API routes
│ │ └── sockets/ # WebSocket handlers
│ └── ...
└── docker-compose.yml # Docker configuration
- Fork the repository
- 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
This project is licensed under the MIT License - see the LICENSE file for details.