Skip to content

shivam222343/ETA-OTT-_V2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Eta OTT โ€” AI-Powered Educational Ecosystem

License: ISC React 19 Node.js Python Expo

Eta OTT is an AI-driven educational platform that transforms static learning material into interactive, intelligent experiences. It integrates advanced machine learning (Whisper, LLMs, Vector Search) with an OTT-style streaming interface, giving students personalized knowledge graphs, an AI tutor, real-time doubt resolution, and multi-format content extraction.


๐ŸŒŸ Key Features

Area Feature
๐Ÿง  AI Tutor Context-aware AI assistant powered by Groq Llama-3 that answers student queries grounded in the uploaded course material.
๐Ÿ•ธ๏ธ Knowledge Graph Auto-generated concept maps rendered via React-Force-Graph-2D & D3-force, backed by Neo4j.
๐ŸŽฅ Multi-Source Extraction Extract knowledge from PDFs (PyMuPDF), Videos (OpenAI Whisper), YouTube (yt-dlp), and Web pages (Playwright + BeautifulSoup).
โšก Real-Time Doubts Live synchronization and doubt solving powered by Socket.io with role-based resolution (Student โ†” Faculty).
๐Ÿ”Š Text-to-Speech High-quality speech synthesis for content via AWS Polly.
๐Ÿ“ฑ Cross-Platform Fully responsive web app + native mobile app scaffold (Expo / React Native).
๐Ÿซ Hierarchical Management Multi-level hierarchy: Institution โ†’ Branch โ†’ Course โ†’ Content, with QR-code join flows.
๐Ÿ” Semantic Search Vector-based retrieval using Qdrant for extremely accurate information lookup.
๐ŸŒ™ Dark / Light Theme Theme toggle with CSS custom properties for a premium glassmorphic UI.

๐Ÿ—๏ธ System Architecture

High-Level Architecture

graph TD
    User((Student / Faculty / Admin))

    subgraph "Frontend Clients"
        Web["eta-web<br/>(React 19 + Vite 7)"]
        Mobile["eta-mobile<br/>(Expo 51 / React Native 0.74)"]
    end

    subgraph "Core Backend โ€” Node.js / Express"
        API["Express API Gateway<br/>(8 Route Modules)"]
        WS["Socket.io<br/>Real-Time Doubts"]
        MW["Middleware Stack<br/>(Auth ยท RBAC ยท Cache ยท Upload ยท Error)"]
    end

    subgraph "ML Service โ€” Python / FastAPI"
        FastAPI["FastAPI Engine :8000"]
        PDF["PDF Extractor<br/>(PyMuPDF)"]
        Video["Video Extractor<br/>(OpenAI Whisper)"]
        YT["YouTube Extractor<br/>(yt-dlp)"]
        WebEx["Web Extractor<br/>(Playwright + BS4)"]
    end

    subgraph "Persistence Layer"
        Mongo[("MongoDB<br/>Metadata & Models")]
        Neo[("Neo4j<br/>Knowledge Graph")]
        Qdrant[("Qdrant<br/>Vector Store")]
        Redis[("Redis<br/>Caching & Sessions")]
        Cloud[("Cloudinary<br/>Media CDN")]
    end

    User <--> Web & Mobile
    Web & Mobile <--> API
    API <--> WS
    API <--> MW
    API <--> FastAPI
    FastAPI --> PDF & Video & YT & WebEx
    API <--> Mongo & Neo & Redis & Cloud
    FastAPI <--> Qdrant
Loading

Knowledge Extraction Workflow

sequenceDiagram
    participant U as User (Faculty)
    participant B as Backend (Express)
    participant C as Cloudinary CDN
    participant ML as ML Service (FastAPI)
    participant V as Qdrant Vector DB
    participant G as Neo4j Graph DB

    U->>B: Upload Content (PDF / Video / YouTube / Web URL)
    B->>C: Store media asset
    C-->>B: Return secure URL
    B->>ML: POST /extract {file_url, content_type}
    ML->>ML: Text / Transcript Extraction
    ML->>V: Store vector embeddings
    ML-->>B: Return extracted text, topics, keywords
    B->>G: Create/update concept nodes & relationships
    B-->>U: Content ready โ€” processingStatus: completed
