Project Info
This project did not submit a demo video on Devpost.
Inspiration
Every university student knows the feeling: you're lost in a 300-person lecture, too afraid to raise your hand, and office hours are packed. Professors want to help every student individually, but there simply aren't enough hours in the day. We asked ourselves — what if every student could have a 1-on-1 session with their professor, powered by AI, right inside Zoom? Google Drive with demo video and more materials about this project: https://drive.google.com/drive/folders/1erRwy80BjeV3pBOeuafkrem6VlTP2hqX?usp=sharing
What it does
LectureFlow takes a professor's live lecture and turns it into a full, personalized learning experience — all delivered through Zoom, the platform students and professors already use. The pipeline works like this: Lecture In — A professor delivers their lecture over Zoom as they normally would. LectureFlow captures the audio and video via Zoom's Real-Time Media Streams (RTMS) API, transcribes it, and uses an LLM to break the content into discrete conceptual scenes. Animated Explainers Out — For each concept, the system automatically generates a 3Blue1Brown-style Manim animation with voice-cloned narration from the professor. These aren't generic — they're visual explanations tailored to the specific ideas covered in that day's lecture. Quizzes Linked to Concepts — From those same concepts, the system generates multiple-choice quiz questions. Each question is tied back to the explainer video that covers it. Students type /quiz in Zoom Team Chat and get an adaptive quiz — when they answer wrong, they watch the specific 2-minute animated explanation for that concept before moving on. AI Professor in Every Breakout Room — Using HeyGen's Interactive Avatar SDK, we clone the professor's face and voice into a lifelike AI avatar deployed via LiveKit streaming. LectureFlow creates Zoom breakout rooms and places a personalized AI tutor in each one. The avatar has full context of that day's lecture material — updated in real-time from RTMS transcripts — uses Socratic questioning, and adapts to each student's pace. Because it looks and sounds like their actual professor, students engage with it naturally rather than treating it like a generic chatbot. Real-Time Professor Dashboard — The professor monitors everything from an Electron app: live transcripts from the lecture, quiz performance across the class, and which concepts students are struggling with. Live Student Sentiment — By running expression recognition models on periodically sampled video frames from Zoom's RTMS feed, LectureFlow gives professors a real-time, aggregated view of classroom engagement — surfacing confusion, disengagement, or frustration as it happens, not after the fact. The key insight is that everything flows from the same source material — that day's lecture. The lecture produces the concepts, the concepts produce the animations, the animations back the quizzes, the quizzes inform the tutoring, and the professor sees it all in one place. For demo purposes at TreeHacks, we use YouTube lecture links as input since we can't host a live lecture on the spot — but the pipeline is the same regardless of whether the audio comes from a live Zoom session or a recording.
How we built it
LectureFlow is four microservices working together: Manim Video Pipeline (Python + asyncio) — Ingests lecture audio, transcribes with Whisper, uses an LLM to plan conceptual scenes, generates Manim animation code for each, renders in parallel, and stitches them with voice-cloned narration (ElevenLabs/PocketTTS). Quiz questions are generated from the same scene plan, each linked back to its explainer video. Python Backend (FastAPI) — The orchestration layer. Manages session lifecycle, creates HeyGen interactive avatar sessions with real-time lecture context, serves adaptive quizzes through a Zoom Team Chat chatbot, processes video frames for student sentiment analysis, and stores everything in a SQLAlchemy database. Zoom RTMS Bridge (Node.js on Render) — A Render-hosted service that receives Zoom webhooks, opens Real-Time Media Stream connections to live meetings, and forwards transcript chunks, chat messages, and video frames to the Python backend over HTTP and WebSocket. It also triggers quiz DMs to students when they first speak in the meeting. Render was essential here — it gave us a publicly reachable endpoint for Zoom webhooks, solving the NAT traversal problem, while relaying events over WebSocket to our local backend. Electron App (React + TypeScript) — The professor's control center. Create sessions, monitor live transcripts in real-time, trigger quizzes, interact with HeyGen avatars, and review class-wide analytics — all in a frosted-glass UI.
Challenges we ran into
Manim Code Generation — LLMs frequently generate Manim code that doesn't compile. We built a retry system with error feedback loops, parallel rendering with semaphores, and fallback strategies to keep the pipeline robust. Zoom RTMS Integration — Getting real-time audio, video, and transcripts out of Zoom required navigating the RTMS WebSocket protocol — handling media handshakes with S2S OAuth signatures, parsing mixed audio/video/transcript/chat message types, and maintaining persistent connections with keep-alive heartbeats every 100ms. HeyGen Avatar Context Injection — Making the HeyGen avatar feel like a real extension of the professor meant continuously injecting lecture context from RTMS transcripts into the avatar's knowledge base mid-session, so it could reference what was just taught moments ago rather than relying on static prompts. Unifying the Pipeline — The hardest design problem was making the concept graph the single source of truth. Scene planning, video generation, quiz questions, and tutoring context all needed to reference the same conceptual breakdown of the lecture, so changes upstream propagate cleanly. Interactive Team Chat Quizzes — Building a stateful, per-student quiz experience inside Zoom Team Chat meant managing quiz sessions across webhook-driven interactions — tracking progress, handling button clicks for A/B/C/D answers, generating follow-up questions on wrong answers, and linking back to the exact explainer video for each concept.
Accomplishments we're proud of
A single pipeline that takes one lecture and produces animated explainers, targeted quizzes, and personalized AI tutoring — all interconnected Real-time lecture understanding via Zoom RTMS that feeds transcripts directly into HeyGen avatar context, so the AI tutor always knows what was just taught — not a static bot, but one that evolves with the lecture A fully automated system that generates 3Blue1Brown-quality animated videos with voice-cloned narration from any lecture An interactive quiz system inside Zoom Team Chat that plays the exact explainer video for concepts a student gets wrong Live student sentiment analysis from RTMS video frames, giving professors real-time engagement visibility ~11,000 lines of production-quality code across Python, TypeScript, and JavaScript — built in one weekend
What we learned
Zoom's API ecosystem is remarkably deep — RTMS for live media, Team Chat for interactive bots, S2S OAuth for server integration — and once you understand how the pieces fit together, it enables workflows that wouldn't be possible on any other platform. HeyGen's Interactive Avatar SDK made something possible that we couldn't have built from scratch in a weekend: a real-time, lifelike video avatar that students actually want to talk to. The ability to inject context mid-session was the key to making it feel like a real tutor, not a canned demo. Render gave us instant public deployment for our RTMS bridge — no infrastructure headaches, just a webhook URL that worked. For a hackathon, that speed matters. LLM-generated code (especially Manim) needs robust validation and retry mechanisms; you can't trust it to compile on the first try. The biggest leverage in an AI education tool isn't any single feature — it's making them share the same conceptual backbone so the experience feels cohesive, not like five disconnected tools.
What's next
RAG-Powered Context Engine — Letting professors upload syllabi, textbooks, and slides so the AI tutor can reference specific course materials during conversations. On-the-Fly Quiz Generation — Generating quizzes from live lecture transcripts in real-time, closing the loop even further. Multi-Language Support — Translating explainer videos and avatar responses for international students. Production Deployment — Dockerized horizontal scaling with PostgreSQL and a polished onboarding flow for professors.
AI Professor - Scalable Personalized Education
Transform any lecture into an interactive AI-powered learning experience with avatar tutors, auto-generated quizzes, and 3Blue1Brown-style explainer videos.
The Problem
Professors can't give personalized 1-on-1 attention to hundreds of students. Office hours are limited, and students often struggle with concepts without immediate help.
Our Solution
An AI-powered professor toolkit that:
- Clones the professor as an AI avatar that can tutor students individually
- Generates animated explainers from any lecture (3Blue1Brown style)
- Creates interactive quizzes delivered via Zoom Team Chat
- Provides real-time analytics on student understanding
Features
1. HeyGen AI Avatar Tutoring
- Professor's likeness cloned as interactive AI avatar
- Real-time lip-sync and natural conversation
- Joins Zoom breakout rooms to tutor students 1-on-1
- Context-aware responses using lecture transcripts
2. Manim Video Generation Pipeline
Turn any YouTube lecture into animated educational content:
YouTube URL → Transcribe → Scene Split → Manim Animations → Voice Clone → Final Video
- Whisper transcription via Dedalus API
- LLM scene planning - intelligently splits lectures into concept-based scenes
- Auto-generated Manim code - creates 3Blue1Brown-style animations
- Voice cloning with PocketTTS - maintains the professor's voice
- Parallel rendering - generates multiple scenes concurrently
3. Interactive Quiz System
- Zoom Team Chat Chatbot - students type
/makequizto start - Auto-generated questions from lecture concepts using Cerebras LLM
- Interactive button cards - A/B/C/D answer buttons
- Video on wrong answer - plays the relevant Manim explainer scene
- Progress tracking - scores and concepts to review
4. Real-Time Meeting Integration
- Zoom RTMS (Real-Time Media Streams) for live transcription
- WebSocket architecture - Render service broadcasts to local dashboard
- Live transcript accumulation per meeting
- Demeanor/engagement analysis (extensible)
5. Professor Dashboard
- Frosted glass Electron UI
- One-click session start
- Real-time student analytics
- Quiz trigger buttons
- Meeting management
Architecture
┌─────────────────────────────────────────────────────────────────────────────────┐
│ PROFESSOR DASHBOARD │
│ (Electron + React + Tailwind) │
└───────────────────────────────────┬─────────────────────────────────────────────┘
│ WebSocket
▼
┌─────────────────────────────────────────────────────────────────────────────────┐
│ PYTHON BACKEND │
│ (FastAPI + SQLite) │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ Zoom API │ │ HeyGen API │ │ Cerebras LLM│ │ Quiz Session Manager │ │
│ │ (meetings) │ │ (avatars) │ │ (generation)│ │ (state per student) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────────────────┘ │
└───────────────────────────────────┬─────────────────────────────────────────────┘
│
┌───────────────────────────┼───────────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Zoom Meeting │ │ Render (RTMS) │ │ Zoom Team Chat │
│ │◄───────►│ Node.js │◄───────►│ Chatbot │
│ - Breakouts │ RTMS │ - Webhooks │ WS │ - /makequiz │
│ - Avatars │ WS │ - Transcripts │ │ - Buttons │
└───────────────┘ └─────────────────┘ └─────────────────┘
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | Electron, React, TypeScript, Tailwind CSS |
| Backend | Python 3.11+, FastAPI, SQLAlchemy, asyncio |
| RTMS Service | Node.js, Express, WebSocket |
| Video Pipeline | Manim, FFmpeg, PocketTTS |
| Database | SQLite (dev), PostgreSQL (prod) |
| Deployment | Render (cloud), uv (Python pkg mgmt) |
APIs & Services
| Service | Purpose |
|---|---|
| Zoom REST API | Meeting creation, breakout rooms, user management |
| Zoom RTMS | Real-time audio/video/transcript streams |
| Zoom Team Chat | Chatbot for interactive quizzes |
| HeyGen | AI avatar generation and streaming |
| Deepgram | Speech-to-text, text-to-speech |
| Cerebras | Fast LLM inference (Llama 3.3 70B) |
| Dedalus | Whisper API for transcription |
| PocketTTS | Voice cloning for narration |
| HuggingFace | Model hosting for TTS |
Project Structure
TreeHacks2026/
├── src/ # Manim video pipeline
│ ├── pipeline.py # Main orchestration
│ ├── downloader.py # YouTube audio download
│ ├── transcribe.py # Whisper transcription
│ ├── scene_splitter.py # LLM-based scene planning
│ ├── clip_generator.py # Manim code generation
│ ├── voice.py # TTS with voice cloning
│ └── stitcher.py # Final video assembly
│
├── backend/ # Python backend
│ ├── app.py # FastAPI main app
│ ├── run_chatbot_client.py # Quiz WebSocket client
│ ├── services/
│ │ ├── render_ws_client.py # Connects to Render WebSocket
│ │ ├── chatbot_ws_handler.py # Handles /makequiz commands
│ │ ├── quiz_generator.py # LLM quiz generation
│ │ ├── quiz_session_manager.py # Per-student quiz state
│ │ ├── zoom_chatbot_service.py # Zoom API message sending
│ │ ├── heygen_controller.py # Avatar management
│ │ ├── session_orchestrator.py # Meeting lifecycle
│ │ └── llm_service.py # Cerebras/OpenAI wrapper
│ └── models/ # SQLAlchemy models
│
├── rtms-zoom-official/ # Render-deployed Node.js service
│ ├── index.js # Express + webhook handlers
│ ├── frontendWss.js # WebSocket broadcasting
│ └── library/ # RTMS SDK wrappers
│
├── frontend/ # Electron app (if separate)
│
├── outputs/ # Generated content (gitignored)
│ └── {topic-name}/
│ ├── audio.mp3
│ ├── transcript.txt
│ ├── scene_plan.json
│ ├── quiz_questions.json
│ └── videos/
│
├── prompts/ # LLM prompt templates
│
└── docs/ # Documentation
├── QUIZ_INTEGRATION.md # Quiz system guide
├── QUICKSTART.md
└── DEPLOYMENT.md
Quick Start
Prerequisites
- Python 3.11+
- Node.js 18+
- uv (Python package manager)
- FFmpeg
- LaTeX (for Manim)
1. Clone and Install
git clone https://github.com/ChristmasSun/TreeHacks2026.git
cd TreeHacks2026
# Python dependencies
uv sync
# Node dependencies (for RTMS service)
cd rtms-zoom-official && npm install && cd ..
2. Configure Environment
# Backend
cp backend/.env.example backend/.env
# Edit backend/.env with your API keys
# RTMS Service
cp rtms-zoom-official/.env.example rtms-zoom-official/.env
# Edit with Zoom credentials
Required API keys:
ZOOM_CLIENT_ID,ZOOM_CLIENT_SECRET,ZOOM_ACCOUNT_IDZOOM_CHATBOT_CLIENT_ID,ZOOM_CHATBOT_CLIENT_SECRET,ZOOM_BOT_JIDHEYGEN_API_KEYCEREBRAS_API_KEYDEDALUS_API_KEYHF_TOKEN(HuggingFace for PocketTTS)
3. Generate Videos from a Lecture
export DEDALUS_API_KEY="your-key"
export HF_TOKEN="your-huggingface-token"
uv run python -c "
import asyncio
from src.pipeline import run
asyncio.run(run(
'https://www.youtube.com/watch?v=YOUR_VIDEO_ID',
'outputs/your-topic',
clip_concurrency=4
))
"
4. Run the Quiz Chatbot
# Set quiz data directory
export QUIZ_DATA_DIR=outputs/your-topic
# Start the WebSocket client
python backend/run_chatbot_client.py
Then in Zoom Team Chat, message your bot with /makequiz.
5. Run the Full System
# Terminal 1: Backend
cd backend && uvicorn app:app --reload --host 0.0.0.0 --port 8000
# Terminal 2: RTMS Service (or deploy to Render)
cd rtms-zoom-official && node index.js
# Terminal 3: Frontend
npm run dev
How It Works
Video Generation Flow
- Download - Extracts audio from YouTube video
- Transcribe - Whisper API converts speech to text with timestamps
- Scene Split - LLM analyzes transcript, identifies key concepts, plans scenes
- Generate Code - LLM writes Manim Python code for each scene
- Voice Clone - PocketTTS extracts speaker voice sample, generates narration
- Render - Manim renders animations, FFmpeg merges with voiceover
- Stitch - Combines all scenes into final video
Quiz Flow
- User types
/makequizin Zoom Team Chat - Zoom sends webhook to Render
- Render broadcasts via WebSocket to local Python
- Python loads quiz JSON, creates session, sends intro card
- User clicks "Start Quiz" button
- Python sends first question with A/B/C/D buttons
- User clicks answer
- If wrong → Python triggers video playback, sends explanation
- If right → Python sends next question
- At end → Python sends score summary
WebSocket Architecture
Zoom Webhook → Render (HTTPS) → WebSocket broadcast → Local Python
↓
Zoom API (send messages)
This allows the Python backend to run locally while receiving Zoom events through Render.
Documentation
| Document | Description |
|---|---|
| QUIZ_INTEGRATION.md | Complete guide to video + quiz integration |
| QUICKSTART.md | Step-by-step setup guide |
| DEPLOYMENT.md | Deploy to Render |
| PLAN.md | Project roadmap and phases |
Sample Outputs
Videos generated from:
- Think Fast, Talk Smart (Stanford communication lecture) - 14 scenes
- Mathematics Gives You Wings (fluid dynamics lecture) - 16 scenes
- Human Behavioral Biology (Sapolsky lecture) - 10 scenes
Each generates:
- Animated Manim videos per concept
- Quiz questions linked to videos
- Voice-cloned narration
License
MIT
Acknowledgments
- Manim Community - Animation engine
- 3Blue1Brown - Inspiration for visual style
- Zoom Developer Platform - Meeting & chat APIs
- HeyGen - AI avatar technology
- Cerebras - Fast LLM inference
Analysis
View
Metric
- 41
- 28
- 22
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- OpenAIIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- Node.jsClaimed
10 of 11 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeConfig · Commits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
1.1 MB
Source files
175
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
ChristmasSun/TreeHacks2026
635 files · 111.9 MB · @ 863216f
Structure
Interface
6 files · 1%Screens, components and styles rendered to the user.
Application logic
246 files · 39%Domain rules, services and shared utilities.
+9 moreData & schema
3 files · 0%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python45%
- JavaScript26%
- Markdown11%
- TypeScript11%
- HTML7%
- CSS0%
- Other (2)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 21- @heygen/streaming-avatar
- livekit-client
- react
- react-dom
- ws
- zustand
- +15 more
zoom-bot-service/package.json
npm · 20- @zoom/meetingsdk
- axios
- cors
- dotenv
- electron
- express
- jsonwebtoken
- jsrsasign
- livekit-client
- playwright
- puppeteer
- uuid
- ws
- +7 more
pyproject.toml
pypi · 19- aiofiles
- aiosqlite
- dedalus_labs
- deepgram-sdk
- fastapi
- greenlet
- httpx
- manim
- openai
- pocket-tts
- python-dotenv
- scipy
- silero-vad
- sqlalchemy
- torchaudio
- torchcodec
- uvicorn
- websockets
- +1 more
expression-dashboard/pyproject.toml
pypi · 8- fastapi
- fer
- numpy
- opencv-python-headless
- pillow
- python-multipart
- setuptools
- uvicorn
rtms-zoom-official/package.json
npm · 8- @deepgram/sdk
- dotenv
- ejs
- express
- node-fetch
- openai
- uuid
- ws
rtms-zoom-official/library/javascript/rtmsManager/package.json
npm · 2- node-fetch
- ws
rtms-zoom-official/library/javascript/webSocketManager/package.json
npm · 2- node-fetch
- ws
rtms-zoom-official/library/python/requirements.txt
pypi · 2- python-dotenv
- websockets
rtms-zoom-official/library/javascript/webhookManager/package.json
npm · 1- express
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.