1. Home
  2. Guides
  3. The deck format

The deck format

Updated ยท Markdown

One presentation is one JSON document. The editor, the API and your AI all read and write this same document.

The complete, always current list of every layout, question type and field is generated by the server itself:

This page explains the ideas.


The whole shape

{
  "format": "stoa.deck/1",
  "title": "AI for Creative People",
  "aspect": "16:9",
  "theme": { "preset": "aurora", "accent": "#4FE3CE" },
  "settings": { "reactions": ["heart", "laugh", "wow", "mindblown", "fire"] },
  "sources": { "src_x1": { "kind": "pdf", "name": "talk.pdf", "pages": 18 } },
  "interactions": {
    "mood": {
      "type": "choice",
      "prompt": "How are you feeling?",
      "style": "stickers",
      "options": [
        { "id": "sleepy", "label": "Sleepy", "glyph": "sleepy" },
        { "id": "party", "label": "Party", "glyph": "party" }
      ]
    }
  },
  "slides": [
    { "id": "s_cover", "stage": { "type": "image", "src": "/a/u1/abc.webp" } },
    {
      "id": "s_mood",
      "stage": { "type": "results", "interaction": "mood", "view": "stickers" },
      "phone": { "type": "ask", "interaction": "mood" },
      "notes": "Watch the pit fill. Point at the biggest pile."
    }
  ]
}

Only what you chose is stored. Everything else has a default.

Two settings keep the room safe. "filter": true (the default, "Filter bad words") filters a name, a word, a question or a custom screen's answer with a swear word or slur: it waits until the presenter shows it, and a filtered name shows as "Guest 12". Each open question, Q&A, custom question and poll with its own option ("other") has its own "filter" too, on by default: its answers are filtered only while both are on. "blocked": ["acme"] ("Also filter these words") filters anything starting with words of the deck's own, even with a filter off. Photos and voice notes wait for approval by default ("moderate": true on the question).

"mouse": true lets coded slides take the mouse on the big screen (off by default: a click on the edge moves the show). A coded slide's own stage.mouse says true or false for that slide.

"display" says how the big screen and the console reach the room. They show everything either way. "standard" uses a WebSocket wherever the network allows one, and plain HTTPS where it does not, by itself. "safe" is HTTPS only: they never even try a WebSocket, for company laptops on a network that must not see one, and the stage link is the one for strict networks (/stage/safe/<session>). "auto", the default, does what the presenter's account says (Settings, The big screen). The links a session hands out follow it, and so does a stage already open.

"settings": { "display": "safe" }

Slides

Each slide has:

FieldWhat it is
idStable. Letters first. Made for you if missing.
stageThe big screen: a layout and its fields.
phoneWhat phones show. Missing means "look up".
phoneByStepChange what phones show from a later beat: { "1": {...} }.
overlayLive results on top of any slide: { "interaction", "place", "view" }.
notesSpeaker notes. Only the presenter sees them.
titleA label for the slide list.
transitionHow this slide arrives, in place of the deck's: { "type": "zoom" }, or a design of its own (see How slides change).
cameraWhere your own video sits on this slide, in place of the deck's: { "place": "full" } (see Your video).
layersWords and pictures placed anywhere on the slide, over whatever it is (see Layers).
skipKeep it, never show it.

Layouts (stage.type)

title, statement, takeaway, bullets, quote, number, split, image, qr, join, results, leaderboard, embed, countdown, video, custom (your own HTML, sandboxed, with the library kit), blank, and html (a page of an imported coded deck: source, index, steps, and mouse to take the mouse on the big screen or not, where the deck's settings.mouse says otherwise).

A custom slide is your own HTML and script on the big screen: three.js, GSAP, Motion and more from the kit, boxed in but free. It builds in beats (data-step), draws the room's answers (Stage.on('data'), the big screen's public roll-up, in the console too) and sends cues to the phones (Stage.broadcast). It opens no new windows and saves no files, and neither does a coded deck. See Coded decks.

