> For AI agents: the complete Sanity documentation index is available at [https://www.sanity.io/docs/llms.txt](https://www.sanity.io/docs/llms.txt).

# Application Blueprints reference

Field reference for defineApplication and the application view definers: window, panel, tile, asset source, and web worker.

Field reference for `defineApplication` and the view definers in `@sanity/blueprints` 0.26.0 or later. Declare views in the application's `views` array and web workers in its `webWorkers` array. For a walkthrough, see [Define an application with Blueprints](https://www.sanity.io/docs/blueprints/deploy-an-application-with-blueprints).

> [!WARNING]
> Beta
> Applications as blueprint resources are in beta. Their fields can change in a future release of `@sanity/blueprints`.

## defineApplication

Groups your app's views and web workers into one deployable resource. An application must declare at least one view, and at most one window view.

**sanity.blueprint.ts**

```typescript
import {
  defineApplication,
  defineBlueprint,
  defineWebWorker,
  defineWindowView,
} from '@sanity/blueprints'

export default defineBlueprint({
  resources: [
    defineApplication({
      name: 'design-retro',
      title: 'Design Retro',
      root: './apps/design-retro',
      views: [
        defineWindowView({name: 'main', title: 'Design Retro', src: './src/windows/main.tsx'}),
      ],
      webWorkers: [
        defineWebWorker({
          name: 'background-refresh',
          title: 'Background Worker',
          src: './src/workers/background-refresh.ts',
        }),
      ],
    }),
  ],
})
```

#### Properties

**name** (string, required)

The resource name. Unique within the blueprint, and how Blueprints matches the resource between deploys. Changing it destroys the application and creates a new one.

**slug** (string)

The application's hostname. Use lowercase letters, numbers, and hyphens, and start and end with a letter or number. Defaults to name. Changing it destroys the application and creates a new one.

**title** (string, required)

Label shown on the Dashboard dock button.

**root** (string, required)

The application directory, relative to the blueprint file. It contains the application's package.json, and every view and web worker src is resolved relative to it.

**icon** (string)

Path to an SVG icon for the application.

**visibility** (default | unlisted | disabled)

Dashboard visibility. The default is default.

**views** (array)

The application's window, panel, tile, and asset source views, declared with the view definers. Include at least one view, and at most one window view.

**webWorkers** (array)

Background web workers, declared with defineWebWorker.

## View definers

Declare each view in the application's `views` array, and each web worker in its `webWorkers` array. Every view definer and `defineWebWorker` share these fields:

#### Properties

**name** (string, required)

Unique within the application. Use letters, numbers, hyphens, and underscores.

**title** (string, required)

Display title for the view.

**src** (string, required)

Path to the view's source file, relative to the application root.

Each view's `src` file implements the surface with the Dashboard Extension API. See the [Extension API reference](https://www.sanity.io/docs/dashboard-beta/extension-api-reference).

### `defineWindowView`

The app's main, full-page view. It fills the Dashboard to the right of the dock and any open panel, and it is the surface a traditional App SDK app renders into. An application can have at most one. If you set `entry` in `defineApplication`, the CLI creates this view for you. Use `dock` to place it in the dock. See [Customize your app's dock item](https://www.sanity.io/docs/dashboard-beta/add-your-app-to-the-dock) for groups and ordering.

#### Properties

**dock** (object)

Dock placement. dock.group is system, applications, or user, and defaults to applications. dock.order sorts views within the group in ascending order.

### `definePanelView`

A view that opens beside the current app from its own dock item. See [Render a panel](https://www.sanity.io/docs/dashboard-beta/render-a-panel) for the panel source file.

#### Properties

**dock** (object)

Dock placement. dock.group is system, applications, or user, and defaults to applications. dock.order sorts views within the group in ascending order.

### `defineTileView`

A view on the Dashboard home page. See [Render a tile on the homepage](https://www.sanity.io/docs/dashboard-beta/render-a-tile) for the tile source file.

#### Properties

**size** (small | large | banner, required)

The tile's footprint in the home page grid.

**order** (number)

Sort position on the home page, ascending.

### `defineAssetSourceView`

A custom asset source shown in asset pickers.

### `defineWebWorker`

A background worker. Declare it in the application's `webWorkers` array, not `views`. See [Run a background service](https://www.sanity.io/docs/dashboard-beta/run-a-background-service) for the worker source file.

## Related

#### Explore applications

[Define an application with Blueprints](https://www.sanity.io/docs/blueprints/deploy-an-application-with-blueprints)
Deploy an SDK app as a blueprint resource with defineApplication and its view definers.

[Extension API reference](https://www.sanity.io/docs/dashboard-beta/extension-api-reference)
Reference for defineApplication, the view and web worker helpers, unstable_defineView, unstable_defineService, and unstable_defineMediaLibrary.

[Render a panel](https://www.sanity.io/docs/dashboard-beta/render-a-panel)
Render a panel surface as part of your app.

[Run a background service](https://www.sanity.io/docs/dashboard-beta/run-a-background-service)
Run a Web Worker for your app while the Dashboard is open.

