Skip to content

Canvas Demo Script ​

Six demos. Twelve minutes. Live interactive applications built from conversation.

This script demonstrates Canvas — GhostAI's ability to generate, render, and manage interactive HTML applications directly inside the chat interface. Every canvas runs in a sandboxed iframe with viewport controls, theme switching, a dev console, self-healing error recovery, persistent state via the Canvas SDK, and multi-format export.


Pre-Demo Checklist ​

  • [ ] GhostAI instance is running and reachable
  • [ ] Browser open to GhostAI chat interface
  • [ ] Canvas tab is visible in the empty state demo selector (look for "Interactive Canvas" or similar category)
  • [ ] Verify canvas rendering by sending a simple prompt: Build a Hello World page with a centered heading
  • [ ] Canvas should render below the assistant message with viewport controls visible
  • [ ] Screen resolution is large enough for the canvas iframe to be easily visible (1080p minimum recommended)
  • [ ] If demoing the live data proxy: backend API proxy is configured (/api/canvas/proxy route available)
  • [ ] If demoing GhostForge publish: GhostForge integration is enabled

Demo 1: Create a Dashboard ​

Duration: 2 minutes Story: A product manager needs a sales dashboard. One sentence in, interactive dashboard out.

Input ​

Build a real-time server monitoring dashboard with 4 widgets: CPU usage gauge (animated needle), memory usage ring chart, network throughput sparkline, and a live request count that ticks up. Use random simulated data that updates every second.

Expected Output ​

A live interactive dashboard renders inside the canvas iframe:

  • CPU gauge with an animated needle moving based on simulated load
  • Memory ring chart showing used vs. available
  • Network sparkline scrolling left as new data points arrive
  • Request counter ticking up in real-time
  • All widgets update every second with smooth transitions
  • Canvas viewport controls visible: desktop/tablet/mobile toggles, theme toggle, dev console button

Talking Points ​

"One sentence. That's a fully interactive, real-time dashboard with four animated widgets. No React project setup, no npm install, no build pipeline. The product manager asked for it and got it in seconds."

"Notice the viewport controls at the top. Let me show you what this looks like on a tablet..."

(Click the tablet viewport toggle)

"...and on mobile. The canvas automatically handles responsive layout. And the dark theme toggle..."

(Click the theme toggle)

"...applies a complete dark palette. The canvas has full theme support built in."


Demo 2: Iterate and Edit ​

Duration: 2 minutes Story: The dashboard is good, but the stakeholder wants changes. GhostAI updates the canvas in place.

Input ​

Change the CPU gauge to a donut chart, make the sparkline show the last 60 seconds instead of 30, and add a header with the title "Ops Dashboard" and today's date. Also add a 5th widget showing top 5 error codes in a horizontal bar chart.

Expected Output ​

The canvas updates in place (not a new canvas):

  • CPU gauge replaced with a donut chart
  • Sparkline X-axis extended to 60 seconds
  • Header added with title and date
  • New horizontal bar chart widget showing error codes
  • All previous animations and interactions still working

Talking Points ​

"We didn't start over. GhostAI understood the existing canvas and applied surgical edits. It added the header, swapped the gauge for a donut, extended the sparkline, and added a fifth widget — all in the same canvas."

"This is the iterative workflow. You describe what you want changed, and the canvas updates. No code reviews, no pull requests, no deploy cycles. This is how non-technical stakeholders should be able to build internal tools."


Demo 3: Viewport Preview ​

Duration: 1 minute Story: Show the responsive design capabilities.

Input ​

No new prompt needed — use the canvas from Demo 2.

Steps ​

  1. Click the desktop viewport toggle (default) — full-width rendering
  2. Click the tablet viewport toggle — canvas resizes to ~768px width
  3. Click the mobile viewport toggle — canvas resizes to ~375px width
  4. Click the theme toggle — switches between light and dark modes
  5. Click the dev console button — shows the HTML/CSS/JS source

Expected Output ​

  • Dashboard reflows at each breakpoint
  • Theme toggle applies a consistent dark/light palette
  • Dev console shows the full source code with syntax highlighting

Talking Points ​

"Every canvas is responsive by default. The viewport toggles let you preview exactly how it'll look on different devices. The dev console gives you the full source — you can copy it, modify it, or hand it to your engineering team."

"For agencies and design teams, this is a rapid prototyping tool. Mock up a dashboard in the meeting, preview it on all form factors, and export the code."


Demo 4: Self-Healing ​

Duration: 2 minutes Story: Demonstrate that canvas errors are automatically detected and fixed.

Input ​

Build a simple counter app with + and - buttons and a display showing the current count.

Wait for the canvas to render and verify it works. Then send:

Now add a bug: make the + button call an undefined function called incrementCounter() that doesn't exist.

Expected Output ​

  1. The counter app renders and works correctly
  2. After the intentional bug, the canvas shows an error state
  3. GhostAI automatically detects the error via the dev console
  4. The AI offers a fix: "I see the error — incrementCounter is not defined. Let me fix that..."
  5. The canvas is repaired and works again

Talking Points ​

"We just introduced a real JavaScript error. Watch what happens — GhostAI detected the error through the canvas dev console, diagnosed the root cause, and fixed it automatically. This is self-healing."

"In production, this means your internal tools don't break silently. If a canvas hits a runtime error, the AI diagnoses and patches it. No support tickets, no waiting for a developer."

"For the CTO: this is a fundamentally different model for internal tooling. Your business analysts build the canvas. The AI maintains it."


Demo 5: Export and Publish ​

Duration: 2 minutes Story: The dashboard is ready. Export it for sharing or publish it to GhostForge.

Input ​

Export this dashboard as a standalone HTML file I can share with my team.