A custom slide and an embed can carry a thumb, a picture you uploaded ("thumb": "/a/..."): thumbnails (the editor, the console, the slide overview) show it in place of a plain box. A coded slide's thumb comes from its upload (data-thumb, or Keynote's own picture of it).

Slides build one beat at a time where it makes sense: a statement reveals one line per arrow press, a bullets list one item per press, a video one part per press (it plays on to its next pause point).

A video can be one part of a longer file, so a deck exported as a video can be a slide per part:

{ "type": "video", "src": "/a/u/deck.mp4", "from": 4.8, "to": 12.1,
  "poster": "/a/u/part-1.webp", "thumb": "/a/u/part-2.webp" }
FieldMeaning
srcThe video file.
stopsPause points, in seconds. Only those between from and to count.
from, toThe part of the file this slide plays, in seconds. Missing: the start, the end.
posterA picture of how it starts, shown before it plays.
thumbA picture of how it ends, for thumbnails and phones.
muted, loop, fitNo sound; loop the last part; contain or cover.

The big screen keeps one player per file, so parts of the same file follow each other without reloading.

Text can use two marks: a new line, and *emphasis*, which lights the word in the theme's accent.

Layers: words and pictures anywhere

Any slide can carry layers: text boxes and pictures placed anywhere on it, over whatever the slide already is. A photo added to a title slide, a note written over an imported PDF page, a logo over a coded slide. The slide stays what it was; its layers sit over it.

"layers": [
  { "id": "l_k3m9", "type": "text", "text": "Ask *early*", "x": 8, "y": 70, "w": 44,
    "size": 3.2, "font": "display", "color": "accent" },
  { "id": "l_p2q7", "type": "image", "src": "/a/u/photo.webp", "x": 58, "y": 12, "w": 34, "h": 52,
    "fit": "cover", "radius": 2, "step": 1 }
]
FieldMeans
idIts own id, letters first, so a patch can address it: /slides/@s_x/layers/@l_k3m9/x.
typetext or image.
x, yWhere its top left corner is, as % of the slide's width and height.
w, hIts width and height, as % of the slide's. A picture needs h; words grow to fit without it.
rotate, opacityTurned, in degrees; see-through, 0 to 1.
stepThe press it arrives on, like a line of a statement (1 is the first press after the slide lands). It adds beats to the slide if it needs them, except on a coded slide or a video, whose beats are their own.
textThe words. A new line, and *a word* in stars lit in the accent, as everywhere.
sizeThe words' size, as % of the slide's width: 3 reads well, 6 is a headline.
fontdisplay, body, heavy or mono: the deck's own fonts.
bold, italic, align, lhtrue; left, center or right; the line height.
colorThe words' colour: one of the look's (ink, dim, faint, accent, accent2, accent3, gold, ground, surface, line, white, black), or a hex colour.
bgA plate behind the words, the box's own size, in the same colours. It covers what is under them: how the editor changes the words on an imported page.
src, fit, radius, altA picture: its address (upload it first), cover (fills its box) or contain, rounded corners as % of the slide's width, and a few words describing it.

They stack in the order listed: the last is on top. Up to 40 on a slide. Live results on top (overlay) and the join code stay above them. With the morph transition, a layer with the same id on the slide before and after glides from one place and size to the other.

A page brought in from a PDF keeps where its words are, in its import's own folder: words.json (read it with GET /decks/{id}/sources/{source}/files/words.json). Each page is a list of blocks, { t, x, y, w, h, s, a, b, lh, n }: the words, their box as % of the page, their size as % of its width, how they line up, whether they are bold, their line height and how many lines. That is what the editor uses to cover a block with new words, in place.

Phone views (phone.type)

follow, ask, card, mirror, results, custom.

An ask can show its question closed, for a reveal:

{ "type": "ask", "interaction": "pick", "closed": true }

