# Publish App

### Go Live

Once you've previewed your application and everything looks correct, it's time to publish. Publishing makes your app accessible at its public URL: `yourapp.obto.co`.

***

### How Publishing Works

OBTO applications are live the moment their artifacts are deployed. There is no separate "build" or "release" step. When the AI writes code using `obto_upsert_record` or `obto_create_route`, that code is immediately available on the platform.

**What "publishing" means on OBTO:**

* Your application's `pltf_page` records are served when someone visits the `host` URL
* Your API routes are active and callable
* Your server scripts are running and available via `xe.`

If you've deployed all artifacts and the host is set correctly, your app is already live.

***

### Your App URL

Every OBTO application gets a URL based on its host configuration:

```
https://{appName}.obto.co
```

The `host` field on your browser-facing artifacts (`pltf_page`, `pltf_javascript`, `pltf_stylesheet`) determines which URL serves them. All artifacts that belong to the same website must share the same host value.

***

### Publishing Checklist

Before sharing your app URL, verify:

| Check                             | How                                                    |
| --------------------------------- | ------------------------------------------------------ |
| ✅ All server scripts deployed     | AI used `obto_upsert_record` with `pltf_script_server` |
| ✅ All routes deployed             | AI used `obto_create_route`                            |
| ✅ All stylesheets deployed        | AI used `obto_upsert_record` with `pltf_stylesheet`    |
| ✅ All JavaScript modules deployed | AI used `obto_upsert_record` with `pltf_javascript`    |
| ✅ All pages deployed              | AI used `obto_upsert_record` with `pltf_page`          |
| ✅ Host values are consistent      | All browser-facing artifacts use the same host         |
| ✅ Preview looks correct           | Generated and checked via `obto_generate_preview`      |

***

### Deployment Order Matters

If your app has both frontend and backend, always ensure the AI deployed in the correct order:

```
1. pltf_script_server  →  Backend logic first
2. pltf_route           →  API endpoints second
3. pltf_stylesheet      →  CSS styles
4. pltf_javascript      →  React frontend modules
5. pltf_page            →  HTML entry points last
```

If the AI deployed out of order, your page may fail to load. Ask the AI to redeploy the page:

```
"Redeploy the index page for my-app"
```

***

### Updating a Published App

Published apps are updated in real-time. When the AI modifies any artifact:

* **Changes are immediate** — No build step, no deploy pipeline, no CI/CD
* **No downtime** — The platform hot-swaps the updated artifact
* **Rollback** — The AI can fetch the current version, restore it, and redeploy

To update, just continue the conversation:

```
"Change the hero section background to dark purple"
"Add a new /pricing page"
"Fix the contact form — it's not saving submissions"
```

***

### Custom Domains

By default, your app is served at `yourapp.obto.co`. Custom domain configuration is available for production deployments. Contact <dev@obto.co> for custom domain setup.

***

### Next Steps

* **App Preview** — Preview changes before publishing
* **MCP Tools - OOB** — Review the tools used for deployment


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.obto.co/ai/publish-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
