Purrx

What you'll build: an AI PowerPoint generator

Tour the AI PowerPoint generator you'll build from scratch with Gemini and LangChain: how it works, why it's designed this way, and how the course gets you there.

7 min+15 XP

By the end of this course you'll have built an AI PowerPoint generator. Someone types "why small factories are adopting cobots", and a few seconds later downloads a real, editable file: a title slide, bullet points, cards, big numbers and a closing slide, all laid out cleanly.

It's not a demo. You'll also build the parts that make it hold up with real users: retries when the model is busy, a backup model when it's down, streaming progress, tests that run without an API key, and limits that protect your bill.

A six-slide deck written with components and compiled by the course engine. This is the level of output the finished project produces.

How it works

The tool has two halves, and the split between them is the most important idea in the course.

With AI (Gemini)

Topic

“cobots in small factories”

Research

Google Search, optional

Outline

structured JSON

SlideML

<CardsSlide>…

Without AI (your engine)

Parse

text → tree

Components + theme

short tags → layout

Layout + text fitting

exact boxes

.pptx file

pptxgenjs

Everything you'll build. The model only writes words and structure; deterministic code does all the geometry.
  • The AI half plans the deck and writes it in , a small layout language you'll design. It says what goes on each slide and how it's organized.
  • The engine half is plain JavaScript with no AI in it. It works out exactly where every box goes, shrinks text that doesn't fit, applies the theme, and writes the file.

Language models are good at words and structure, and bad at geometry. So we never ask them for geometry. You'll see why in the lesson on why coordinates fail.

How the course works

  1. One project, built a step at a time. Each lesson adds one file or one function, and you only learn a couple of new ideas at once.
  2. You always see the whole project. Exercises open with your file plus every file you've written so far, in tabs, so you can see how the pieces connect.
  3. Your code runs for real. Press Run and the checks tell you what works. When your code produces slides, you see them. When it produces a .pptx, you can download it and open it in PowerPoint.
  4. Stuck? Every exercise has step-by-step TODOs, hints you can reveal one at a time, and a solution.

The route

  1. Start here, then PowerPoint files, a layout language and the layout engine (modules 1 to 4)
  2. Fitting text, themes and components (modules 5 and 6)
  3. Generating decks with Gemini, then with LangChain (modules 7 and 8)
  4. Making it production grade: reliability, cost, speed, safety and testing (modules 9 to 11)
  5. Shipping it as a web app you can run yourself (module 12)
Going deeper — how this relates to the PPTX Lab

The PPTX Lab on this site runs the full production version of this design. It adds more components, image generation, headers and footers, and patches to the PowerPoint XML for things pptxgenjs can't do. The architecture is the same one you'll build here: a layout language, a deterministic engine, and a resilient pipeline around the model.

Key takeaways

  • You'll build a real tool: type a topic, get an editable .pptx file.
  • The model writes words and structure; your own code does all the geometry.
  • Each lesson adds one small piece to one project, and you see every file as it grows.

Sign in to run the exercise

Reading is free. Writing code here needs an account so we have somewhere to keep your Gemini key and the +15 XP you are about to earn.