Each phone keeps the question with that person's own answer, and takes nothing: answers close on that beat. A question that is "open": "always" still takes answers elsewhere, never on this screen. Phones mark it on #main with data-open="0" (and "1" while a question takes answers), for your CSS.

A card holds blocks, top to bottom: text, image, button, social, file.

A custom view is your own HTML, run in a sealed sandbox on every phone, with the library kit. Room.send(value) in it saves an answer (any JSON, up to 4 KB) to its interaction, which is a question of type custom ("pick": { "type": "custom" } in interactions). An answer with an bad word in any string, keys too, is filtered: it waits for the presenter. The phone keeps an answer until the room has it, even when the phone closes the page under it (iPhones do, while somebody is in another app): the next page sends it again, and the screen gets it back as Room.answer, so it can resume where they were. Room.emit(name, data) sends a live cue to the big screen, and Room.on('data', fn) hears the room's answers when phones may see them. Room.me.name is the person's own name, as the room shows it: empty until they give one, and while the room keeps it hidden. A screen never hears anybody else's. fill: true uses the whole screen; source and src run a page from an uploaded folder instead of inline HTML. Phone screens are sealed: they reach only the kit, the deck's own files and a font service, and are never allowed to ask for a password, a card number or a one-time code. No downloads, no popups, no dialogs; people long-press a picture to save it.

How slides change

settings.transition sets the deck's default move between slides; a slide's own transition overrides it. Each names a transition, with an optional duration in milliseconds: { "type": "zoom", "duration": 600 }.

Built in: fade (the default), none (a cut), slide (a push), rise, zoom, blur, iris, wipe, curtain, flip, spin, drop, glide, morph. push, dissolve, cut and magic-move work as names too.

morph is magic move: the pieces two slides share (title with title, the big number, the picture, line with line) glide from one place and size to the other while the rest dissolves. To pair other pieces, give them the same view-transition-name in the deck's CSS:

[data-slide="s_intro"] .L-title, [data-slide="s_big"] .L-big { view-transition-name: hero; }

Transitions of your own

settings.transitions holds designs of the deck's own, by name. Use a name the way you use a built-in. A design is data, checked on every save: only visual properties animate, nothing in it can load anything, and every time is clamped, so a presenter's AI can design whatever it likes.

"settings": {
  "transition": { "type": "hero-zoom" },
  "transitions": {
    "hero-zoom": {
      "label": "Hero zoom", "duration": 1300, "easing": "cubic-bezier(.7,0,.2,1)",
      "out": { "keyframes": [{ "opacity": 1, "transform": "scale(1)" },
                             { "opacity": 0, "transform": "scale(1.4)", "filter": "blur(14px)" }], "at": [0, 0.55] },
      "in":  { "keyframes": [{ "opacity": 0, "transform": "scale(.7) rotate(-3deg)" },
                             { "opacity": 1, "transform": "none" }], "at": [0.35, 1] },
      "parts": [
        { "select": "title", "from": { "opacity": 0, "transform": "translateY(8cqh)" }, "delay": 500, "duration": 800 },
        { "select": "items", "from": { "opacity": 0, "transform": "translateX(-4cqw)" }, "delay": 700, "stagger": 90 }
      ],
      "phone": { "from": { "opacity": 0, "transform": "scale(.9)" } }
    },
    "quick-zoom": { "base": "hero-zoom", "duration": 500 }
  }
}
FieldMeans
label, helpWhat the editor shows.
baseStart from a built-in or another of yours; whatever you list replaces its part.
duration, easingMilliseconds (to 6000), and any CSS easing: ease-out, cubic-bezier(...), steps(...), linear(...).
out, inThe leaving and the arriving slide: Web Animations keyframes, or { "keyframes", "at": [start, end], "easing", "style" }. at is when, as parts of the duration. style holds for the move: a mask, a 3D origin.
partsPieces of the arriving slide, one after another: select a role (title, eyebrow, sub, lines, items, number, quote, image, results, qr, tag, join, layers, all) or a CSS selector inside the slide, with from, to or keyframes, delay, duration, stagger, easing.
morphtrue, or { "select": ["title", "image"], "duration": 900, "delay": 0 }: magic move.
back{ "out", "in", "parts", "duration", "easing" } for going back. Without it, going back plays the same transition backwards in time, so a push goes the other way and an iris closes.
phone{ "from", "duration", "easing" }: how a phone's screen arrives on the slide.

