Build an AI Video-to-Quiz Tool in 3 Days: Next.js 15 + DeepSeek in Practice

Developer builds video-to-quiz tool in 3 days with Next.js and DeepSeek-V3, using timestamp constraints to prevent hallucinations.
The article describes how a self-taught developer built YouTube to Quiz AI in three days using Next.js 15, DeepSeek-V3, and the Cloudflare edge stack, turning educational lectures into interactive quizzes with timestamped explanations in 10 seconds and exporting Anki cards. The author focuses on engineering trade-offs: an edge-first stack balances TTFB and SEO; subtitle scraping uses a residential proxy pool to avoid blocking, with a paste-text fallback; and the prompt forces the model to cite exact video timestamps for each answer, using verifiability to constrain hallucinations and improve question anchoring quality. The article ultimately points out that the tool's real value lies in making active recall learning a low-friction product, rather than technical complexity itself.
From "Understood It" to "Remembered It": A Developer's Active Recall Experiment
Have you ever had this experience: you spend two hours watching a machine learning open course, nodding along the whole time, feeling like you understand every concept—and then the next day, when someone asks you for the core definition, your mind goes completely blank?
This isn't because you have a bad memory. It's the classic cognitive science phenomenon known as the "Illusion of Explanatory Depth." Passively watching videos causes rapid decay along the Ebbinghaus forgetting curve—according to cognitive research data, if you don't engage in conscious active retrieval within 48 hours, more than 70% of lecture content will be forgotten.
One self-taught developer built a small tool for this: YouTube to Quiz AI, which can turn any YouTube educational lecture into 5 interactive quiz questions with timestamped explanations in 10 seconds, and supports exporting Anki-compatible flashcards. The project went from zero to launch in just 3 days, using Next.js 15, DeepSeekAd-V3, and the Cloudflare edge stack.
This article isn't going to retell "I built a tool." Instead, it breaks down the engineering trade-offs: why DeepSeek was used for question generation, how subtitle scraping bypasses anti-bot measures, and why the "timestamp citation" detail is the key to preventing hallucinations.

