# Project lifecycle

Develop and test changes with live previews, then create a release and deploy it to staging or production environments.

## Projects

<span id="project-boundaries"></span><span id="what-belongs-to-the-project"></span><span id="project-and-environment-boundaries"></span>

A project groups an application’s versioned files, resources and execution history. Developers and business users work on the same project through Code and Studio.

```project-contents
Project
Source | Files, file versions and branches
Resources | Agents, knowledge, uploads and integrations
Delivery | Releases, environments and deployments
Orchestration | Conversations, schedules, webhooks and runs
```

## Branches

<span id="files-branches-and-live-previews"></span><span id="branches-and-live-previews"></span>

A **branch** lets you change project files independently. Each branch selects file versions. Branches can share unchanged files and use different versions of edited files.

Only the agent file changes in the feature branch:

```branch-map
Project branches
main | agents/support.ts: v7; tools/orders.ts: v3
shorter-replies | agents/support.ts: v8; tools/orders.ts: v3
```

## Preview environment

<span id="live-previews"></span>

The **Preview environment** is the project’s default development environment. It runs the selected branch’s files and updates as they change. Test changes in Chat or Preview without creating a release.

```preview-map
Preview environment
main | Live preview
shorter-replies | Live preview
```

## Releases

<span id="releases-capture-a-version"></span>

A **release** captures an immutable set of file versions from a branch.

```release-snapshot
Release 42
agents/support.ts | v8
tools/orders.ts | v3
```

## Environments

<span id="environments-and-deployments"></span><span id="one-system-different-settings"></span><span id="environment-configuration"></span><span id="what-an-environment-describes"></span><span id="environments-supply-configuration"></span>

An **environment** groups [configuration](/docs/studio/guides/configure-environments.md), domains and servers used to run the application. Shared servers are the default. Dedicated servers are available as add-ons.

```environment-map
Environment
Configuration | Variables and secrets
Domains | Application addresses
Servers | Shared or dedicated execution
```

<span id="configuration"></span><span id="servers"></span><span id="runtime-options"></span><span id="work-and-execution-infrastructure"></span>

Preview runs branch files with live updates. Staging and production run selected releases. Environment settings are separate from the file versions in a release.

## Deployments

<span id="deployments-connect-the-two"></span><span id="check-what-is-running"></span><span id="inspect-and-improve"></span><span id="deployment-and-execution"></span><span id="deployment-and-execution-have-separate-lifecycles"></span><span id="version-and-configuration-during-an-investigation"></span><span id="runtime-targets"></span><span id="environment-or-runtime-target"></span>

A **deployment** assigns a release to an environment. [Deploy the release](/docs/studio/guides/deploy-project.md) to staging and verify it, then deploy the same release to production. Each environment has its own deployment and configuration.

```release-map
Release 42
Staging | 1. Deploy and verify
Production | 2. Deploy the same release
```

## Git and CI/CD

<span id="work-between-code-studio-and-git"></span>

Use Git and CI/CD when changes need your team’s review and automated delivery process:

```git-flow
Shared Git delivery
Code | Changes made in a local Git branch
Studio | Release snapshot pulled into a Git branch
Git review -> CI checks -> Release and deploy
```

CI can push reviewed source into the project, create a release and deploy it. Studio changes return to Git through a [release snapshot handoff](/docs/code/guides/move-studio-changes-to-git.md) for review.

<span id="next"></span><span id="related"></span>
