Inspiration
AI can write code for us faster than ever, so it’s easy to ship something we don’t understand. Dense docs and unfamiliar CS concepts feel daunting, and university lectures move too fast to follow. We wanted a way to stop pretending we understand code and actually learn it, in a format you can pause, rewind and revisit at your own pace.
What it does
Paste your code or ask about any programming concept, and CodeTutor generates a narrated, animated video lesson tailored to you.
- Choose a Walkthrough or Explainer style, a programming language and a difficulty level.
- Visuals like an animated call stack show what the code is doing, with highlights that follow the narrator’s voice.
- Not clear? Regenerate the lesson simpler or deeper with one click.
- Timestamps that match the video outline let you jump back to any moment, and a practice problem with hints and graded feedback checks that you really got it.
How we built it
CodeTutor is a Next.js + TypeScript + Tailwind app. When you submit a topic or paste code, it runs a four-stage pipeline: a Planner outlines the lesson, a Script writer turns the outline into scenes, a Checker verifies that the narration matches the code and the highlighted lines (and triggers a rewrite if not), and then the narration is voiced. Every lesson is a Zod-validated JSON schema, so the video, transcript, timestamps and practice problems all come from one source of truth.
- Featherless powers the LLM behind the Planner, Writer, Checker and practice grading, through its OpenAI-compatible API.
- ElevenLabs provides the narrator voice. Its word-level timestamps let the highlighted code line follow the words the narrator is saying.
- Remotion renders the video live in the browser with no render server. Scenes include syntax-highlighted code (Shiki), captions, array diagrams and an animated call stack that grows, hits the base case and unwinds. We split the work into four lanes (frontend, AI, video, audio/integration) with agreed folder ownership, and merged at hourly checkpoints.
Challenges we ran into
- Speed. Planning, writing, checking, voicing and rendering one lesson took a minute or more, and a loading screen that faked its steps felt dishonest. We switched to streaming real progress from the API and cached demo lessons as a fallback.
- Syncing video to voice. Even highlight timing looked off, so we moved to ElevenLabs word timestamps so each highlight lands when the narrator names it. AI accuracy. The LLM sometimes got line numbers or facts wrong. Adding the Checker step and tuning prompts on our demo topics fixed most of it.
- Teamwork in 24 hours. Several people needed to edit shared files like the lesson API route and video component, so we agreed to announce edits before touching them. We still hit merge conflicts, and one accidental breaking dependency upgrade.
- API limits. Free credits are finite, so we cached narration per scene and prepared lessons that run without any internet.
Accomplishments that we're proud of
- A lesson goes from a typed question to a narrated, animated video in about a minute, with real loading stages.
- The call stack animation really does show recursion growing and unwinding, which is much easier to understand than a paragraph of text.
- Highlights that follow the narrator’s voice.
- A full learning loop: watch, practice, get graded with hints, and re-generate the lesson simpler or deeper.
- Shipping all of it as a team of four, in one day.
What we learned
- Splitting AI output into small steps (plan, write, check) gives much better lessons than one giant prompt.
- A strict shared schema is what lets four people build in parallel.
- Good teaching needs constraints: short sentences, one analogy, and a recap.
- Always have a fallback, such as caching, since demos and APIs both fail at the worst moment.
What's next for CodeTutor
- Follow-up chat so you can ask the tutor questions mid-lesson.
- More diagram types (trees, graphs, linked lists, sorting visualizations).
- “Explain my codebase”: upload a repo and get a guided video tour.
- Lecture mode: paste a university lecture’s slides or notes and get a revisitable video.
- More languages, voices and personalised learning paths.
Built With
- databricks
- elevenlabs
- featherless
- next
- react
- remotion
- tailwindcss