Skip to content

Add "Full usage demo" section to app store pages#130

Open
Alexgodoroja wants to merge 2 commits into
mainfrom
feat/product-demos
Open

Add "Full usage demo" section to app store pages#130
Alexgodoroja wants to merge 2 commits into
mainfrom
feat/product-demos

Conversation

@Alexgodoroja

Copy link
Copy Markdown
Collaborator

What

Renders each app's product_demo (from app-template#88) as a "Full usage demo" section on the app detail page and its plain (no-JS) twin: the when_to_use line, a "Run this first" call with expected output, the worked examples as copy-pasteable code blocks, and — for metered apps — an operation/price cost table with the free budget and worked total.

How

  • src/data/app-demos.json — new app-id → product_demo map sourced from the app-template submissions (19 apps). The site attaches the demos for apps present in its committed catalogue snapshot; the rest attach automatically on the next catalogue resync (pipeline matches by id, no code change).
  • scripts/gen-apps.mjs + the App interface — parse product_demo into an optional productDemo field; apps.ts regenerated. Apps with no entry get productDemo: null.
  • apps/[id].astro + plain twin — the section renders only when a demo exists; commands reuse the existing copy-button handler.
  • appstore.css — theme-aware .demo-* styles reusing existing tokens; the cost table and code blocks scroll inside their own overflow-x wrappers.

Non-breaking

Additive and null-safe throughout — apps without a demo render exactly as today.

Verification

  • npm run build succeeds (362 pages).
  • npm run check:plain passes (91 pairs, no orphans, twins in sync).
  • Rendered spot-checks: agentphone (metered) shows the demo + cost table + worked total; duckdb (non-metered) shows the demo with no cost table; an app with no demo shows no section.

Alexgodoroja added 2 commits July 15, 2026 13:32
Render each app's product_demo — the example-driven usage guide (when-to-use,
first call, worked examples, and for metered apps a cost table + budget) — as a
"Full usage demo" section on the app detail page and its plain (no-JS) twin.
Additive and null-safe: apps without a demo render exactly as before.

- src/data/app-demos.json: app-id -> product_demo, sourced from the app-template
  submissions (19 apps; the site attaches the ones present in its catalogue
  snapshot).
- scripts/gen-apps.mjs + the App interface: parse product_demo into an optional
  productDemo field; apps.ts regenerated.
- apps/[id].astro + the plain twin: the "Full usage demo" section with
  copy-pasteable commands and, for metered apps, an operation/price cost table.
- appstore.css: theme-aware .demo-* styles reusing existing tokens.
# Conflicts:
#	scripts/gen-apps.mjs
#	src/data/apps.ts
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployed to Cloudflare Pages

  • Commit deploy URL: https://a9744ced.pilotprotocol.pages.dev
  • Branch alias: https://feat/product-demos.pilotprotocol.pages.dev (may take ~30s to propagate)
  • Commit: 627e27df460054cfdd84bdee1c073cfe40ef3f92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant