# Project lifecycle

A project's files change on branches you test in live previews, then become a release you deploy to an environment such as staging or production.

## 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
```

[Learn more about Projects](/docs/projects/create-project.md)

## 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
```

[Learn more about Branches](/docs/projects/create-branch.md)

## 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
```

[Learn more about Preview environment](/docs/projects/preview.md)

## 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
```

[Learn more about Releases](/docs/deployment/publish.md)

## 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/runtime/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
```

[Learn more about Environments](/docs/runtime/environments.md)

<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/deployment/publish.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
```

[Learn more about Deployments](/docs/deployment/publish.md)

## 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 with `veryfront pull --release <version>`, for review.

## Next steps <span id="next"></span><span id="related"></span>

* [Publish](/docs/deployment/publish.md)
* [Create a branch](/docs/projects/create-branch.md)
