Deployment & Sharing
Publishing Your App
Changes you make in the editor are private drafts. Publishing makes the current version public at your app's link. Visitors keep seeing that version until you publish again.
Drafts and the Published Version
- The editor always shows the latest draft. Every chat change, code save and restore lands there first.
- Your app's link shows the published version. It doesn't change until you publish.
- An app that was never published isn't reachable. Its link shows a page saying the app isn't published yet.
Data is shared. Only code has drafts. The editor and the published app read and write the same data models and records. A record you add while trying the draft is a real record that visitors can see. Changing a data model's fields changes them for the published app too.
How to Publish
Open the Publish Menu
Click Publish in the top right of the editor. An amber dot on the button means there are changes visitors can't see yet.
Check What Visitors See
The top of the menu tells you where things stand:
- Not published yet — nobody can see the app.
- Published v5, with a line like Visitors see v5, published 2 days ago. The editor shows v9. — you have unpublished changes.
- Visitors see the latest version — everything is published.
Click Publish vN
The button is labeled with your latest version, like Publish v9. Click it. Visitors see the new version straight away, and the chat records Published v9.
Share the Link
Once the app is published, the menu shows Your app's link. Click Copy to copy it. See Your App's Link.
When You Can't Publish Yet
The publish button is disabled, with a note under it, when:
- There's nothing to publish yet. The app has no code.
- The preview is still building. Wait a moment.
- Fix the preview error before publishing. The latest draft doesn't build. See Understanding Errors.
- Wait for the current change to finish. A chat change is still running.
Rolling Back
There's no unpublish button. To put an earlier version back in front of visitors, restore it and publish. Restoring records the old code as a new version, so you'd publish that. See Versions & Undo.
To stop strangers from using the app, turn on Require sign-in in Settings, under Access. It applies to the link immediately.
Also in the Publish Menu
- Your code — Download the code as a standalone Vite project, and see whether versions are pushed to GitHub. See Download Your Code & GitHub.
- Netlify — on self-hosted instances, after you've published, you can deploy the published version to Netlify. See Deploying to Netlify.
Tips
- Test before you publish. Click Test to check the draft first. See Testing Your App.
- Watch your data. Sample records you generate while building are visible to visitors. Delete them before you share the app.
- Watch the amber dot. It's the quickest way to tell that visitors are on an older version.