S
ai ml2026completedFeatured Project

NoteForge AI

**NoteForge AI** is an autonomous **RAG (Retrieval-Augmented Generation)** knowledge extraction engine that converts YouTube videos and audio streams into interactive **study notes, quizzes, flashcards, and mind maps**. Built with a hybrid routing architecture combining `Gemini Cloud APIs` and local `Ollama` models, it delivers zero-latency transcript slicing and resilient multi-key rate limit management.

RoleCreator & Full Stack AI Engineer
Classificationportfolio-worthy
Client / ContextOpen Source Project
Development Timeline1 month

Technical Architecture & Engineering Overview

Detailed system design and core implementation

🧠 Autonomous YouTube Knowledge Synthesis Architecture

NoteForge AI addresses the high cost and contextual latency of processing long video transcripts by implementing an Enterprise Hybrid Multi-LLM Router. High-complexity tasks—such as single-shot synthesis of flashcards, deep chapter study guides, and comprehensive quizzes—are routed to Gemini 2.5 Flash. Lightweight structural tasks—such as Table of Contents extraction and mind map branch reorganization—are delegated locally to Ollama (qwen2.5-coder), minimizing cloud API costs while maintaining instant responsiveness.

⏱️ Deterministic Transcript Slicing vs. Vector Overheads

Traditional RAG architectures rely heavily on expensive external vector databases (such as Pinecone or Weaviate) to retrieve relevant chapter context, introducing latency and risk of chunk boundary misalignment. NoteForge AI solves this through Deterministic Timestamp Slicing. By extracting native YouTube chapter timestamps and aligning transcript boundaries mathematically, the system isolates exact transcript segments with zero millisecond latency, zero computational overhead, and guaranteed contextual accuracy without hallucinations.

🛡️ Enterprise Hot-Swap Key Rotation & State Persistence

To handle unpredictable API rate limits during batch playlist processing, NoteForge AI features a Round-Robin Multi-Key Pool with automated exponential backoff powered by Bottleneck. If Key A encounters a 429 RESOURCE_EXHAUSTED error, the engine marks the key with an exhaustedUntil timestamp and seamlessly hot-swaps to Key B without interrupting active generation. Furthermore, job state and chapter progress are persisted locally via Prisma and SQLite, allowing interrupted jobs to resume instantly at the exact missing chapter.

🎨 Dynamic Headless PDF & Mind Map Render Engine

NoteForge AI provides print-ready document exports through an integrated Puppeteer headless rendering pipeline. The system dynamically injects customizable runtime CSS themes (Modern Bento, Academic Serif, Corporate Blue, and High-Contrast Dark Mode) with strict page-break-inside: avoid layout guards for inline code blocks and Mermaid diagrams.

System Diagrams & Flow Visualizations

Interactive Mermaid architecture & execution flows

Architectural Visualizer · System Architecture

Core System Features

Key capabilities & architectural features

FEATURE 01

Autonomous YouTube RAG Processing

Extracts video transcripts and metadata to synthesize deep study guides, key takeaways, and flashcards in parallel.

FEATURE 02

Hybrid Cloud & Local Model Routing

Intelligently balances workloads between Gemini Cloud API for heavy synthesis and local Ollama models for structural indexing.

FEATURE 03

Deterministic Timestamp Slicing

Slices transcript chunks precisely matching chapter timestamps without requiring vector database indexing overhead.

FEATURE 04

Multi-Key Hot-Swap API Pool

Manages round-robin rotation across multiple API keys with automated backoff cooldowns on rate limits.

FEATURE 05

Dynamic Headless PDF Styling

Renders publication-ready PDF notes with custom glassmorphic, academic, and dark themes using Puppeteer.

Engineering Challenges & Solutions

Problem statements & resolution strategies

Challenge #1

Handling API Quota Exhaustion During Long Video Processing

Synthesizing 2-hour video transcripts frequently exceeded single API key rate limits midway through generation.

Engineered Solution

Built a Bottleneck queue coupled with Prisma state persistence and round-robin key hot-swapping to guarantee uninterrupted resume capability.

Challenge #2

Eliminating RAG Chunk Misalignment

Semantic chunking often split code examples and key concepts across arbitrary token boundaries.

Engineered Solution

Replaced vector chunking with deterministic timestamp slicing using YouTube chapter markers to isolate complete logical sections.

API Reference & Endpoints

REST API surface & route documentation

METHODENDPOINT PATHDESCRIPTIONCOPY
POST/api/generateTriggers autonomous transcript extraction and chapter synthesis pipeline
POST/api/mindmapGenerates interactive hierarchical mind maps using Ollama local models
POST/api/quizSynthesizes flashcards and multiple-choice quizzes from video context
GET/api/healthReturns active server status, key pool health, and Ollama connectivity
POST/api/pdf/exportRenders print-ready PDF notes via Puppeteer headless browser

Key Code Modules & Architecture

Core file entrypoints and service responsibilities

Transcript Ingestion EngineMODULE 01
server/src/services/youtube.js

Extracts raw transcripts and chapter timestamps

Deterministic Timestamp SlicerMODULE 02
server/src/services/chunker.js

Slices transcript text by chapter boundaries

Multi-Key LLM RouterMODULE 03
server/src/services/llm-router.js

Manages round-robin API key rotation and model fallback

Puppeteer PDF Theme RendererMODULE 04
server/src/services/pdf-engine.js

Applies runtime CSS themes and renders print-ready PDFs

System FAQ & Technical Specifications

Frequently asked questions and core architecture details

Q: What technologies are used in NoteForge AI?

NoteForge AI is engineered using modern full-stack frameworks.

Q: What core engineering problem does NoteForge AI solve?

**NoteForge AI** is an autonomous **RAG (Retrieval-Augmented Generation)** knowledge extraction engine that converts YouTube videos and audio streams into interactive **study notes, quizzes, flashcards, and mind maps**. Built with a hybrid routing architecture combining `Gemini Cloud APIs` and local `Ollama` models, it delivers zero-latency transcript slicing and resilient multi-key rate limit management.

Q: How is 'Handling API Quota Exhaustion During Long Video Processing' resolved in NoteForge AI?

Built a Bottleneck queue coupled with Prisma state persistence and round-robin key hot-swapping to guarantee uninterrupted resume capability.

Related Systems & Case Studies

Explore similar technical architectures and projects

View All Systems