OpenPress

Runtime

Slides Architecture

How slide Presses are structured: Press markers, folder-per-slide source, template registry, core objects, and stable object identity.

OpenPress deliberately separates deck order, per-slide source, reusable templates, and theme CSS. That separation lets slide styles become portable packages and lets agents work on one slide at a time without editing a large monolithic deck file.

press.tsx describes order

press/<slug>/press.tsx is the deck index. It registers playback order with <Slide id="..." />; each slide’s real layout lives elsewhere.

import { Press, Slide } from "@open-press/core";

export default function SlidePress() {
  return (
    <Press slug="slide" title="Deck Title" type="slides" page="slide-16-9">
      <Slide id="cover" />
      <Slide id="agenda" />
    </Press>
  );
}

Each slide has its own source file

Each slide lives at press/<slug>/slides/<id>/slide.tsx. That file is the real visual source and usually composes Slide, Frame, Text, Line, MediaObject, and other core objects.

Folder-per-slide keeps the workflow practical:

  1. Agents can edit one slide without understanding the whole deck.
  2. Git diffs and history stay readable.
  3. Workbench actions such as add, delete, and skip map to explicit source folders.

The template registry is the portability boundary

press/<slug>/slide-style/manifest.json registers available templates. When a slide is added, the CLI or Workbench copies a selected template from slide-style/templates/<template>/ into a new slides/<id>/ folder.

That boundary matters: a style package can carry templates and theme CSS, while the deck stores the generated slide source.

Object identity is expressed with primitives

Editable objects should not be hidden inside large compound wrapper props. Templates should use core objects directly:

  • Frame uses frameKey for identity.
  • Text, Line, and MediaObject should provide stable label values in templates.
  • Use box for fixed placement. The 16:9 slide base canvas is 1920 x 1080.
  • Use Frame layout for flow constraints.
  • Put typography, color, spacing, and visual effects in theme CSS.

The engine derives full locators from these primitives for Workbench inline editing, comments, thumbnails, and preview. Authors and agents are responsible for stable local IDs and clear source structure.

See Core Object API for details.