Skip to content

GauravGavhane18/CollabLearn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

CollabLearn: Real-time AI Collaborative Platform

A full-stack collaborative learning platform featuring Real-time Video Calls, Chat, RAG-based AI Assistance, and Image Understanding.

Built with MERN Stack (React, Node.js, Express, MongoDB), Socket.IO (Real-time), WebRTC (Video), and Python (FastAPI, Groq/Gemini).

🚀 Features

1. Collaborative Workspace

  • Real-time Chat: Instant messaging with code block support.
  • Video Conferencing: Peer-to-peer video calling (Mesh topology).
  • Live Room Management: Join/Leave synchronized rooms.

2. SmartAssist AI (RAG Pipeline)

  • Contextual Hints: The AI monitors the session topic and suggests learning materials.
  • RAG (Retrieval-Augmented Generation): Upload PDFs (/rag/upload) to verify context-aware answers.
  • Chatbot: Ask @ai [question] triggers the AI (powered by Gemini or Groq).

3. Vision & Image Analysis

  • Image Understanding: Upload images during chat.
  • Educational Explainers: The AI analyzes the image (e.g., a diagram) and explains the concept automatically.

🛠️ Tech Stack

  • Frontend: React (Vite), TailwindCSS, Zustand (State), Simple-Peer (WebRTC), Framer Motion.
  • Backend: Node.js, Express, Socket.IO.
  • AI Service: Python (FastAPI), PyPDF, Sentence-Transformers, OpenAI Compatible Clients (Groq/Gemini).
  • Database: MongoDB (Local or Atlas).

🏁 Quick Start

1. Prerequisites

  • Node.js (v18+)
  • Python (3.9+)
  • MongoDB (Running locally or cloud URI)

2. Setup & Install

Install Frontend Dependencies

cd client
npm install

Install Backend Dependencies

cd server
npm install

Install AI Service Dependencies

cd ai-service
pip install fastapi uvicorn sentence-transformers python-multipart pypdf google-generativeai openai numpy requests

3. Run the Platform

Step 1: Start Backend (Port 5002) In Terminal 1:

cd server
node index.js

Step 2: Start AI Service (Port 8000) In Terminal 2:

cd ai-service
python main.py

(Ensure you have set your API Key in main.py)

Step 3: Start Frontend (Vite) In Terminal 3:

cd client
npm run dev

Open http://localhost:5173 (or the port shown) in your browser.


🧪 Testing the Features

🎥 WebRTC Video

  1. Open the app in two different browser tabs (or windows).
  2. Join with two different names (e.g., Alice and Bob) into the same Room ID.
  3. Grant Camera/Mic permissions.
  4. You should see each other's video stream automatically.

🤖 RAG & Chat AI

  1. Type @ai explain binary search in the chat.
  2. Verify the AI responds with a concise explanation.

🖼️ Image Analysis (API)

You can test the endpoint using Postman or Curl: POST http://localhost:8000/image/analyze with a file field.


📂 Architecture

/
├── client/         # React SPA (Vite)
│   ├── src/pages   # Lobby, Room
│   ├── src/store   # Zustand (Socket + WebRTC Logic)
│   └── src/comp... # Chat, SmartAssist UI
├── server/         # Node.js Express + Socket.IO
│   └── index.js    # Signaling Server & API
└── ai-service/     # Python FastAPI Microservice
    └── main.py     # RAG Logic, Gemini/Groq wrapper

About

Built a real-time collaborative platform supporting 10+ concurrent users via Express, React, Node. • Developed SmartAssist, a Python-powered RAG-based system providing live context hints. • Integrated lightweight ML to analyze queries, enhancing personalized learning experiences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors