Proposal: publish a stable temporary preview from generated apps
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript, wasm
Research direction
Start by reading lib/preview/bundle.ts and lib/preview/html.ts to trace how the existing preview bundle and document are built, then review temp.md’s browser integration guide. The issue calls for a focused mocked-API test path covering initial publish, stable-URL updates, revoke, and errors. Done means publishing is explicit, later revisions update the same URL, and a failed revision leaves the last successful preview available.
Written by the indexing model from the issue text.
Description
Problem
LlamaCoder's current Share action links to /share/v2/:messageId. That is useful for sharing one generated message, but it is tied to that specific revision and is rendered through the LlamaCoder application. Continuing to iterate produces a new message rather than updating one standalone preview URL.
Related to #114, but deliberately narrower: this proposal publishes the already-rendered static preview and does not introduce project permissions, deployment configuration, or an AI-assisted release workflow.
It would be useful to have an optional, account-free way to publish the rendered app itself for external review, keep the same URL as the chat evolves, and revoke it when review is finished.
Proposed UX
Add a Publish preview action beside the existing Share action:
- The first publish creates a temporary standalone preview and copies its URL.
- Later publishes from the same chat update that same URL atomically.
- The action shows Open, Copy link, and Revoke after publishing.
- The existing message-specific Share flow remains unchanged.
Before the first upload, the UI should disclose that the rendered preview is uploaded to temp.md, is public by default, and normally expires after seven days.
Why this is a small fit for the current renderer
LlamaCoder already has nearly all of the difficult local pieces:
lib/preview/bundle.tsproduces browser-side JavaScript and CSS with esbuild-wasm.lib/preview/html.tsproduces a complete HTML document.- The renderer already supports a
single-filebundle mode and a CDN-safe vendor path. - Generated code runs in a sandboxed iframe without same-origin access to the parent application.
The integration can therefore publish one generated index.html; it does not need to send source code, proxy through the LlamaCoder backend, or add a general deployment-provider abstraction.
Suggested implementation
- Extract a small reusable
buildPublishablePreview(files)helper from the existing bundle/srcdoc path. - Use the browser-capable temp.md publish-session API to upload
index.html. - Persist only the scoped temp.md preview state, keyed by chat ID, in LlamaCoder-owned browser storage. Never put upload/update capabilities in URLs, rendered output, telemetry, toast messages, or logs.
- Reuse the saved update capability for later revisions so the canonical URL stays stable.
- Treat publishing as an explicit action; generation should never upload automatically.
- Preserve the last successful preview if bundling or uploading a later revision fails.
- Include focused tests for initial publish, same-URL update, revoke, disclosure, and error handling using a mocked API.
The browser API uses wildcard CORS without cookies and capability-scoped bearer tokens, so this should not require temp.md accounts, LlamaCoder server secrets, or a backend proxy.
Service disclosure
I maintain temp.md and would implement and support this integration. temp.md provides temporary static previews rather than permanent production hosting. Its browser integration guide and public contract are available at:
- https://temp.md/docs/#browser-integrations
- https://temp.md/openapi.json
- https://temp.md/integrations/
If this direction fits LlamaCoder, I can prepare the implementation as a focused PR while keeping the existing Share behavior intact.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 1.7k
- Avg merge
- 4m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Nutlope/llamacoder
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
Nutlope/llamacoder#138 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Nutlope/llamacoder#136 ·
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
Nutlope/llamacoder#122 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Nutlope/llamacoder#114 ·
All issues in Nutlope/llamacoder
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
"Claude Code request is missing its initial user message" when the prompt starts with an image pathOpen
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
earendil-works/pi-claude-code#31 ·
Maintainers usually reply within 8 days
-
bug pending triage
Difficulty 1/5 Under an hour Newbie friendliness 92/100
privatenumber/cleye#48 ·
-
Google text documents are base64-encoded twicePossibly taken @feiiiiii5 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day