OpenPress

Runtime

Slides Architecture

How slide presses are structured — folder-per-slide, an ordered index, SlideMeta, and build-time objectId injection.

In OpenPress, the architectural design of slides (presentations) deliberately deviates from the traditional approach of a single, long file, opting instead for a highly modular directory structure. This design involves profound considerations behind the scenes, particularly to accommodate the working models of AI Agents.

The Folder-Per-Slide Philosophy

OpenPress slides adopt a “Folder-per-slide” concept. Each slide is an independent directory possessing its own logic and styling.

Why not write it all in the same file?

  1. Reduced Cognitive Load: For an AI Agent (or a human developer), understanding and modifying a thousand-line presentation file all at once is extremely error-prone. Isolating slides into folders allows focus to concentrate on the content and logic of a single slide.
  2. Structured Metadata: Each slide is not just a visual presentation; it also carries its own metadata. This information contains layout intent, a one-line summary, key takeaways, and even plain text descriptions of visual elements. This hidden information provides rich context for AI Agents, enabling them to assist with design and typography more intelligently.
  3. Clear Ownership and Isolation: Different slides do not interfere with each other. This isolation makes parallel collaboration and version control much easier and safer.

Separation of Order and Indexing

Since slides are dispersed across different directories, how does the system know their playback order?

This relies on a specialized “index file.” This file is the backbone of the entire presentation; its sole responsibility is to define the sequence of the slides. When slides need to be reordered, or specific slides skipped for a particular occasion, we only need to modify this structural index, without ever dynamically moving the slide directories themselves. This maintains the stability of the physical files.

Build-Time Smart Injection

To provide fluid inline editing and commenting during the development phase (Workbench), the system needs to precisely identify the boundaries of each slide on the screen.

OpenPress chooses to automatically inject these identifiers via the compiler at “build time,” rather than requiring the author to manually add markers on the root element of every slide. This not only keeps the source code clean but also eliminates the possibility of identifier errors caused by human oversight. It embodies the core principle of OpenPress: let the engine handle tedious correlations and bindings, so authors and Agents can focus on content and structure.