Loading

AI Doubt Resolution Flow

sequenceDiagram
    participant S as Student
    participant B as Backend
    participant Q as Qdrant
    participant G as Neo4j
    participant LLM as Groq Llama-3

    S->>B: Ask doubt (via Socket.io or REST)
    B->>Q: Retrieve relevant context vectors
    B->>G: Fetch related concept nodes
    B->>LLM: Prompt with context + question
    LLM-->>B: Generated answer
    B-->>S: AI response (real-time via Socket.io)
    Note over B: Faculty can also reply manually
Loading

๐Ÿ› ๏ธ Tech Stack

๐Ÿ“„ For a detailed per-library breakdown with version numbers and project-specific usage, see Documents/TechStack.md.

Frontend โ€” eta-web

Category Technology Version
Framework React 19.2
Bundler Vite 7.3
Styling Tailwind CSS + PostCSS + Autoprefixer 3.4
Animations Framer Motion 10.x
Animations (Advanced) GSAP 3.12
State Management Zustand 4.4
Routing React Router DOM 6.21
HTTP Client Axios 1.6
Auth Firebase (Google OAuth) 10.7
Real-Time socket.io-client 4.6
Graph Visualization react-force-graph-2d + d3-force โ€”
Charts & Analytics Recharts 3.7
PDF Viewer react-pdf 7.6
Video Player react-player 2.13
Markdown Rendering react-markdown + remark-gfm โ€”
QR Code (Generate + Scan) qrcode.react + html5-qrcode โ€”
Toasts react-hot-toast 2.4
Icons lucide-react 0.303
Scroll Detection react-intersection-observer 10.0
Linting ESLint + react-hooks + react-refresh plugins 9.39

Backend โ€” backend

Category Technology Version
Runtime Node.js (ESM) 22
Framework Express 4.18
Real-Time Socket.io 4.6
Database (Document) Mongoose (MongoDB) 8.0
Database (Graph) neo4j-driver (Neo4j) 5.14
Database (Vector) Qdrant (via Axios REST) โ€”
Cache Redis (node-redis) 4.6
Auth (Server) Firebase Admin SDK 12.0
Auth (Local) bcryptjs + jsonwebtoken (JWT) โ€”
Security Helmet, CORS, express-rate-limit โ€”
Media Storage Cloudinary + multer-storage-cloudinary 1.41
File Upload Multer 1.4
TTS (Primary) AWS SDK โ€” Polly (@aws-sdk/client-polly) 3.988
TTS (Human-like) ElevenLabs API (eleven_multilingual_v2) โ€”
LLM Integration Groq API (Llama 3.3 70B) via Axios โ€”
Video Processing fluent-ffmpeg + @ffmpeg-installer/ffmpeg 2.1
PDF Parsing pdf-parse 1.1
PDF Generation Puppeteer (headless Chrome) 24.37
Web Scraping Cheerio 1.2
Markdown โ†’ HTML markdown-it 14.1
YouTube Search (Fallback) yt-search 2.13
QR Generation qrcode 1.5
Unique IDs nanoid 5.0
Logging Morgan 1.10
Dev: Auto-reload Nodemon 3.0
Dev: Testing Jest 29.7

ML Service โ€” ml-service

Category Technology
Framework FastAPI + Uvicorn
Validation Pydantic
Deep Learning PyTorch (CPU-only: torch, torchvision, torchaudio)
Sentence Embeddings Sentence Transformers (all-MiniLM-L6-v2)
NLP Infrastructure Hugging Face Transformers
Speech-to-Text OpenAI Whisper
PDF Extraction PyMuPDF (fitz)
Video Processing MoviePy
YouTube Download yt-dlp
Web Scraping (JS-heavy) Playwright (headless Chromium)
Web Scraping (static) BeautifulSoup4 + html2text
Document Generation fpdf2 (PDF), python-docx (Word)
Image Processing Pillow
Cloud Storage Cloudinary (Python SDK)
YouTube API google-api-python-client (YouTube Data API v3)
Environment python-dotenv, python-multipart, requests

