Welcome to the Chat Application repository! This project is a comprehensive chat application built with modern web technologies. It offers robust functionality including direct messaging, group chats, file uploads, and more. Below is a detailed overview of the key features and technologies used in this application.
- Direct Messaging: Users can send and receive direct messages with real-time updates.
- Group Chat Functionality: Create and manage group chats with multiple participants.
- Profile Management: Upload, update, and delete profile images.
- File Uploads: Supports multiple file types (e.g., images, videos) via Cloudinary. Users can also download shared files.
- Real-Time Chat: Chats automatically scroll down to display the latest messages.
- Node.js Clustering: Distributes load among different server instances to enhance scalability and performance.
- Redis Integration: Manages communication between server instances efficiently.
- Rate Limiting: Controls the rate of incoming requests to protect against abuse and ensure fair usage.
- Throttling: Limits the rate of message submissions to prevent abuse.
- Debouncing: Reduces excessive API calls in the user search functionality to improve performance.
- React: Building interactive and dynamic user interfaces.
- Tailwind CSS: For responsive design and styling.
- ShadCN: UI component design and implementation.
- Zustand: State management for efficient state handling.
- Socket.io (Client): Real-time communication with the backend.
- Node.js: Runtime environment for the backend server.
- Express.js: Framework for server-side routing and logic.
- Socket.io (Server): Real-time communication with the frontend.
- Redis: For managing server instance communication and caching.
- MongoDB & Mongoose: For database management and schema design.
To get your chat application up and running, follow these steps:
First, clone the repository to your local machine:
git clone https://github.com/shivvang/chat_app_but_better.git
cd chat_app_but_betterSet up both the frontend and backend components by navigating to each directory and installing dependencies:
# Navigate to the client directory
cd client
npm install
# Navigate to the server directory
cd ../server
npm installRedis is used for managing data between server instances. Follow these steps to set it up:
For Linux Users:
-
Install Redis:
sudo apt-get update sudo apt-get install redis-server
-
Start the Redis server:
redis-server
For Windows Users:
Use Windows Subsystem for Linux (WSL) to install Redis:
- Install WSL and a Linux distribution (e.g., Ubuntu) from the Microsoft Store.
- Open the WSL terminal and follow the Linux instructions to install Redis.
Start the frontend, backend, and Redis server:
Frontend:
Navigate to the client directory and run:
npm run devBackend:
Navigate to the server directory and run:
npm startRedis:
Run the Redis CLI (in the WSL terminal if on Windows):
redis-cliHappy coding and enjoy building with your chat application! ๐