Keyframes animate opacity, transform, translate, rotate, scale, filter, backdropFilter, clipPath, transformOrigin, colours, boxShadow, textShadow, borderRadius, letterSpacing, wordSpacing, visibility, mixBlendMode, zIndex, and five properties that animate smoothly for a layer's style to use: --t-r, --t-x, --t-y (lengths), --t-a (an angle), --t-n (a number). The built-in iris opens a mask with --t-r. Values are CSS text; url(), braces and semicolons are refused.

Slides are see-through over one shared background, so a good design keeps the two from sitting in the same place at full strength: stagger them with at, or move them apart. People whose devices ask for less motion get a short dissolve instead.

A slide can also carry a design written in place: "transition": { "base": "slide", "duration": 500, "parts": [...] }.

Your video

Your own video can be part of the slides: in a corner like a video call, beside them, behind them, the whole screen, or inside a world a slide's own code draws. settings.camera says it for the deck, and any slide's camera says otherwise for that slide, field by field:

"settings": { "camera": { "place": "corner", "corner": "bottom-right", "size": 26,
                          "label": "Asha Rao\nFounder, Lumen" } },
"slides": [
  { "id": "s_hello", "stage": { "type": "title", "title": "Hello" }, "camera": { "place": "full" } },
  { "id": "s_poll", "stage": { "type": "results", "interaction": "mood" } },
  { "id": "s_world", "stage": { "type": "custom", "html": "..." }, "camera": { "place": "code" } }
]
placeYour videoThe slide
cornerA box in a corner, over the slideAs it is
besideOne side of the screen, top to bottomShrunk to the other side
behindThe whole screen, darkened so words stay readableOver it
fullThe whole screenIts words step aside; live results on top and the join code stay
codeWherever the slide's own code draws it (Stage.camera, see Coded decks)Its code has it
offNot on this slideAs it is
FieldMeans
placeOne of the above. corner if the deck says nothing.
cornerbottom-right (the default), bottom-left, top-right, top-left.
sizeIn a corner, its width as a part of the slide's, in %: 12 to 50, 26 if missing.
shaperounded (the default), rect or circle. A circle only in a corner.
side, splitBeside the slide: on the right (the default) or left, and its share of the width in %, 25 to 60, 40 if missing.
dim, blurBehind the slide: how much it darkens (0 to 90 %, 45 if missing) and blurs (0 to 20).
labelYour name under it, two lines at most: a name, then what you do.
mirrorThe deck only: everybody sees it as a mirror shows you.
srcThe deck only: a video link instead of a camera, a stream or a file (https, or one you uploaded), or a YouTube or Vimeo page. Every big screen plays it itself.