Tech Stack Trade-offs: Lightweight, Fast, Indexable
The project's core requirements were clear: edge performance first, fast TTFB (Time to First Byte), and SSR that's SEO-friendly. These three goals basically determined the tech choices.
The frontend and SSR use Next.js 15's App Router, heavily leveraging Server Components so that educational knowledge base pages can be fully indexed by search engines—for a content-based tool, this directly relates to organic traffic. The styling layer uses Tailwind CSS with a dark-mode-first design to reduce visual fatigue during nighttime study sessions.
The AI inference engine is DeepSeek-V3 671B MoE. The author didn't explicitly state the reasoning, but from an engineering perspective, the MoE architecture offers a good balance between inference cost and large context handling, making it suitable for tasks like "read the entire transcript, then generate structured questions." The database and authentication use Cloudflare D1 (Serverless SQLite) plus Google OAuth 2.0, with payments integrated through Waffo Pancake. The common thread across the entire stack: no servers requiring long-term maintenance, and fast cold starts.
How It Works Under the Hood: Subtitle Scraping and Context Anchoring
Fallback Strategy for Subtitle Extraction
Most developers building YouTube subtitle scrapers write a standard crawler and quickly get their IP banned by YouTube. This project routes subtitle requests to a distributed residential proxy worker pool (via Supadata AI) to circumvent blocking.
But what's more worth learning from is its fallback design: if a video has subtitles disabled or has regional restrictions, users can directly paste lecture notes or subtitle text. This "zero-friction fallback" seems simple, but it turns a scenario that would otherwise fail outright into a usable path—for tool-type products, the experience of failure paths often determines retention more than success paths.
Constraining Hallucinations with Timestamps
The biggest risk in generating quiz questions is AI fabricating content. The author's approach is to force DeepSeek-V3 in the prompt to cite the exact timestamp in the video for each correct answer:
const prompt = `
Analyze the following YouTube transcript. Extract 5 core conceptual questions.
For each question:
1. Provide 4 plausible options (1 correct, 3 distinct distractors).
2. Attach an educational explanation.
3. Reference the exact timestamp offset where this topic is taught in the video.
`;
This constraint serves two purposes. First, verifiability: users can click on the timestamp to go back to the original video and verify, so questions are no longer a black-box output. Second, generation quality: requiring the model to locate timestamps is essentially forcing it to anchor questions to specific segments of the transcript, rather than vaguely summarizing the topic. Combined with the requirement of "1 correct option + 3 distinct distractors," the difficulty of the questions is also closer to a real quiz, rather than giveaway questions that are obvious at a glance.
MoE (Mixture of Experts) is a sparse activation model architecture: the model contains multiple "expert" sub-networks internally, but each forward inference only activates a small portion of them based on a routing mechanism. Of DeepSeek-V3's 671B total parameters, the number of parameters actually involved in computation per token is far less than that, so inference cost is significantly lower than dense models of equivalent parameter scale, while still maintaining a large context window. For tasks like "read the entire transcript and then generate structured questions" that have long inputs and high structural output requirements, MoE provides a good balance between cost and large context handling—which also explains why smaller dense models or more expensive closed-source APIs weren't chosen.
Residential proxies refer to proxy networks that use real home broadband users' IP addresses as exit points, making them harder for target sites to identify and ban compared to data center proxies. YouTube has strong anti-scraping strategies against high-frequency subtitle requests from data center IPs, so distributing requests across a residential proxy worker pool can significantly reduce the probability of any single IP being banned. The trade-off is higher cost and more variable latency, which is one reason the project also prepares a manual paste fallback path.
"Hallucination" refers to large language models generating content that seems plausible but doesn't match facts or the input. In educational question generation scenarios, typical hallucination manifestations include fabricating concepts not actually covered in the video, providing wrong answers, or having explanations disconnected from the original text. Common mitigation methods include imperative sentences in the prompt like "don't fabricate" or "only use the given material," but such instructions have limited binding force on the model and cannot be verified by users.
Timestamp citations belong to "verifiability constraints": they require every model output to include a specific reference that can be traced back to the input, which users can click to verify. Such constraints are more effective than imperative sentences because they transform "whether it's faithful to the original text" from the model's self-declaration into an externally verifiable fact, while also changing the model's generation process—to provide accurate timestamps, the model must actually locate specific segments of the transcript, rather than vaguely summarizing the topic.
Productizing Active Recall: The Big Logic Behind a Small Tool
The value of this project isn't in its technical complexity, but in how it turns a repeatedly validated learning science conclusion into a low-friction product.
The Ebbinghaus forgetting curve and Active Recall aren't new concepts—Anki users are already familiar with them. But the traditional workflow is: watch video → manually take notes → manually create cards → review, with user drop-off at every step. Compressing "video → quiz → flashcards" into a 10-second automated pipeline essentially lowers the barrier of cognitive science to near zero.
From an engineering perspective, such tools are highly replicable: one LLM call, one layer of subtitle acquisition, one frontend interaction. What's truly difficult is the details—fallback when subtitles fail, anchoring questions to the original text, export format compatibility. The author emphasizes in the original article that this was built for "self-taught developers," and this positioning also explains the choice of dark interface and Anki export: the target users are exactly those who binge open courses late at night and manage knowledge with flashcards.
The project currently offers 20 free initial credits for direct trial. For developers who want to replicate similar tools, here are a few takeaways: an edge-first stack can significantly reduce operational burden; adding verifiable citation constraints in prompts is more effective than adding a bunch of "don't fabricate" imperatives; and always prepare a manual path for worst-case scenarios.
One-line Summary
A developer built a video-to-quiz tool in three days with Next.js and DeepSeek-V3, using timestamp constraints to prevent hallucinations.
Paragraph Summary
The article describes how a self-taught developer built YouTube to Quiz AI in three days using Next.js 15, DeepSeek-V3, and the Cloudflare edge stack, turning educational lectures into interactive quizzes with timestamped explanations in 10 seconds and exporting Anki cards. The author focuses on engineering trade-offs: an edge-first stack balances TTFB and SEO; subtitle scraping uses a residential proxy pool to avoid blocking, with a paste-text fallback for unavailable subtitles; and the prompt forces the model to cite exact video timestamps for each answer, using verifiability to constrain hallucinations and improve question anchoring quality. The article ultimately points out that the tool's real value lies in making active recall learning a low-friction product, rather than technical complexity itself.
Related articles

Enterprise AI Memory Systems: The Real Cost of Bad Retrieval and Incorrect Ingestion
Analyzing the real costs of bad retrieval and incorrect ingestion in enterprise AI memory systems—from token waste to manual correction and user trust loss—with governance advice.

DIY iToF+RGB Rig: First Metric Room Map and Gaussian Splatting
A maker shares progress on a DIY iToF+RGB rig: a 320×240 iToF engineering sample paired with a Raspberry Pi camera yields the first metric room map and Gaussian splatting training. Multi-view voxel voting removes 27,675 floating points, and median edge alignment drops from 2.2px to 1.0px, though issues like dark wall loss remain.

Oura Sues Ultrahuman Again: Smart Ring Patent War Escalates
Oura sues Ultrahuman again, alleging Ring Pro infringes two patents, threatening Ultrahuman's US market return. Analysis of the lawsuit, market impact, and smart ring competition.