Purrx

Build a production-grade AI PowerPoint generator from scratch

Build an AI slide generator that writes real, editable .pptx files, step by step: a layout language, text fitting, themes and components, Gemini and LangChain, then retries, fallbacks, streaming and tests.

Lessons
44
Total time
~526 min
XP on offer
1430
Level
Beginner-friendly JavaScript to production
Price
Free

Syllabus

Work top to bottom, or jump straight to the gap you came here to fill.

  1. 01

    Start here

    See the tool you'll build, find out why AI can't lay out slides on its own, and tour the finished project.

  2. 02

    PowerPoint files with pptxgenjs

    Inches and points, your first generated .pptx, and the render plan every slide goes through.

  3. 03

    A layout language AI can write

    Design SlideML, write its parser, and have Gemini write your first slide in it.

  4. 04

    The layout engine

    Padding, gap and splitting space, a recursive row and column layout, and SlideML to a real .pptx.

  5. 05

    Fitting text

    Measure text with real font metrics, wrap it, shrink it to fit any box, and size boxes to their content.

  6. 06

    Themes and components

    Design tokens, React-style components with props and slots, a slide library, and compiling whole decks.

  7. 07

    Generating decks with Gemini

    Teach the model your components, plan an outline before writing, and let it repair its own mistakes.

  8. 08

    LangChain

    Chat models and messages, structured output with zod, Google Search research, and the pipeline rebuilt on LangChain.

  9. 09

    Production: reliability

    Classify errors, retry 429s with backoff and jitter, add timeouts and deadlines, and fall back when a model is down.

  10. 10

    Production: cost, speed and consistency

    Repair only broken slides, stream slides as they're written, match heading sizes, and cache decks.

  11. 11

    Production: safety, testing and visibility

    Validate input and cap model output, test with a fake model, track token usage, and enforce daily quotas.

  12. 12

    Ship it

    An API endpoint, streaming progress, a web page with live previews, and running it all on your machine.

Questions

What will I have built at the end?
A complete AI PowerPoint generator: type a topic and get a real, editable .pptx. It includes a layout engine, themes and components, a Gemini and LangChain pipeline, retries and fallback models, streaming progress, tests, and a web app you can run on your own machine.
Do I need to be an experienced developer?
No. If you can write basic JavaScript functions, you can follow along. Each lesson teaches one or two ideas, gives you step-by-step TODOs, hints you can reveal one at a time, and a solution. You always see every file you've written so far.
Why build a layout engine instead of asking the AI for slides directly?
Language models can't measure text or keep coordinates consistent, so AI-positioned slides overlap and overflow. In this course the model describes the structure, and deterministic code does the geometry, which is how reliable AI slide generators work.
Does it cover LangChain?
Yes. You build the pipeline with plain API calls first so nothing is magic, then rebuild it with LangChain chat models, structured output with zod and Google Search grounding.
What makes it production grade?
Three modules on what demos skip: telling rate limits from used-up quotas, retries with backoff and jitter, timeouts and deadlines, fallback models and circuit breakers, cheaper repairs, streaming, caching, input limits, tests with fake models, usage tracking and daily quotas.
Do I need a paid Gemini key?
No. The free tier is enough. Most exercises don't call the model at all, and the ones that do make only a few calls.
Do I need an account?
Not to read. Every lesson is free to read with no account at all. Running the exercises needs a free account, because that's where your Gemini API key and your progress are stored.