Expected Output ​

  • A download link for a self-contained .html file
  • The file includes all CSS, JS, and assets inlined
  • Opening the file in any browser renders the full dashboard

Additional export options to mention ​

Export this as a PNG screenshot at 1920x1080.
Publish this canvas to GhostForge so my team can access it.

Talking Points ​

"Four export options. The HTML file is completely standalone — no server needed, no dependencies. Email it to your VP and they open it in any browser."

"The PNG is pixel-perfect at whatever resolution you specify. Great for slide decks and reports."

"GhostForge publishing gives it a permanent URL with version history. Your team bookmarks it and always gets the latest version. Updates propagate instantly."

"For compliance teams: the export includes a provenance metadata comment in the HTML showing who created it, when, and from which conversation."


Demo 6: Canvas SDK ​

Duration: 2 minutes Story: Show the advanced SDK for persistent state and live data.

Input ​

Build a to-do list app that saves its state. I should be able to add items, check them off, and delete them. When I refresh the page, my items should still be there. Use the Canvas SDK's ghostai.state for persistence.

Expected Output ​

  • A functional to-do list renders in the canvas
  • Add items, check them off, delete them
  • Refresh the browser page (or close and reopen the chat)
  • Items persist — the to-do list state survives page refreshes

Talking Points ​

"This to-do list uses ghostai.state — the Canvas SDK for persistent state. That data is stored server-side, tied to the conversation. Refresh the page, close your laptop, come back tomorrow — your data is still there."

"This is what separates Canvas from a code playground. Playgrounds give you throwaway HTML. Canvas gives you persistent applications with state management, API access, and export."

If the audience asks about live data ​

Send an additional prompt:

Build a live cryptocurrency dashboard that fetches real-time prices for Bitcoin, Ethereum, Solana, and Cardano using the CoinGecko public API via the canvas API proxy. Show each coin as a card with current price, 24h change percentage (green/red), a sparkline mini-chart of the last 7 days, and a market cap badge. Auto-refresh every 30 seconds with a countdown timer.

"The canvas API proxy lets canvases fetch live data from external APIs. The proxy runs server-side, so there are no CORS issues and API keys stay secure. The canvas just calls ghostai.proxy() with the URL."


Recovery Steps ​

Canvas not rendering ​

If the canvas iframe appears empty or shows a loading spinner:

  1. Check the browser console for errors (F12 → Console)
  2. Verify the canvas route is enabled: the chat response should include a canvas artifact
  3. Refresh the page and resend the prompt
  4. If the issue persists, check that the backend is serving static assets correctly

Canvas shows raw HTML instead of rendering ​

The frontend may not be mounting the iframe renderer. Verify:

  • The chat response includes a canvas artifact type (not a code block)
  • The frontend Canvas component is loaded

Self-healing not triggering ​

If the AI doesn't auto-detect the error:

  1. Open the dev console (click the console icon in the canvas controls)
  2. Copy the error message
  3. Paste it into the chat: "I'm seeing this error in the canvas: [error]"

GhostForge publish fails ​

Verify GhostForge integration is enabled. The publish endpoint requires a valid GhostForge API key in the backend configuration.

Slow canvas rendering ​

Complex canvases (3D, particle systems, large datasets) may take longer. The canvas renderer has a 10-second timeout by default. For demos, use simpler prompts that render quickly. The dashboard and to-do list demos are the fastest.


Demo Flow Cheat Sheet ​

#DemoDurationKey Moment
1Create a Dashboard2 minLive animated dashboard from one sentence
2Iterate and Edit2 minIn-place canvas update, no restart
3Viewport Preview1 minMobile/tablet/desktop + dark mode
4Self-Healing2 minAuto-detect and fix JS error
5Export and Publish2 minHTML/PNG/GhostForge export
6Canvas SDK2 minPersistent state survives refresh
Total~11 min

Frequently Asked Questions (From Demos) ​

"Can I build real production apps with this?"

Canvas is designed for internal tools, prototypes, dashboards, and single-page applications. For production customer-facing apps, we recommend exporting the HTML and integrating it into your standard deployment pipeline. Canvas is not a replacement for your engineering team — it's a force multiplier.

"What JavaScript libraries can I use?"

Any library available via CDN. The canvas supports ES module imports from esm.sh and script tags from cdn.jsdelivr.net. Popular libraries: Three.js, Chart.js, D3.js, p5.js, GSAP, Leaflet, React/Preact, Mermaid, and more.

"Is the canvas sandboxed? Could it access my data?"

Yes, fully sandboxed. The canvas runs in an iframe with a restrictive Content Security Policy. It cannot access the parent page, cookies, or local storage outside its sandbox. API access is limited to the canvas proxy endpoint, which the backend controls.

"How does this compare to v0 by Vercel or Bolt?"

v0 generates React components. Bolt generates full-stack apps. Canvas generates interactive HTML applications inside the conversation with PII protection, persistent state, self-healing, and export to GhostForge. The key differentiators are: (1) inline rendering inside the chat, (2) iterative editing without restarting, (3) self-healing error recovery, (4) Canvas SDK for state and API access, and (5) everything runs through the PII protection pipeline.

"Can I use Canvas without the chat?"

Yes. The API endpoint (/api/canvas/create) accepts HTML directly and returns a rendered canvas. The SDK client (GhostScienceClient.create_canvas()) wraps this endpoint. You can also embed published GhostForge canvases via iframe in any web page.

"What about accessibility?"

Canvas generates semantic HTML by default. The AI is prompted to include ARIA attributes, keyboard navigation, and appropriate contrast ratios. For critical accessibility requirements, we recommend an accessibility audit of the exported HTML.


For GhostScience PhD computing demos, see the GhostScience Demo Script. For federated clean room demos, see the Clean Room Demo Script.

SOC 2 Type II Certified | BAA Available | HIPAA-Ready