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

# Application management

> Create, configure, and deploy applications from BRICKS Controller

[BRICKS Controller](/controller) is where you create, configure, version, and deploy applications to your devices.

## Creating an application

You can create and build applications in several ways:

* **BRICKS Controller** — Create in the **Applications** tab, then use the [Config Editor](/controller/config-editor) to build visually in the browser
* **[CTOR](/ctor)** — Build with an AI agent in a desktop IDE
* **[BRICKS CLI](/cli)** — Create from the command line with `bricks app new`

### From BRICKS Controller

<Steps>
  <Step title="Open applications">
    In BRICKS Controller, go to **Applications**.
  </Step>

  <Step title="Create a new application">
    Click **Create Application** and enter a name and description.
  </Step>

  <Step title="Configure the application">
    Set the viewport, secrets, and other options for your application.
  </Step>
</Steps>

## Config Editor

Open an application and click **Config Editor** to build and edit its configuration visually in the browser. The Config Editor lets you manage subspaces, canvases, bricks, generators, data, animations, and actions — without writing code.

<Card title="Config Editor guide" icon="pen-to-square" href="/controller/config-editor">
  Learn how to use the Config Editor to build and edit BRICKS applications.
</Card>

## Binding applications to devices

Assign an application to one or more devices so they start running it:

1. Open the application detail page
2. Go to the **Devices** tab
3. Click **Add Device** and select the target devices or device groups
4. The application deploys automatically to the selected devices

<Info>
  You can also bind applications to device groups to deploy to all devices in the group at once.
</Info>

## Viewport presets

Configure viewport presets to define how your application renders on different screen sizes:

1. Open the application detail page
2. Go to **Settings** > **Viewport**
3. Set the width and height, or choose from preset sizes

Viewport settings determine the rendering resolution on the device, independent of the physical screen size.

## Application versioning

Each deployment creates a new version of your application. You can:

* **View version history** — See all deployed versions with timestamps and changelogs
* **Roll back** — Revert to a previous version if needed
* **Set active version** — Choose which version devices should run

## Releases and sharing

Create public releases to share your application:

1. Open the application detail page
2. Go to **Releases**
3. Click **Create Release** and select the version to release
4. Share the public URL with others

Public versions allow anyone with the link to view your application.

## Secrets management

Store sensitive values like API keys that your application can access at runtime:

1. Open the application detail page
2. Go to **Settings** > **Secrets**
3. Add key-value pairs

<Warning>
  Secrets are encrypted at rest and only available to the application at runtime. Do not store secrets in your application code.
</Warning>

## Application testing

Test your application before deploying to production devices:

* **Simulator** — Run your application directly in the [Config Editor](/controller/config-editor)'s Simulator, or use `bun invoke-simulator` from a [bricks-ctor](/ctor-pkg) project
* **Virtual devices** — Deploy to a [virtual device](/controller/devices) for cloud-based testing
* **Staging devices** — Bind a dedicated staging device for integration testing
* **[Automations](/foundation/automations)** — Run end-to-end automation tests on devices to validate application behavior

## Generate a project

Convert an existing application into a [bricks-ctor](/ctor-pkg) TypeScript codebase for code-first development:

### Download from BRICKS Controller

1. Open the application detail page
2. Click **Generate Project**
3. Configure AI instructions and CI/CD options
4. Click **Download Project (.zip)**

### Initialize with BRICKS CLI

```bash theme={null}
bricks ctor init <application-id> --yes
```

### Initialize with CTOR

Open the application in [CTOR](/ctor) and use the AI agent to pull and set up the project.

The generated project includes TypeScript source files, build scripts, and optional AI agent instructions and CI/CD workflows. See [bricks-ctor getting started](/ctor-pkg/getting-started) for the full development workflow.
