# Setting up a production project

In Union.ai, your work is organized in a hierarchy with the following structure:

* **Organization**: Your Union.ai instance, accessible at a specific URL like `union.my-company.com`.
* **Domains** Within an organization there are (typically) three domains, `development`, `staging`, and `production`, used to organize your code during the development process.
You can configure a custom set of domains to suit your needs during [onboarding](https://www.union.ai/docs/v1/union/user-guide/deployment/configuring-your-data-plane).
* **Projects**: Orthogonal to domains, projects are used to organize your code into logical groups. You can create as many projects as you need.

A given workflow will reside in a specific project. For example, let's say `my_workflow` is a workflow in `my_project`.

When you start work on `my_workflow` you would typically register it in the project-domain `my_project/development`.

As you work on successive iterations of the workflow you might promote `my_workflow` to `my_project/staging` and eventually `my_project/production`.

Promotion is done simply by [re-registering the workflow to the new project-domain](https://www.union.ai/docs/v1/union/user-guide/development-cycle/setting-up-a-project/running-your-code).

## Terminology

In everyday use, the term "project" is often used to refer to not just the Union.ai entity that holds a set of workflows,
but also to the local directory in which you are developing those workflows, and to the GitHub (or other SCM) repository that you are using to store the same workflow code.

To avoid confusion, in this guide we will stick to the following naming conventions:

* **Union.ai project**: The entity in your Union.ai instance that holds a set of workflows, as described above. Often referred to simply as a **project**.
* **Local project**: The local directory (usually the working directory of a GitHub repository) in which you are developing workflows.

## Create a Union.ai project

You can create a new project in the Union.ai UI by clicking on the project breadcrumb at the top left and selecting **All projects**:

![Select all projects](https://www.union.ai/docs/v1/union/user-guide/_static/images/user-guide/development-cycle/setting-up-a-project/select-all-projects.png)

This will take you to the **Projects list**:

![Projects list](https://www.union.ai/docs/v1/union/user-guide/_static/images/user-guide/development-cycle/setting-up-a-project/projects-list.png)

Click on the **New Project** button and fill in the details for your new project.

You now have a project on Union.ai into which you can register your workflows.
The next step is to set up a local workflow directory.

## Creating a local production project directory using `union init`

Earlier, in the [Getting started](https://www.union.ai/docs/v1/union/user-guide/development-cycle/getting-started/_index) section we used `union init`
to create a new local project based on the `union-simple`.

Here, we will do the same, but use the `union-production` template. Perform the following command:

```shell
$ union init --template union-production my-project
```

## Directory structure

In the `basic-example` directory you’ll see the following file structure:

```shell
├── LICENSE
├── README.md
├── docs
│   └── docs.md
├── pyproject.toml
├── src
│   ├── core
│   │   ├── __init__.py
│   │   └── core.py
│   ├── orchestration
│   │   ├── __init__.py
│   │   └── orchestration.py
│   ├── tasks
│   │   ├── __init__.py
│   │   └── say_hello.py
│   └── workflows
│       ├── __init__.py
│       └── hello_world.py
└── uv.lock
```

You can create your own conventions and file structure for your production projects, but this tempkate provides a good starting point.

However, the separate `workflows` subdirectory and the contained `__init__.py` file are significant.
We will discuss them when we cover the [registration process](https://www.union.ai/docs/v1/union/user-guide/development-cycle/setting-up-a-project/running-your-code).

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/user-guide/development-cycle/setting-up-a-project.md
**HTML**: https://www.union.ai/docs/v1/union/user-guide/development-cycle/setting-up-a-project/