A deck without settings.camera shows your video only on slides that name a place. "place": "off" in the deck turns it off everywhere but the slides that ask. code works only on a slide with code of its own (a custom slide, a coded deck's page): only a slide can hand its code your video, never anything decided live.

While you present, you can switch it off for a moment, or hold one place for every slide (say, the whole screen for a story), and let go again: see Presenting. Between two slides it glides from one place to the next, with the slide's transition.

Your deck's CSS can restyle it: #cam is the layer, #cam[data-place="corner"] one place, .cam-box the box, .cam-label your name.

Questions that depend on who answers

Only some people. Any phone view can carry when: only people whose answer to a choice question is one of in see it. Everybody else sees otherwise, which can carry its own when (up to four deep), or looks up at the screen without one. Each phone picks for itself, and the room checks the same way before it keeps an answer (a photo or a voice note too), so nobody else can answer it.

{ "type": "ask", "interaction": "fee",
  "when": { "interaction": "craft", "in": ["photo", "film"] },
  "otherwise": { "type": "ask", "interaction": "drink" } }

when can also name a custom question: what a phone screen of your own saved with Room.send. Then in lists plain words (up to 24, each up to 48 characters), and somebody is picked when what they saved is one of them, or is a list with one of them in it. Only words count: { "role": "cap" } picks nobody. An answer the word filter holds counts for nothing until you show it. A screen that saved ["cap", "Jalebi"] makes them one of "cap":

{ "type": "ask", "interaction": "selfie",
  "when": { "interaction": "squad", "in": ["cap"] } }

In their own words. {craft} in a question's prompt, a card's text or a "look up" line puts in what that person answered to craft: an option's label, a number with its unit, or a few words. {craft|Friends} reads "Friends" on the big screen, where there is no one person, and for anybody who has not answered yet. "{craft|Friends}, how was your year?" reads "Photographer, how was your year?" on a photographer's phone.

Their name. {name} is always the person's own name: write {name|friend}. People give a name when the deck asks (settings.names: "always" asks when they join, "quiz" only for quizzes and Q&A), or by answering a text question with "asName": true. That answer becomes their name on the leaderboard, in Q&A and in {name}, and the question can be shown on the big screen as a wall of names.

Split by an answer. A results slide with "by": "craft" shows its question's answers split by what the same people answered to craft, one group per option. A sticker poll becomes a ball pit per group (moods by profession), another poll a split bar per group, a rating or a number an average per group. Only people who answered both count. The room keeps these results under "mood@craft".


Questions (interactions)

Questions live apart from slides, keyed by an id you choose. That lets you ask on one slide and show the answers three slides later, or ask the same thing twice.

TypeIsShows as
choicePolls. A quiz when it has correct. Stickers when options have a glyph.bars, columns, donut, grid, stickers
scaleRatings, stars, sliders.average, bars
textOpen answers and word clouds.wall, cloud
numberGuesses and estimates. Closest wins when it has correct.average, histogram
photoThe room's camera. Approved first by default. Shrunk on the phone; kept there to try again if the line drops.wall
audioVoice notes. Approved first by default.list
qaQuestions from the room, voted up.top, wall
formSign-ups, with a consent tick box.count
customAnything a custom phone view sends.raw

Common fields: prompt, hint, view, reveal (live or click), phones (never, after, reveal), open (slide or always).

An open question (text) can also take:

  • "button": what its send button says, up to 20 characters. "Join" on a name question. "Send" if missing.
  • "suggestions": up to 12 words, each up to 24 characters, shown under the box. A tap sends that word exactly as if it were typed: the same checks, the same count of answers each, the word filter and approval. Typing stays open.
  • "thanks": up to 140 characters the phone shows, big, in place of the question and the box once that person has sent all they can (entries). It can carry their own words: "Welcome {name|friend} ๐Ÿ™ We'll start shortly." on a name question. Without it, phones say "Sent".
{ "type": "text", "prompt": "One word for how you feel", "view": "cloud", "entries": 3,
  "suggestions": ["afraid", "excited", "overwhelmed", "uncertain"] }

A poll (choice) with "other" gets a last option that people write themselves. "other" is its label, up to 40 characters:

{ "type": "choice", "prompt": "What would fix the airport?",
  "options": ["More staff", "Bigger lounges"], "other": "Write your own" }

It opens a box for up to 80 characters. The answer counts under the id _other in counts, so no real option can use that id. The words are kept like an open answer: a card number is refused, the word filter and "moderate" apply, and only shown words reach the screen. They arrive as others in the results, the newest 60, each { id, text, at }. Single and multiple answer both work. The built-in views draw _other as one more option, labelled with "other".

Choice options can be written as plain strings. Ids are made for you: "options": ["Tea", "Coffee"].

A custom question keeps whatever a custom phone view sends. "latest" says how many of its newest answers the big screen, the console and phones are sent each time somebody answers: 0 to 50, 50 if missing. With 0 they get { n } alone, how many have answered. Use it when a big room sends a lot, a paragraph each: 50 paragraphs to every screen, several times a second, is a lot of venue wifi. Every answer is still kept whole, in the results and the export.

{ "type": "custom", "prompt": "Your part of the prompt", "latest": 0 }

Stickers

Option glyphs and reaction names are stickers. They animate, using Noto Emoji Animation by Google (CC BY 4.0), unless theme.stickers is "drawn". Any sticker can be replaced in one deck: theme.glyphs.heart = "/a/...".

The names are in /api/v1/catalog under glyphs.


Themes

theme.preset is aurora (the house style: carved stone and light), marble, ink or paper. Then override any token: ground, surface, ink, dim, faint, accent, accent2, accent3, gold, line, display, body, aurora (0 to 1), radius, scheme (dark or light).

Styling anything

theme.css is your own CSS, and every CSS property works: sizes, spacing, fonts, colours, borders, animations. It styles the big screen and the phones completely, and only the slide previews in the editor and the console, so it can never hide the controls you need to fix it.

:root means the deck itself. Variables set there win over the theme:

:root { --accent: #FFB703; --display: "Playfair Display", serif; }

The deck itself is .deck-scope. On the big screen and on phones that is the page's body: body.stage-page on the big screen, body.phone on phones. So one rule can aim at one of them:

body.stage-page .L-title { font-size: 9cqw; }
body.phone .q { font-size: 2rem; }

Fonts can come from a font service: Google Fonts, Bunny Fonts, Fontshare or Adobe Fonts, over https. Put the @import at the top, write its address plainly, and end it with ;. A ; inside the address is fine:

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");

Any other @import is ignored, because what it brings in would not stay inside the deck.

The hooks that stay stable:

OnHookMeans
Big screen[data-slide="s_id"]one slide
Big screen[data-layout="results"]every slide of a layout
Big screen[data-mode="stage"]only the big screen, not previews
Big screen.L-title, .L-sub, .L-line, .L-tktitles, lines, takeaways
Results.vrow, .vlabel, .vfill, .vnuman answer, its label, bar, count
Results.lead, .right, .wrongthe leader; quiz answers after reveal
Phones#main[data-kind="ask"]while a question is asked
Phones#main[data-iid="mood"]one question
Phones.q, .subthe question and its hint
Phones.opts, .opt, .opt.onthe options, one option, a picked one
Phones.opt.other, .osaidthe option they write themselves, and their words
Phones.tchip, .tchip.ona word to tap, and one already sent
Phones#main[data-open="0"]a question that takes no more answers
Phones#top, #barthe header and the reaction bar
[data-kind="ask"] .q { font-size: 2.4rem; }
[data-kind="ask"] .opt { border-radius: 999px; padding: 1.2rem 1.4rem; }
.v-bars .vfill { background: linear-gradient(90deg, var(--accent), #FB8500); }

The full list, with every view and variable, is in the AI guide under Styling. Every save is versioned, so any change can be undone.


Saving

  • Problems that would break a slide are errors. Nothing is saved; you get each one with the exact path.
  • Unfinished work (a question with no words yet) is a warning. It is saved and flagged, so typing is never blocked.
  • Every save is a version. Any version can be restored.

Editing with patches

JSON Patch, with two additions:

  • /slides/@s_mood/notes finds a slide by its id, wherever it is.
  • merge sets several fields at once; null removes one.
{ "ops": [
  { "op": "merge", "path": "/slides/@s_mood/stage", "value": { "view": "bars" } },
  { "op": "add", "path": "/slides/-", "value": { "stage": { "type": "takeaway", "lines": ["Ask early"] } } }
] }

All guidesJoocy homePrivacyTerms