Step 1: Set Things Up
Let’s start by getting Presenton up and running locally.Clone the Repository
Open your terminal and run:Start Presenton
You can run Presenton in two ways: Option A: Docker (recommended for quick setup)Step 2: Understand How Templates Work
Presenton organizes slide designs into template groups. Each template group contains one or more slide layouts and asettings.json file that describes the group’s behavior.
Where Templates Live
All templates are located in:- Docker:
servers/nextjs/app/presentation-templates - Electron:
electron/servers/nextjs/app/presentation-templates
general, neo-general, modern, standard, swift).
Explore a Template Group
Pick any template folder (e.g.,general) and open it. Here’s what you’ll find:
settings.json: Contains metadata about the template group: description, whether slides are ordered, and whether it’s the default template.- One or more
.tsxfiles: Each file defines a single slide layout, including its Zod schema (used by the AI to generate content) and the React component that renders the slide.
.tsx file must export:
Schema— Zod schema defining the slide datalayoutId— Unique identifier for the layoutlayoutName— Display name in the UIlayoutDescription— Description for the AI to match content- Default export — The React component that renders the slide
Preview Templates in the UI
To see all available presentation templates and their slide layouts in your browser, go to: http://localhost:5000/template-preview This preview page gives you a visual overview of each template group and lets you inspect how each slide layout looks when used. When generating a presentation, you’ll be able to pick from these templates in the Outlines and Templates step of the process.Step 3: Build Your Own Template
Now it’s time to create a custom template of your own.Create a New Template Directory
In thepresentation-templates folder, create a new directory. This will be your template group.
💡 The folder name (e.g., my-presentation-template) becomes the template ID used in the app.
Add a settings.json File
Create a file named settings.json with:
description: Short description of this template group.ordered: Iftrue, slides are used in a fixed order (see How Slides Are Selected below). Keepfalsefor AI-driven layout selection.default: Iftrue, this template is used by default when generating a presentation.
⚠️ Use boolean values (true/false), not strings ("true"/"false").
Step 4: Add Your First Slide Layout
Create a Layout File
Create a new.tsx file for your first slide:
ExampleSlideLayoutTemplate.tsx in the presentation-templates folder as a minimal starting point, or copy from an existing layout like general/BasicInfoSlideLayout.tsx.
Define Schema and Component
Each slide layout needs:- A Zod schema — tells the AI what data this slide expects.
- A React component — renders the slide visually.
✨ Tips:
- Use
.default()on each schema field so the preview renders correctly.- Use
.meta({ description: "..." })to help the AI generate better content.- Keep a consistent 16:9 aspect ratio and max-width of 1280px — layouts are exported as PDF and PPTX.
Step 5: Register Your Template in the App
Templates are not auto-discovered. You must register them inpresentation-templates/index.tsx. The file is organized into five steps — follow them in order:
Step 5.1: Import Your Layouts
Find the// TODO: Step 1: Import All templates Layouts Here section and add your layout import:
Step 5.2: Import Your Settings
Find the// TODO: Step 2: Import template settings Here section and add:
Step 5.3: Create Template Entries
Find the// TODO: Step 3: Create template entries for each template section and add your template array:
Step 5.4: Add to allLayouts
Find the// TODO: Step 4: Combine all templates into a single array For UseCases section and add your layouts to allLayouts:
Step 5.5: Add to templates
Find the// TODO: Step 5: Combine all templates into a single array For UseCases section and add your template group to the templates array:
Step 6: Preview Your Template
Visit: http://localhost:5000/template-preview You should see your template group listed. Click on it to preview your slide layout. Your template is now ready to use. Select it in the Outlines and Templates step when generating a presentation.Adding More Slides to Your Template
Add another slide layout with title, description, image, and icon.Create a New Layout File
Define the Schema with Image and Icon
UseImageSchema and IconSchema from the default schemes for AI-generated images and icons:
🖼️ ImageSchema and IconSchema are required for AI-generated images and icons. They ensure compatibility with PDF and PPTX export.
Register the New Layout
Inindex.tsx, add the import in Step 1 and the createTemplateEntry call in Step 3 (myTemplateLayouts array):
Preview
Visit http://localhost:5000/template-preview — both slides should appear under your template.Naming Layouts for Better AI Matching
Use descriptive filenames so the AI can choose the right layout for each slide. For example:TitleDescriptionSlide.tsxTitleDescriptionImageIconSlide.tsx
SlideLayout1.tsx or SlideLayout2.tsx.
How Slides Are Selected in a Template
When generating a presentation, Presenton selects a slide layout for each slide from the layouts in your template group.AI-Driven Selection (ordered: false)
With ordered: false (default), the AI picks the best layout for each slide based on content. Descriptive layoutName and layoutDescription help improve matching.
Fixed Order (ordered: true)
To force a specific layout order, set ordered: true in settings.json:
myTemplateLayouts array in index.tsx — the first layout is slide 1, the second is slide 2, and so on. You can also use numeric prefixes in filenames (e.g., 1-TitleSlide.tsx, 2-ContentSlide.tsx) to keep the order clear.
Layout Best Practices
- Aspect ratio: Use
aspect-video(16:9) andmax-w-[1280px] max-h-[720px]for consistent export. - Defaults: Every schema field should have a
.default()for preview and fallbacks. - Meta descriptions: Add
.meta({ description: "..." })to help the AI. - Validation: Use
.min()and.max()on strings and arrays. - Theme variables: Use CSS variables like
var(--background-color),var(--primary-color),var(--heading-font-family)for theme support. - Optional branding: Support
__companyName__and_logo_url__indatafor company branding when provided.
ExampleSlideLayout.tsx and existing layouts in general/, neo-general/, and other template folders.