You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AI-powered course generation platform that turns any topic into a structured learning experience — powered by Amazon Nova, grounded in real textbooks via MCP.
Overview
Most AI learning tools generate shallow, generic content with no grounding in real material. TheTutor is different — it discovers real textbooks through a custom MCP pipeline, then uses Amazon Nova to synthesize structured courses grounded in actual published material. Every lesson includes quizzes, exercises, source citations, and curated video resources.
Full course from a single topic — modules, lessons, quizzes, exercises, and video resources generated end-to-end
Grounded in real textbooks — a custom MCP server discovers and parses books from OpenLibrary, Gutendex, and Standard Ebooks so content is sourced, not hallucinated
Real-time generation — watch your course build live via Server-Sent Events with per-lesson progress updates
Crash-resilient pipeline — two-pass parallel lesson generation with automatic recovery from interrupted jobs
Voice read-aloud — synchronized text highlighting as lessons are narrated via AWS Polly
AI lesson assistant — ask follow-up questions in context while studying any lesson
AI-graded quizzes — open-ended answers evaluated by Nova, not just multiple choice
Course certificates — earn and download certificates on completion
Community learning — explore, enroll in, and learn from courses published by others
One-click Google OAuth. Secure JWT cookie auth, no passwords.
2. Chat
Tell the AI tutor what you want to learn. It asks about your level, goals, and study preferences to tailor the course to you.
3. Generate
TheTutor discovers real books via MCP, builds a structured outline, and generates every lesson — with quizzes, exercises, citations, and videos — all streamed to you in real time.
4. Learn
Study at your own pace with voice narration, text highlighting, an AI assistant for questions, and earn a certificate when you finish.
Google OAuth 2.0 (Passport.js) + JWT httpOnly cookie auth
Media
YouTube Data API, AWS Polly (text-to-speech)
Architecture
flowchart LR
U[User] --> FE[Next.js Frontend]
FE --> PX[proxy.ts Middleware]
FE -->|REST + SSE| BE[Express Backend]
BE --> DB[(MongoDB)]
BE --> REDIS[(Upstash Redis)]
BE -->|AI SDK| NOVA[Amazon Bedrock: Nova]
BE -->|HTTP| MCP[Further-MCP Server]
MCP --> SRC[OpenLibrary + Gutendex + Standard Ebooks]
BE --> YT[YouTube Data API]
BE --> POLLY[AWS Polly TTS]
Loading
Auth Flow
sequenceDiagram
participant User
participant FE as Frontend
participant BE as Backend
participant Google
User->>FE: Click "Continue with Google"
FE->>BE: GET /auth/google
BE->>Google: OAuth redirect
Google-->>BE: Callback with auth code
BE->>BE: Create/find user, sign JWT
BE->>FE: Redirect to /api/auth/callback?token=JWT
FE->>FE: Set frontend-domain cookie, redirect
FE->>FE: proxy.ts reads JWT for route protection
Loading
Course Generation Pipeline
The generation pipeline uses a job-based architecture with 4 phases, crash recovery, and real-time SSE broadcasting:
sequenceDiagram
participant User
participant FE as Frontend
participant API as Backend
participant MCP as Further-MCP
participant Nova as Amazon Nova
participant DB as MongoDB
User->>FE: Confirm subject → Click Generate
FE->>API: POST /course/generate
API-->>FE: { jobId }
FE->>API: GET /course/jobs/:jobId/events (SSE)
Note over API: Phase 1: MCP Discovery
API->>MCP: discover_books + fetch_and_parse
MCP-->>API: Book contexts + source refs
Note over API: Phase 2: Outline
API->>Nova: Generate structured outline (retry 2×)
Nova-->>API: CourseOutline JSON
API-->>FE: SSE: outline_done
Note over API: Phase 3: Parallel Lesson Gen
loop p-limit(4) parallel + sequential fallback
API->>Nova: Generate lesson content
Nova-->>API: Lesson markdown + quiz + citations
API->>DB: Atomic $set on curriculum[i].lessons[j]
API-->>FE: SSE: lesson_done
end
Note over API: Phase 4: Video Enrichment
loop p-limit(6) parallel
API->>API: YouTube search per lesson
API->>DB: Update videoReferences
end
API-->>FE: SSE: complete
API->>DB: Finalize course, create enrollment
Loading
Key Pipeline Files
File
Purpose
backend/src/services/course/jobRunner.ts
4-phase pipeline orchestrator with crash recovery
backend/src/services/course/lessonGen.ts
Single lesson content generation (markdown + quiz + exercises)
backend/src/services/course/outline.ts
Structured course outline generation
backend/src/services/mcp/discovery.ts
MCP book discovery + parsing pipeline
backend/src/services/sse/broadcaster.ts
SSE client management + broadcasting
backend/src/config/ai.ts
Nova model config per generation phase
Further-MCP
TheTutor uses a custom MCP server built specifically for this project so Amazon Nova can discover, fetch, and parse real books before generating course content — ensuring lessons are grounded in actual published material, not hallucinated.
Further-MCP combines OpenLibrary discovery with EPUB/PDF parsing and exposes both FastAPI routes and FastMCP tools. In TheTutor, this powers book discovery and content extraction during course generation.
Capability
What Further-MCP Provides
How TheTutor Uses It
Discovery
OpenLibrary + Gutendex + Standard Ebooks aggregation
Finds high-signal books for a learner's topic
Parsing
EPUB/PDF metadata, TOC, chapter extraction
Feeds structured source context to Nova for grounded content
Interfaces
FastAPI + FastMCP pack
Works for HTTP pipelines and MCP tool mode
Hosting
Railway deployment
Production-ready MCP endpoint for the generation flow