Project Info
What is Mentora Mentora is a voice-interactive AI tutor designed to replicate the experience of learning from a human. It combines a context-aware language model with an infinite canvas workspace and real-time Text-to-Speech to provide explanations that are both auditory and visual. Mentora listens to spoken questions, transcribes them, generates step-by-step solutions (guided or direct), and produces synchronized visual aids such as LaTeX, graphs, code blocks, diagrams, and videos. Everything is coordinated so narration, visuals, and object references stay in sync, allowing learners to follow along naturally, just like in a live tutoring session.
Inspiration
Voice agents often lack visual material to build full understanding. When we learn from a person, _they don’t just talk. _ They draw, gesture, highlight, and point to things as they explain. We wanted to recreate that dynamic: the feeling of someone explaining with both words and visuals, like a human conversation that unfolds naturally on a whiteboard or canvas.
How we built it
Mentora has a central streaming orchestrator that coordinates model output, tool execution, and audio generation, while the object generator and layout engine render visual content on the canvas. Session data is managed in-memory for fast iteration, and modular API endpoints connect the system’s components to deliver synchronized voice and visuals. We used Next.js, TypeScript, and Claude Sonnet 4.5 as the teaching agent, supported by OpenAI Whisper for transcription and OpenAI TTS-1 for speech synthesis. To give the system depth, we integrated many, many Model Context Protocols (MCPs), allowing Mentora to interface with specialized “brains” for different domains math reasoning, coding, biology, or diagram creation. Each MCP module handles its own type of thinking but stays unified through the orchestrator, so Mentora can switch contexts intelligently mid-conversation. This setup enables guided reasoning, thinking aloud, explaining step-by-step, and referencing prior context like a human tutor would. The result feels less like talking to a tool, and more like learning from a friend who sketches, speaks, and reasons with you in real time. Accomplishments that we're proud of Built a multimodal RAG system using ChromaDB that retrieves contextual text, equations, and visuals based on the user’s question, highlighted objects, and conversation history, allowing the tutor to reference prior discussions and provide explanations with rich continuity. Designed a dynamic canvas engine that renders LaTeX, graphs, code, and diagrams on demand, intelligently aligning visuals with narration and feeding new objects back into ChromaDB for future context. Engineered a sophisticated streaming orchestrator that coordinates Claude’s grounded response generation, TTS, and live canvas updates, ensuring smooth, interactive tutoring sessions while automatically ingesting new conversation turns and canvas content into ChromaDB. What we learned RAG Systems and Context Management: Using ChromaDB for retrieval-augmented generation taught us the importance of structuring conversation history, highlighted objects, and visual references so the AI can provide grounded, accurate responses and expand on user selected components. Real-Time Orchestration Challenges: Streaming responses while synchronizing TTS, canvas updates, and AI output highlighted the complexity of building low-latency, live interactive systems. User-Centered Design: Supporting guided (Socratic) and direct modes showed us how flexibility in teaching style improves engagement and understanding. Scalable Architecture Principles: Implementing modular components like the context builder, canvas engine, and streaming orchestrator emphasized maintainability, testability, and future expansion.
Challenges we ran into
Wifi was slow
What's next
In the future, we plan to integrate Claude with more MCP tools so it can better generate diagrams and animations. We also plan for Mentora to highlight the specific parts of the current context and canvas objects it references, clearly showing which prior information it is using in its explanations.
Mentora - Voice-Interactive AI Mentor with a Spatial Memory Canvas
Complete full-stack Agentic tutoring platform using multimodal RAG and MCPs to explain, visualize, and remember like a human mentor.
Architecture
Full-Stack Application:
- Frontend: React + Next.js + D3.js (Port 3001)
- Backend: Next.js API Routes + Claude AI (Port 3000)
- Docker: Multi-service containerized deployment
Features
- Voice-Interactive Teaching Agent: Powered by Claude Sonnet 4.5
- Canvas Object Management: Create and manage LaTeX equations, graphs, code blocks, diagrams, and text
- Session Management: Track teaching sessions with full conversation history
- Context-Aware: References highlighted objects and maintains spatial awareness
- TTS & Transcription: OpenAI Whisper for speech-to-text and TTS-1 for text-to-speech
- Socratic Teaching: Guides students with questions rather than direct answers (configurable)
- Multi-Modal RAG (NEW): ChromaDB-powered knowledge retrieval from past sessions and canvas objects
Tech Stack
- Framework: Next.js 14 (App Router)
- Language: TypeScript (strict mode)
- LLM: Claude Sonnet 4.5 (Anthropic)
- Transcription: OpenAI Whisper API
- TTS: OpenAI TTS-1
- Storage: In-memory (Map) + ChromaDB for RAG
- Vector DB: ChromaDB for multi-modal embeddings
- Docker: Multi-stage builds for dev and production
Prerequisites
- Node.js 20+
- Docker and Docker Compose (optional)
- OpenAI API key
- Anthropic API key
Quick Start
1. Clone and Install
cd Mentora
npm install
2. Configure Environment
cp .env.example .env
Edit .env and add your API keys:
# Required API Keys
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
# Basic Configuration
NODE_ENV=development
LOG_LEVEL=info
# Optional: Enable RAG (Retrieval-Augmented Generation)
ENABLE_RAG=true
CHROMADB_URL=http://chromadb:8000
RAG_AUTO_INGEST=true
3. Run Full Stack Application
Option A: Full Stack with Docker (Recommended)
docker-compose up
- Frontend: http://localhost:3001
- Backend API: http://localhost:3000
Option B: Backend Only (for API development)
npm run dev
- Backend API runs at http://localhost:3000
Option C: Frontend Separately (for UI development)
cd apps/web
npm install
npm run dev
- Frontend runs at http://localhost:3001
4. Test Health Check
curl http://localhost:3000/api/health
Expected response:
{
"status": "ok",
"timestamp": 1234567890,
"version": "0.1.0"
}
MCP Integration Guide
Model Context Protocol (MCP) integration for Mentora - enabling specialized brains with tool access.
Last Updated: 2025-10-25
Overview
Mentora includes a complete MCP client layer connecting to multiple MCP servers, enabling:
- Sequential Thinking: Structured step-by-step problem solving
- Manim Animations: Mathematical visualizations (Docker-based)
- Python Execution: Diagram and visualization generation (Docker-based)
- Biology Diagram Generator: Curated biology schematics (via Python MCP)
- GitHub Integration: Code search and repository access
- Figma Integration: Design file and component access
Architecture
┌─────────────────────────────────────────────────────────┐
│ Mentora Backend │
│ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ MCP Connection Manager │ │
│ │ • Manages all MCP server connections │ │
│ │ • Handles reconnection and health checks │ │
│ │ • Routes tool calls to appropriate servers │ │
│ └────────────────────────────────────────────────────┘ │
│ │ │
│ ┌───────────────┼──────────────┬────────────┐ │
│ ▼ ▼ ▼ ▼ │
│ ┌───────────┐ ┌────────────┐ ┌─────────┐ ┌────────┐│
│ │Sequential │ │ Manim │ │ Python │ │GitHub ││
│ │ Thinking │ │ MCP │ │ MCP │ │ MCP ││
│ │(stdio/npx)│ │ (HTTP) │ │ (HTTP) │ │(stdio) ││
│ └───────────┘ └────────────┘ └─────────┘ └────────┘│
└─────────────────────────────────────────────────────────┘
Components Implemented
- Core MCP Client (
lib/mcp/client.ts): Manages single MCP server connection, tool discovery, and execution - Connection Manager (
lib/mcp/manager.ts): Orchestrates all MCP connections, automatic reconnections, unified status reporting - Configuration (
lib/mcp/config.ts): Server registry with transport types and enable flags - Type Definitions (
types/mcp.ts): TypeScript types for server configs, tools, requests/responses - Initialization (
lib/mcp/init.ts): Lazy initialization, singleton pattern, graceful failure handling
API Endpoints
GET /api/mcp/status – Returns status of all MCP servers
POST /api/mcp/call – Calls a tool on an MCP server
Setup Instructions
- Sequential Thinking: Works out of the box via npx
- GitHub Integration: Requires Personal Access Token in
.env - Figma Integration: Requires Personal Access Token in
.env - Manim MCP: Docker container pending
- Python MCP: Docker container pending
Next Steps
- Docker containers for Manim and Python MCPs
- Specialized Brain implementations
- Multimodal memory integration (ChromaDB)
- Agent orchestrator to route requests
ChromaDB RAG Integration
Retrieval-Augmented Generation (RAG) enhances AI responses by retrieving relevant context from past conversations and canvas objects.
Architecture
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Next.js │ HTTP │ Python RAG │ HTTP │ ChromaDB │
│ Backend │ ──────> │ Service │ ──────> │ (Vector DB)│
│ (Port 3000)│ │ (Port 8006) │ │ (Port 8005) │
└─────────────┘ └─────────────┘ └─────────────┘
│
│ OpenAI API
▼
┌─────────────┐
│ OpenAI │
│ Embeddings │
└─────────────┘
Quick Start
- Set API keys (
OPENAI_API_KEY,ANTHROPIC_API_KEY) in.env - Run with RAG:
docker-compose --profile rag up -d
- Frontend: http://localhost:3001 Backend API: http://localhost:3000
Testing RAG
/health– Check service health/stats– Collection statistics/ingest– Add documents/search– Retrieve similar documents
Check logs if issues arise:
docker logs mentora-rag-service --tail 50 -f
Configuration
.envsettings:RAG_TOP_K,RAG_MIN_RELEVANCE_SCORE,ENABLE_RAG,CHROMADB_URL, etc.- Adjust search precision and context amount with
RAG_TOP_KandRAG_MIN_RELEVANCE_SCORE
Data Persistence
- Stored in Docker volume:
mentora_chromadb-data - Backup/restore via
docker run+tar
Security Notes
- Dev: No authentication, ports exposed to localhost only
- Prod: Enable ChromaDB auth, API keys, internal networks, encrypted secrets
Version Compatibility
- ChromaDB Server/Client:
0.5.23 - OpenAI Python SDK:
1.57.2 - FastAPI:
0.115.5
Teaching Agent API Endpoints
- Sessions: Create, list, retrieve details
- QA: Ask questions and receive responses
- Canvas Management: Create, update, highlight objects
- Voice Interaction: Stream audio to/from TTS and Whisper
Analysis
View
Metric
- 66
- 41
- 31
- 19
- 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
- AnthropicIn code
- CSSIn code
- FastAPIIn code
- JavaScriptIn code
- Next.jsIn code
- OpenAIIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- DockerClaimed
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
158
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
MarkShi17/Mentora
191 files · 12.6 MB · @ 03dc022
Structure
Interface
35 files · 18%Screens, components and styles rendered to the user.
API & routing
14 files · 7%Request entry points: routes, handlers and controllers.
Application logic
67 files · 35%Domain rules, services and shared utilities.
+6 more
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
- TypeScript67%
- Markdown21%
- Python8%
- JavaScript2%
- Shell1%
- YAML1%
- Other (1)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
apps/web/package.json
npm · 33- @radix-ui/react-dialog
- @radix-ui/react-slot
- @tanstack/react-query
- @types/katex
- class-variance-authority
- clsx
- d3
- framer-motion
- immer
- katex
- lucide-react
- next
- react
- react-dom
- react-markdown
- react-syntax-highlighter
- rehype-katex
- remark-gfm
- +15 more
package.json
npm · 11- @anthropic-ai/sdk
- @modelcontextprotocol/sdk
- next
- openai
- react
- react-dom
- +5 more
docker/python-mcp/requirements.txt
pypi · 8- aiohttp
- matplotlib
- numpy
- pandas
- pillow
- plotly
- scipy
- seaborn
docker/rag-service/requirements.txt
pypi · 6- chromadb
- fastapi
- openai
- pydantic
- python-multipart
- uvicorn[standard]
docker/chatmol-mcp/requirements.txt
pypi · 2- aiohttp
- biopython
docker/biorender-mcp/requirements.txt
pypi · 1- aiohttp
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.