Skip to content
Rohith7276Public

About

An AI powered chat and stream website for making study and entertainment together and easier!

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

80 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RapidChat

Real-time Communication Platform with AI Intelligence

Node.js React MongoDB


Overview

RapidChat is a modern, full-featured communication platform combining real-time messaging, AI-powered conversations, and multimedia capabilities. Built with a scalable microservices architecture, it delivers seamless chat experiences with intelligent features.

Key Highlights

✨ Real-Time Messaging - Instant message delivery with Socket.io
πŸ€– AI Integration - Smart AI responses with RAG capabilities
πŸŽ₯ Video Calls - High-quality peer-to-peer video communication
πŸ“± Group Chat - Organize conversations in collaborative groups
πŸŽ™οΈ Voice Features - Speech-to-text and audio message support
⚑ High Performance - Redis caching and optimized queries
πŸ” Secure - JWT authentication and encrypted connections
πŸ“„ Document Support - PDF handling and processing


Tech Stack

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB
  • Cache: Redis
  • Real-time: Socket.io
  • Media: Cloudinary
  • AI/ML: Embeddings & RAG Engine

Frontend

  • Framework: React 19+
  • Build Tool: Vite
  • State Management: Redux
  • Styling: Tailwind CSS
  • Media Upload: Multer
  • HTTP Client: Axios

DevOps

  • Containerization: Docker
  • Orchestration: Docker Compose
  • Deployment: Vercel (Frontend)

Project Structure

RapidChat/
β”œβ”€β”€ backend/                  # Node.js Express Server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/      # Request handlers
β”‚   β”‚   β”œβ”€β”€ models/           # MongoDB schemas
β”‚   β”‚   β”œβ”€β”€ routes/           # API routes
β”‚   β”‚   β”œβ”€β”€ middleware/       # Auth, cache, file upload
β”‚   β”‚   β”œβ”€β”€ lib/              # Utilities & services
β”‚   β”‚   β”‚   β”œβ”€β”€ rag/          # RAG pipeline
β”‚   β”‚   β”‚   β”œβ”€β”€ socket.js     # WebSocket config
β”‚   β”‚   β”‚   β”œβ”€β”€ db.js         # Database connection
β”‚   β”‚   β”‚   └── redisClient.js # Cache layer
β”‚   β”‚   └── index.js          # App entry point
β”‚   β”œβ”€β”€ Dockerfile            # Docker config
β”‚   └── package.json          # Dependencies
β”‚
β”œβ”€β”€ frontend/                 # React Vite App
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/       # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/            # Page components
β”‚   β”‚   β”œβ”€β”€ redux/            # State management
β”‚   β”‚   β”œβ”€β”€ store/            # Custom hooks
β”‚   β”‚   β”œβ”€β”€ lib/              # Utilities
β”‚   β”‚   └── main.jsx          # App entry
β”‚   β”œβ”€β”€ vite.config.js        # Vite configuration
β”‚   └── package.json          # Dependencies
β”‚
└── readme.md                 # This file

Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB (local or Atlas)
  • Redis (optional, for caching)
  • Docker (optional)

Installation

1. Clone the Repository

git clone https://github.com/yourusername/RapidChat.git
cd RapidChat

2. Backend Setup

cd backend
npm install

# Configure environment variables
cp .env.example .env
# Edit .env with your configuration

npm run dev

3. Frontend Setup

cd frontend
npm install

# Configure environment variables
cp .env.example .env

npm run dev

4. Using Docker (Optional)

cd backend
docker-compose up --build

Environment Configuration

Backend (.env)

PORT=5000
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/rapidchat
REDIS_URL=redis://localhost:6379
CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
JWT_SECRET=your_jwt_secret

Frontend (.env)

VITE_API_URL=http://localhost:5000
VITE_SOCKET_URL=http://localhost:5000

Core Features

πŸ’¬ Real-Time Messaging

  • Send and receive messages instantly
  • Typing indicators
  • Message read receipts
  • Media sharing support

πŸ€– AI Chat

  • Context-aware responses using RAG
  • Document embeddings
  • Semantic search
  • PDF processing and Q&A

πŸ‘₯ Group Chat

  • Create and manage groups
  • Role-based permissions
  • Group notifications
  • Invite system

πŸŽ₯ Video Calling

  • Peer-to-peer video calls
  • Screen sharing capabilities
  • Call history and logs

πŸ“Š Stream Support

  • Live streaming capabilities
  • Stream management
  • Real-time broadcast

πŸŽ™οΈ Voice Features

  • Speech-to-text transcription
  • Audio message recording
  • Voice call support

API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout

Messages

  • GET /api/messages/:userId - Fetch messages
  • POST /api/messages/send - Send message
  • GET /api/messages/:messageId - Get message

Groups

  • GET /api/groups - List all groups
  • POST /api/groups/create - Create group
  • POST /api/groups/:groupId/messages - Send group message

AI

  • POST /api/ai/chat - AI chat endpoint
  • POST /api/ai/embed - Generate embeddings
  • POST /api/ai/search - Semantic search

Running Tests

cd backend
npm test

cd frontend
npm test

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Tips & Tricks

  • Performance: Enable Redis caching for faster queries
  • Scaling: Use Docker Compose for multi-container orchestration
  • Development: Hot reload enabled for both backend and frontend

THANK YOU

About

An AI powered chat and stream website for making study and entertainment together and easier!

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages