> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Develop and test an App

> Iterative App development in a workspace, using a Draft App, App Preview, and live sync to test code in a real App runtime without publishing.

Author App code in any workspace and test it with **App Preview**, which runs that code in a real App runtime without publishing it and without touching any deployed App.

## Why preview instead of publishing to test

Workspaces differ from App runtimes in ways that make in-workspace testing unreliable: authentication and token behavior, port and networking configuration, URL patterns, mounts, Compute Environment, and the environment variables Domino injects, such as `DOMINO_RUN_HOST_PATH`. Publishing to test is slow and can disturb a deployed production version.

Preview runs your code in a dedicated App pod on the same infrastructure a deployed App uses, but only you can reach it and it never appears in App discovery.

## How preview works

You develop in an ordinary workspace. The workspace isn't bound to an App up front, and any workspace works. The first time you configure and start a preview, Domino creates a **Draft App** and links it to that workspace. A Draft App is private to its author: it never appears in App lists, discovery, or search for anyone else, and previewing it doesn't change a published App's configuration or deployed instance.

<Steps>
  <Step title="Open the App Preview tab in your workspace">
    You can also use the App Preview shortcut and name the App file directly.
  </Step>

  <Step title="Configure the App under Settings">
    Set the App file, Compute Environment, and Hardware Tier. [Extended identity propagation](/cloud/platform-capabilities/features/apps/authentication-and-identity/app-security) can also be set here, but only by an administrator. Starting the preview creates the Draft App and ties it to this workspace.
  </Step>

  <Step title="Wait for the first load">
    Domino provisions a dedicated App pod and runs your code. The first load is a normal cold start, comparable to starting a deployed App.
  </Step>
</Steps>

While a preview runs, you can sync code changes with live sync, inject query parameters to test parameterized behavior, copy the preview URL (`/preview/<draftAppId>`) to open the preview directly, and view App logs or change preview settings from the workspace sidebar. The preview URL is reachable only by the App author.

Only one preview instance runs per Draft App at a time, and starting a new preview stops the existing one. Preview instances don't count against the per-project limit on running Apps, so a running preview never blocks a production App launch.

<Warning>
  **Preview is not sandboxed.** A preview instance is a real App instance running with your full identity and real access to Domino APIs and shared state. If your Draft App starts Jobs, writes to Datasets, or modifies any other Domino resource, it does so for real. Test destructive operations with care.
</Warning>

### Live sync

Preview always runs the latest committed code. When Domino detects new commits in the workspace, live sync applies them to the running preview by restarting only the container. The pod is reused, so iteration is much faster than the first load. A preference controls whether sync runs automatically on every new commit or only when you trigger it.

Live sync applies committed code only, so commit your changes before you expect to see them in the preview. Autoscaling isn't available in preview.

## Draft lifecycle

A Draft App persists across workspace sessions, so you can stop the workspace and resume where you left off. Stopping the workspace stops the preview instance, and deleting the workspace deletes the Draft App. Administrators can also stop preview instances.

## Publish from a Workspace

When the code is ready, select **Publish App** in the workspace. Domino fills the fields from your most recent preview configuration, so you can accept them as-is or change them first. Choose one of two targets:

| Target                                          | What it does                                                                                                                              |
| :---------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
| **Publish as a new App**                        | Creates an App whose first version captures the configuration of your Draft App. You can change the App file here.                        |
| **Publish as a new version of an existing App** | Adds a version to an existing App. The target App must be in the same project and have the same App file (entry point) as your Draft App. |

Publishing creates a version but doesn't deploy it. To make the version reachable, continue with [Publish and deploy App versions](/cloud/platform-capabilities/features/apps/publish-and-deploy-app-versions).

Publishing is non-destructive. Your Draft App and workspace stay intact and you can keep iterating, so one workspace can publish several Apps and several versions over its life.

## Iterate on a published App

To improve an App that is already serving traffic without disrupting it, open the App's version details page and select **Edit in Workspace**. Domino creates a workspace and Draft App seeded from that version's configuration, then starts a preview. Iterate as above, then select **Publish App** and choose **Update existing** to publish a new version of the same App.

<Note>
  **Edit in Workspace** isn't available for Apps in projects that use the Domino File System (DFS). Use a Git-based Project for this workflow.
</Note>

## Related

* [Create an App](/cloud/platform-capabilities/features/apps/create-an-app): Start an App from a workspace or from an existing file.
* [Publish and deploy App versions](/cloud/platform-capabilities/features/apps/publish-and-deploy-app-versions): Turn a Draft App into an immutable version, then start it.
* [App versioning and reproducibility](/cloud/platform-capabilities/features/apps/app-versioning-and-reproducibility): What a version captures and how to start a previous one.
* [Apps in Domino](/cloud/platform-capabilities/features/apps/apps-in-domino): How Apps, Draft Apps, versions, and instances relate.


## Related topics

- [Create an App](/cloud/platform-capabilities/features/apps/create-an-app.md)
- [App versioning and reproducibility](/cloud/platform-capabilities/features/apps/app-versioning-and-reproducibility.md)
- [Getting started with Domino: Build a transaction review App](/cloud/platform-overview/getting-started-with-domino/index.md)
- [Publish and deploy App versions](/cloud/platform-capabilities/features/apps/publish-and-deploy-app-versions.md)