Deployment & Containerization

Category Technology
Containerization Docker (multi-stage builds)
Orchestration Docker Compose (2 files: app + ML)
CI/CD GitHub Actions โ†’ Docker Hub โ†’ AWS EC2
Web Server / Reverse Proxy Nginx (gzip, security headers, WebSocket proxy)
Container Registry Docker Hub
SSH Deployment appleboy/ssh-action
Cloud Hosting AWS EC2 (ร—2 instances: App Server + ML Server)
Frontend Hosting (Alt) Netlify

External AI APIs

API Use in Project
Groq API (llama-3.3-70b-versatile) Primary LLM โ€” AI doubt resolution with RAG context
ElevenLabs (eleven_multilingual_v2) Human-like TTS (Hindi/English), falls back to Polly
AWS Polly (Neural) TTS with Indian accent (Aditi voice)
YouTube Data API v3 Semantic video search & recommendations
Firebase Auth Google OAuth for user authentication

Mobile โ€” eta-mobile

Category Technology Version
Framework Expo 51.0
Core React Native 0.74.5
React React 18.2
Status Scaffold / Beta โ€”

๐Ÿ—บ๏ธ Entity Relationship Diagram

erDiagram
    INSTITUTION ||--o{ BRANCH : "has many"
    BRANCH ||--o{ COURSE : "offers"
    COURSE ||--o{ CONTENT : "contains"
    INSTITUTION ||--o{ USER : "belongs to"
    BRANCH ||--o{ USER : "enrolled in"
    USER ||--o{ DOUBT : "raises"
    CONTENT ||--o{ DOUBT : "has"
    COURSE ||--o{ USER : "taught by (faculty)"
    CONTENT }o--|| USER : "uploaded by"

    USER {
        string firebaseUid PK
        string email UK
        string role "admin | faculty | student"
        object profile "name, avatar, bio, phone"
        array institutionIds FK
        array branchIds FK
        object progressStats "enrolled, completed, viewed, doubts"
        int confidenceScore "0-100, default 50"
        boolean isActive
    }

    INSTITUTION {
        string name
        string code UK
        string type "university | college | school | coaching | other"
        object address "city, state, country"
        array adminIds FK
        array facultyIds FK
        string joinCode
    }

    BRANCH {
        string name
        string code
        ObjectId institutionId FK
        array facultyIds FK
        array studentIds FK
        string joinCode
    }

    COURSE {
        string name
        string code
        array branchIds FK
        ObjectId institutionId FK
        array facultyIds FK
        array contentIds FK
        object accessRules "time-based, prerequisite-based"
        object stats "totalContent, totalStudents, totalDoubts"
    }

    CONTENT {
        string title
        string type "pdf | video | presentation | code | document | image | audio | web | other"
        object file "url, publicId, format, size, duration, pages, thumbnail"
        object metadata "author, language, tags, difficulty, category"
        object extractedData "text, summary, topics, keywords, concepts, entities, questions"
        string graphNodeId "Neo4j reference"
        string processingStatus "pending | processing | completed | failed"
        object stats "viewCount, downloadCount, averageRating, completionRate"
    }

    DOUBT {
        string question
        string answer
        string status "open | answered | resolved"
        ObjectId contentId FK
        ObjectId userId FK
    }

    NOTIFICATION {
        string type
        string message
        ObjectId userId FK
        boolean read
    }
Loading

๐Ÿ‘ฅ User Roles & Permissions

Role Capabilities
Admin Manage institutions, invite/remove faculty, view site-wide analytics.
Faculty Create & manage institutions, branches, courses. Upload content (PDF/Video/YouTube/Web). Reply to student doubts. View knowledge graphs. Generate QR codes for branch join.
Student Browse enrolled branches & courses. Watch videos, view PDFs, explore knowledge graphs. Ask doubts to AI tutor & faculty. Scan QR codes to join branches. Track progress & confidence score.

๐Ÿ“‚ Project Structure

ETA-OTT-_V2/
โ”œโ”€โ”€ backend/                          # Node.js Express API Server
โ”‚   โ”œโ”€โ”€ config/                       # Database & service configurations
โ”‚   โ”‚   โ”œโ”€โ”€ cloudinary.config.js      #   Cloudinary media CDN
โ”‚   โ”‚   โ”œโ”€โ”€ firebase.config.js        #   Firebase Admin SDK auth
โ”‚   โ”‚   โ”œโ”€โ”€ mongo.config.js           #   MongoDB connection
โ”‚   โ”‚   โ”œโ”€โ”€ neo4j.config.js           #   Neo4j graph DB driver
โ”‚   โ”‚   โ”œโ”€โ”€ qdrant.config.js          #   Qdrant vector DB client
โ”‚   โ”‚   โ””โ”€โ”€ redis.config.js           #   Redis caching layer
โ”‚   โ”œโ”€โ”€ middleware/                    # Express middlewares
โ”‚   โ”‚   โ”œโ”€โ”€ auth.middleware.js         #   Firebase token verification
โ”‚   โ”‚   โ”œโ”€โ”€ cache.middleware.js        #   Redis response caching
โ”‚   โ”‚   โ”œโ”€โ”€ error.middleware.js        #   Global error handler
โ”‚   โ”‚   โ”œโ”€โ”€ role.middleware.js         #   RBAC enforcement
โ”‚   โ”‚   โ””โ”€โ”€ upload.middleware.js       #   Multer file uploads
โ”‚   โ”œโ”€โ”€ models/                       # Mongoose schemas (7 models)
โ”‚   โ”‚   โ”œโ”€โ”€ User.model.js
โ”‚   โ”‚   โ”œโ”€โ”€ Institution.model.js
โ”‚   โ”‚   โ”œโ”€โ”€ Branch.model.js
โ”‚   โ”‚   โ”œโ”€โ”€ Course.model.js
โ”‚   โ”‚   โ”œโ”€โ”€ Content.model.js
โ”‚   โ”‚   โ”œโ”€โ”€ Doubt.model.js
โ”‚   โ”‚   โ””โ”€โ”€ Notification.model.js
โ”‚   โ”œโ”€โ”€ routes/                       # API route handlers (8 modules)
โ”‚   โ”‚   โ”œโ”€โ”€ auth.routes.js            #   /api/auth
โ”‚   โ”‚   โ”œโ”€โ”€ institution.routes.js     #   /api/institutions
โ”‚   โ”‚   โ”œโ”€โ”€ branch.routes.js          #   /api/branches
โ”‚   โ”‚   โ”œโ”€โ”€ course.routes.js          #   /api/courses
โ”‚   โ”‚   โ”œโ”€โ”€ content.routes.js         #   /api/content
โ”‚   โ”‚   โ”œโ”€โ”€ doubt.routes.js           #   /api/doubts
โ”‚   โ”‚   โ”œโ”€โ”€ analytics.routes.js       #   /api/analytics
โ”‚   โ”‚   โ””โ”€โ”€ ai.routes.js              #   /api/ai
โ”‚   โ”œโ”€โ”€ services/                     # Business logic & integrations
โ”‚   โ”‚   โ”œโ”€โ”€ ai.service.js             #   Groq LLM + Qdrant RAG pipeline
โ”‚   โ”‚   โ”œโ”€โ”€ tts.service.js            #   AWS Polly text-to-speech
โ”‚   โ”‚   โ”œโ”€โ”€ upload.service.js         #   Cloudinary upload helpers
โ”‚   โ”‚   โ”œโ”€โ”€ websocket.service.js      #   Socket.io event handlers
โ”‚   โ”‚   โ”œโ”€โ”€ extraction/               #   Content extraction pipeline
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ code.extractor.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ml.service.js         #     Calls ML Service API
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ pdf.extractor.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ video.extractor.js
โ”‚   โ”‚   โ””โ”€โ”€ graph/
โ”‚   โ”‚       โ””โ”€โ”€ content.graph.js      #   Neo4j knowledge graph logic
โ”‚   โ”œโ”€โ”€ server.js                     # App entry point
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ eta-web/                          # React 19 + Vite Web Application
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ axios.config.js       #   Axios instance with interceptors
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AITutor.jsx           #   AI chat interface
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Loader.jsx / .css     #   Animated loading spinner
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ThemeToggle.jsx       #   Dark/light mode toggle
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ faculty/              #   Faculty-specific components (16)
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ContentViewer.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CourseKnowledgeGraph.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ UploadContentModal.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ FacultyDoubtManager.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CreateInstitutionModal.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CreateBranchModal.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CreateCourseModal.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ EditBranchModal.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ EditCourseModal.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ExtractedInfoModal.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ InstitutionCard.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ BranchCard.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CourseCard.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ContentCard.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ QRCodeModal.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ JoinInstitutionModal.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ student/              #   Student-specific components (3)
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ JoinBranchModal.jsx
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ QRScanner.jsx
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ StudentDoubtManager.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ contexts/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AuthContext.jsx       #   Firebase auth context
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ThemeContext.jsx      #   Theme provider
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ useSocket.js          #   Socket.io hook
โ”‚   โ”‚   โ”œโ”€โ”€ store/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ institutionStore.js   #   Zustand store
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ LandingPage.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ LoginPage.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ SignupPage.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ admin/
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Dashboard.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ faculty/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ManageInstitution.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ManageCourseContent.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ student/
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ Dashboard.jsx
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ BranchResources.jsx
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ CourseResources.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx                   #   Router & protected routes
โ”‚   โ”‚   โ”œโ”€โ”€ main.jsx
โ”‚   โ”‚   โ””โ”€โ”€ index.css
โ”‚   โ”œโ”€โ”€ tailwind.config.js
โ”‚   โ”œโ”€โ”€ vite.config.js
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ ml-service/                       # Python FastAPI Extraction Service
โ”‚   โ”œโ”€โ”€ extractors/
โ”‚   โ”‚   โ”œโ”€โ”€ pdf_extractor.py          #   PyMuPDF-based PDF text extraction
โ”‚   โ”‚   โ”œโ”€โ”€ video_extractor.py        #   OpenAI Whisper transcription
โ”‚   โ”‚   โ”œโ”€โ”€ youtube_extractor.py      #   yt-dlp download + transcription
โ”‚   โ”‚   โ””โ”€โ”€ web_extractor.py          #   Playwright + BS4 web scraping
โ”‚   โ”œโ”€โ”€ main.py                       #   FastAPI app entry (port 8000)
โ”‚   โ””โ”€โ”€ requirements.txt
โ”‚
โ”œโ”€โ”€ eta-mobile/                       # Expo / React Native Mobile App (Beta)
โ”‚   โ”œโ”€โ”€ App.js                        #   Basic scaffold
โ”‚   โ”œโ”€โ”€ app.json
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ docs/                             # Implementation & progress docs (16 files)
โ”‚   โ”œโ”€โ”€ IMPLEMENTATION_STATUS.md
โ”‚   โ”œโ”€โ”€ BACKEND_FIXES.md
โ”‚   โ”œโ”€โ”€ CONTENT_UPLOAD_PLAN.md
โ”‚   โ”œโ”€โ”€ FACULTY_DASHBOARD.md
โ”‚   โ”œโ”€โ”€ GOOGLE_SIGNIN.md
โ”‚   โ”œโ”€โ”€ HIERARCHICAL_MANAGEMENT.md
โ”‚   โ”œโ”€โ”€ ... and more
โ”‚
โ””โ”€โ”€ README.md                         # โ† You are here

๐Ÿš€ Getting Started

Prerequisites

Requirement Version
Node.js v18+
Python v3.9+ (with pip and venv)
MongoDB Atlas or Local
Neo4j Aura or Local
Redis v6+
Qdrant Cloud or Local (required for AI features)
FFmpeg Required for video processing

1. Clone the Repository

git clone https://github.com/<your-org>/ETA-OTT-_V2.git
cd ETA-OTT-_V2

2. ML Service Setup (Python)

cd ml-service

# Create & activate virtual environment
python -m venv venv
source venv/bin/activate        # Linux / macOS
# venv\Scripts\activate         # Windows

# Install dependencies (includes PyTorch, Whisper, Playwright)
pip install -r requirements.txt

# Install Playwright browsers (required for web extraction)
playwright install

# Start the extraction service on port 8000
python main.py

3. Backend Setup (Node.js)

cd backend

# Install dependencies
npm install

# Create your .env file (see Environment Configuration below)
cp .env.example .env   # then fill in values

# Start in development mode (uses nodemon)
npm run dev

Backend runs on http://localhost:5000 by default.

4. Frontend Setup (React + Vite)

cd eta-web

# Install dependencies
npm install

# Start dev server
npm run dev

Frontend runs on http://localhost:5173 by default.

5. Mobile App Setup (Expo โ€” Beta)

cd eta-mobile

# Install dependencies
npm install

# Start Expo dev server
npm start
# or for specific platform:
# npm run android
# npm run ios

๐Ÿ› ๏ธ Environment Configuration

Backend .env

# โ”€โ”€ Server โ”€โ”€
PORT=5000
NODE_ENV=development
ALLOWED_ORIGINS=http://localhost:5173

# โ”€โ”€ MongoDB โ”€โ”€
MONGODB_URI=mongodb+srv://<user>:<pass>@cluster.mongodb.net/eta-ott

# โ”€โ”€ Redis โ”€โ”€
REDIS_URL=redis://localhost:6379

# โ”€โ”€ Neo4j โ”€โ”€
NEO4J_URI=neo4j+s://<id>.databases.neo4j.io
NEO4J_USER=neo4j
NEO4J_PASSWORD=<password>

# โ”€โ”€ Qdrant โ”€โ”€
QDRANT_URL=https://<id>.qdrant.io
QDRANT_API_KEY=<api-key>

# โ”€โ”€ Cloudinary โ”€โ”€
CLOUDINARY_CLOUD_NAME=<cloud-name>
CLOUDINARY_API_KEY=<api-key>
CLOUDINARY_API_SECRET=<api-secret>

# โ”€โ”€ Firebase Admin SDK โ”€โ”€
FIREBASE_PROJECT_ID=<project-id>
FIREBASE_CLIENT_EMAIL=<service-account-email>
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"

# โ”€โ”€ Groq AI (LLM) โ”€โ”€
GROQ_API_KEY=<groq-api-key>

# โ”€โ”€ AWS Polly (TTS) โ”€โ”€
AWS_ACCESS_KEY_ID=<aws-key>
AWS_SECRET_ACCESS_KEY=<aws-secret>
AWS_REGION=us-east-1

# โ”€โ”€ ML Service โ”€โ”€
ML_SERVICE_URL=http://localhost:8000

# โ”€โ”€ Rate Limiting (production) โ”€โ”€
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100

Frontend .env

VITE_API_URL=http://localhost:5000
VITE_FIREBASE_API_KEY=<firebase-api-key>
VITE_FIREBASE_AUTH_DOMAIN=<project>.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=<project-id>

๐ŸŒ API Endpoints

Prefix Module Description
GET /health Server Health check & uptime
/api/auth auth.routes.js Firebase auth โ€” register, login, profile
/api/institutions institution.routes.js CRUD institutions, join codes, QR
/api/branches branch.routes.js CRUD branches, student enrollment
/api/courses course.routes.js CRUD courses, faculty assignment
/api/content content.routes.js Upload, extract, view, rate content
/api/doubts doubt.routes.js Create, answer, resolve doubts
/api/analytics analytics.routes.js Dashboard stats & metrics
/api/ai ai.routes.js AI tutor queries, TTS generation

๐Ÿ’ก How It Works โ€” The AI Pipeline

flowchart LR
    A[/"๐Ÿ“„ Upload PDF ยท ๐ŸŽฅ Video ยท ๐Ÿ”— YouTube ยท ๐ŸŒ Web URL"/] --> B["โ˜๏ธ Cloudinary<br/>Media Storage"]
    B --> C["โš™๏ธ Backend calls<br/>ML Service /extract"]
    C --> D{"Content Type?"}
    D -->|PDF| E["PyMuPDF<br/>OCR + Text"]
    D -->|Video| F["OpenAI Whisper<br/>Transcription"]
    D -->|YouTube| G["yt-dlp Download<br/>โ†’ Whisper"]
    D -->|Web| H["Playwright<br/>โ†’ BS4 Parse"]
    E & F & G & H --> I["๐Ÿ“Š Chunk Text<br/>โ†’ Vector Embeddings"]
    I --> J[("๐Ÿ”ฎ Qdrant<br/>Vector Store")]
    I --> K["๐Ÿท๏ธ Extract Entities<br/>Topics & Keywords"]
    K --> L[("๐Ÿ•ธ๏ธ Neo4j<br/>Knowledge Graph")]
    J & L --> M["๐Ÿค– Query Phase:<br/>Student asks doubt"]
    M --> N["Retrieve context from<br/>Qdrant + Neo4j"]
    N --> O["๐Ÿง  Groq Llama-3<br/>Generate Answer"]
    O --> P["๐Ÿ’ฌ Response sent<br/>via Socket.io"]
Loading
  1. Ingestion โ€” Faculty uploads a PDF, Video, YouTube link, or Web URL โ†’ stored on Cloudinary.
  2. Extraction โ€” Backend calls ml-service โ†’ dispatches to the correct extractor.
  3. NLP Processing โ€” PyMuPDF (PDFs), OpenAI Whisper (Videos/Audio), yt-dlp + Whisper (YouTube), Playwright + BS4 (Web).
  4. Vectorization โ€” Extracted text is chunked and stored in Qdrant with high-dimensional embeddings.
  5. Graph Construction โ€” Named entities and concepts are pushed to Neo4j as nodes and relationships.
  6. Query Phase โ€” When a student asks a doubt, the backend retrieves relevant context from Qdrant & Neo4j, then feeds it to Groq Llama-3 to generate a precise, source-grounded answer.

๐ŸŽจ Design & UX

  • Glassmorphic UI โ€” Transparent, layered components with backdrop-blur effects for a modern, premium feel.
  • Micro-Interactions โ€” Hover effects and fluid transitions powered by Framer Motion & GSAP.
  • Dark/Light Mode โ€” Full theme system with CSS custom properties, toggled via ThemeContext.
  • Responsive Layouts โ€” Seamless adaptation from desktop to mobile viewports via Tailwind breakpoints.
  • Role-Specific Dashboards โ€” Dedicated UIs for Students, Faculty, and Admins.

๐Ÿ—‚๏ธ Available Scripts

Backend

npm run dev      # Start with nodemon (hot-reload)
npm start        # Production start
npm test         # Run Jest tests

Frontend

npm run dev      # Vite dev server (HMR)
npm run build    # Production build
npm run preview  # Preview production build
npm run lint     # ESLint check

ML Service

python main.py   # Start FastAPI on port 8000

Mobile

npm start            # Expo dev server
npm run android      # Launch Android
npm run ios          # Launch iOS
npm run web          # Launch web preview

๐Ÿ›ฃ๏ธ Roadmap

  • Live Collaboration โ€” Shared whiteboards for faculty and students.
  • Gamification โ€” Badges and progression levels based on confidence scores.
  • Offline Mode โ€” Download content for offline viewing on the mobile app.
  • Multi-Language Support โ€” AI translation for transcripts and documents.
  • Full Mobile App โ€” Complete feature parity with the web application.
  • Advanced Analytics โ€” Per-student learning path tracking & recommendations.

๐Ÿ“„ License

This project is licensed under the ISC License.


Built for the future of education. ๐Ÿš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors