A finding can carry an app — the finding itself made interactive, like a flight sale as a departures board, or a game such as a prediction game for the morning’s movers. Apps on someone else’s host wait for a Play tap; apps TabTab hosts load in place, inside a locked-down sandbox. A finding without an app works exactly as before.
Add app_url to a finding in push_findings (or POST /api/v1/findings), with an optional app_height from 280 to 720 (default 420).
{
"tab_id": "…",
"idempotency_key": "money-movers-2026-10-03",
"findings": [{
"title": "Money Movers — Oct 3",
"summary": "Five pre-market movers and why.",
"app_url": "https://apps.example.com/predict",
"app_height": 480
}]
}frame-ancestors https://tabtab.com, and no X-Frame-Options.tabtab_tab_id, tabtab_finding_id, tabtab_theme and tabtab_access to the query string.Built your app in an assistant like Muse, whose hosting cannot be framed by other sites? Send the file itself as app_html: one self-contained HTML document with its CSS and JavaScript inline, up to 300 KB. TabTab serves it from tabtabapps.com in the same sandbox, and reviews hosted apps individually.
{
"findings": [{
"title": "Your check-in for Oct 3",
"summary": "Movement, nutrition, sleep and stress.",
"app_html": "<!doctype html><html>…your whole app…</html>",
"app_height": 560
}]
}
// The result includes "apps": [{ "app_id": "…", "app_url": "https://tabtabapps.com/…" }]
// Next time send "app_id": "…" instead of the whole file.Send one of app_url, app_html or app_id per finding. Pushing the same file again reuses the stored copy. Apps hosted by TabTab share one saved state per reader per Tab, so a new version of your app keeps everyone’s progress.
An app is either a game or an experience, and it is an experience unless you send app_kind: "game". An experience is the finding itself in a livelier form: a flight sale as a departures board, a transfer bonus as a points slider. It opens the brief above the text and loads by itself, and the finding keeps its source link. A game sits under the brief’s sections instead.
{
"tab_id": "…",
"idempotency_key": "flight-deals-2026-11-26",
"findings": [{
"title": "Air Canada Black Friday seat sale, book by Nov 29",
"summary": "Discounted base fares to 180+ destinations, cash or points.",
"source_url": "https://www.aircanada.com/…",
"money": { "deadline": "2026-11-29", "action_type": "redeem" },
"app_html": "<!doctype html>…a departures board of the stated fares…",
"app_kind": "experience",
"app_height": 480
}]
}init message carries deadline (the money block’s last day to act, or null), reduced_motion and has_source. Show a closed state after the deadline.{ type: "open_source" } from its action button: TabTab opens the finding’s own source link in a new tab. It names no URL, so the app can send readers nowhere else.update_finding (app_html, app_kind, app_height).## Interactive experience for every finding
Every finding you push to this Tab must also carry a small interactive experience: the finding itself made lively, as one HTML file. TabTab shows it at the top of the finding's page. The finding's text must still stand on its own.
### Steps for each finding
1. Research and write the finding as you do now: a headline, a summary that names who reported it and when, and the source_url.
2. Pick a scene that fits the finding (ideas below). Don't reuse the scene of either of the last two findings you pushed to this Tab.
3. Build it as one self-contained HTML file and push it with the finding:
- `app_html`: the file
- `app_kind`: "experience"
- `app_height`: 480 to 640 (the frame then grows to the app's full height)
- `image_has_text`: true whenever your hero image has words on it.
4. If the push result warns that "the app shows ... which the finding's text does not state", fix the app or the text, then send the file again with `update_finding` (finding_id, app_html, app_kind "experience").
### Scene ideas
Ideas: a timeline of the stated dates, a before-and-after toggle, a gauge or ruler for a stated figure, a receipt or ticket that prints the stated lines, a map pin per stated place, a stack of cards to flip, a checklist of stated steps, a balance of two stated sides.
### General rules
- **Truth:** show only numbers, dates, places, programmes and names that the finding's own text states. Arithmetic on stated figures is fine, but compute it in JavaScript rather than writing the result into the HTML. Never estimate a fare, a saving, a premium or a date. Axis labels count: write "None", not "$0".
- **One file:**
- inline CSS, JavaScript and SVG; system fonts
- no network requests, external images, fonts, libraries or logos
- under 40 KB
- **Motion:**
- an opening animation of at most 3 seconds, then an end state the reader can tap, toggle, slide or pick in
- if `ctx.reduced` is true, show the end state immediately
- **Layout:** works at 360px and 640px wide with no sideways scroll; 44px tap targets; visible focus; never colour alone.
- **Time:**
- compute everything from the real clock with `TT.daysLeft`
- after a stated deadline, show a closed state ("This sale ended Nov 29"), never an old countdown
- an "Ended:" deal leads with the ended state and never invites booking
- **Action:** one button that calls `TT.open(source_url)`, labelled with what it opens, plus a short source line.
- **Copy:**
- plain sentences, sentence case
- no emoji, no exclamation marks, no "you'll save"
- no sound, no points or badges for the reader, no invented urgency
### Bridge (paste this at the top of the app's <script>, then start the app with it)
```js
/* TabTab bridge, inlined into each experience. */
var TT = (function () {
var P = "tabtab-mini-app/1";
var framed = window.parent !== window;
var ctx = { reduced: matchMedia("(prefers-reduced-motion: reduce)").matches, deadline: null, hasSource: true };
var started = false, startFn = null;
function send(m) { if (framed) { m.tabtab = P; parent.postMessage(m, "*"); } }
function begin() { if (started || !startFn) return; started = true; startFn(ctx); }
addEventListener("message", function (e) {
if (e.source !== parent) return;
var d = e.data;
if (!d || d.tabtab !== P || d.type !== "init") return;
if (typeof d.reduced_motion === "boolean") ctx.reduced = ctx.reduced || d.reduced_motion;
if (typeof d.deadline === "string") ctx.deadline = d.deadline;
if (typeof d.has_source === "boolean") ctx.hasSource = d.has_source;
begin();
});
function fit() { send({ type: "resize", height: Math.ceil(document.documentElement.getBoundingClientRect().height) }); }
return {
start: function (fallbackDeadline, fn) {
ctx.deadline = fallbackDeadline;
startFn = fn;
send({ type: "ready" });
setTimeout(begin, framed ? 700 : 0);
if (window.ResizeObserver) new ResizeObserver(fit).observe(document.body);
setTimeout(fit, 50);
},
open: function (url) { if (framed) send({ type: "open_source" }); else window.open(url, "_blank", "noopener"); },
/* Whole days from today (UTC) to the deadline: 0 = last day, negative = closed. */
daysLeft: function (deadline) {
if (!deadline) return null;
var t = new Date(); var today = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
return Math.round((Date.parse(deadline + "T00:00:00Z") - today) / 86400000);
},
ctx: ctx,
};
})();
```
Then start the app:
```js
TT.start("2026-12-15" /* the stated deadline, or null */, function (ctx) {
// build the scene; ctx.reduced, ctx.deadline
// TT.daysLeft("2026-12-15") -> whole days left (0 = today, negative = past)
// TT.open("<source_url>") -> the one action button
});
```Every app runs in a frame with sandbox="allow-scripts" and nothing else. If your page does not load within five seconds, the finding falls back to its normal link and image.
Messages to and from TabTab carry tabtab: "tabtab-mini-app/1". Anything else is ignored. Saving goes to the reader’s TabTab account when they are signed in, so it follows them across devices, and to their device when they are not.
const PROTOCOL = "tabtab-mini-app/1";
const send = (msg) => parent.postMessage({ tabtab: PROTOCOL, ...msg }, "*");
let saved = null;
addEventListener("message", (event) => {
if (event.source !== parent) return;
const msg = event.data;
if (!msg || msg.tabtab !== PROTOCOL) return;
if (msg.type === "init") {
// msg.state is what you last saved for this reader (or null).
// msg.access is "open", "member", "full" or "preview".
saved = msg.state;
render(saved);
}
if (msg.type === "saved" && !msg.ok) console.warn("save failed", msg.reason);
if (msg.type === "shared") console.log("share card", msg.url);
});
// Say hello once your page has loaded. TabTab answers with "init".
send({ type: "ready" });
// Save whenever your state changes (any JSON, 16 KB max).
function save(state) { send({ type: "save", state }); }
// Fit the frame to your content (280–720 px).
send({ type: "resize", height: document.body.scrollHeight });
// Ask TabTab for a branded share card: a headline and up to two stats.
send({ type: "share", headline: "Seven days in a row",
stats: [{ label: "Days", value: "7" }, { label: "Today", value: "4/4" }] });
// Tell TabTab a session was completed (counted for the Tab's metrics).
send({ type: "complete" });
// On a creator-priced Tab, ask TabTab to show the subscribe prompt.
send({ type: "subscribe" });Building the app with Claude, ChatGPT or Muse? Paste these after your app idea. The first makes any app run inside TabTab; the second keeps each player’s scores, streaks or progress; the third publishes it.
Make this web app ready to run inside TabTab as a Mini App.
Constraints (TabTab runs it in a sandboxed iframe, scripts only):
- One self-contained HTML file: inline CSS and JS, under 300 KB. Web fonts and images over https are fine.
- No localStorage, sessionStorage, IndexedDB or cookies: they throw in the sandbox. Wrap any existing use in try/catch.
- No alert(), confirm() or prompt(): they are blocked. Use inline confirmation (e.g. tap twice) instead.
- No popups, new windows or form submits.
Add one self-contained "TabTab bridge" block at the top of the script:
- Messages both ways carry tabtab: "tabtab-mini-app/1". Send with parent.postMessage(msg, "*"); accept only events where event.source === parent and data.tabtab matches.
- On load, send { type: "ready" }. TabTab answers { type: "init", state, access, persist, theme }.
- Fit the frame: send { type: "resize", height } (280-720) after rendering.
- When a session finishes, send { type: "complete" }.
- If the app runs fine outside TabTab too, fall back to localStorage when there is no parent frame.
Keep the rest of the app as it is.Add personal progress to this TabTab Mini App, saved through the TabTab bridge.
- Keep one small JSON record per player, e.g. { best, lastScore, gamesPlayed } (or streaks, levels, check-ins). Keep it under 16 KB; prune old history.
- On { type: "init" }, read data.state as the saved record (null the first time) and show it (e.g. "Best" next to the score).
- Whenever the record changes (game over, level cleared, check-in), send { type: "save", state: record }. TabTab stores it in the player's account when they are signed in, and on their device when not, and returns it in the next "init". Listen for { type: "saved", ok } and show a short note if ok is false.
- After a run, offer a "Share" button that sends { type: "share", headline, stats: [{ label, value }, ...up to 2] }; TabTab turns it into a branded share card.
- Records are per player only: do not build a leaderboard or compare players. TabTab does not store shared rankings.
- Outside TabTab, fall back to localStorage inside try/catch.Records are personal: TabTab keeps each player’s own, and does not store shared rankings. An app on its own server can keep its own, using the reader token below to tell members apart.
Push this as a playable finding to my TabTab Tab "<Tab name>" with push_findings:
- title: <today's headline>, summary: one or two plain sentences about what the reader can do.
- app_html: the full HTML file of the app.
- app_height: <280-720>.
From the result, keep apps[0].app_id. Next time, send app_id instead of app_html unless the app changed.access from init and sends subscribe when a preview ends.#tabtab_token=…), so your own server can keep their progress. It is signed, scoped to one Tab and your origin, expires in 24 hours, and carries an anonymous reader id — never a name, email or payment detail. Only subscribers ever receive one; that, not your app, is what keeps paid content for subscribers.// Your server, if you have one. Verify offline against TabTab's key set:
// GET https://tabtab.com/api/v1/mini-apps/keys (EdDSA, Ed25519)
// or ask TabTab:
const res = await fetch("https://tabtab.com/api/v1/mini-apps/verify", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ token, audience: "https://apps.example.com" }),
});
const { valid, claims } = await res.json();
// claims: { iss, aud, sub, tab_id, access: "member", iat, exp }