---
title: Monorepos
description: Deploy one or more applications from a single repository.
order: 6
---

A monorepo holds multiple applications in one repository. Atlasflow supports monorepos through the project **root directory** setting.

## Root directory

The **root directory** tells Atlasflow which subdirectory to treat as the application root. Builds, the Dockerfile path, and auto-detection all resolve relative to it. The path must start with `/`; use `/` for the repository root.

Consider this layout:

```text
my-repo/
├── apps/
│   ├── api/
│   │   └── Dockerfile
│   └── web/
│       └── Dockerfile
└── packages/
    └── shared/
```

To deploy the API, set the project's **root directory** to `/apps/api`. Atlasflow looks for the Dockerfile at `/apps/api/Dockerfile` (the Dockerfile path is relative to the root directory).

## Deploying multiple apps

Each Atlasflow [project](/docs/concepts/projects.md) maps to one application. To deploy both `api` and `web` from the same repository, create **two projects**, both connected to the same repository, with different root directories:

| Project       | Root directory |
| ------------- | -------------- |
| `my-repo-api` | `/apps/api`    |
| `my-repo-web` | `/apps/web`    |

A push to the default branch triggers a new deployment for every project connected to that repository.

## Shared packages

If your app depends on shared code outside its root directory (for example `packages/shared`), make sure your build can access it. With a Dockerfile, set the build context appropriately or include the shared paths your build needs. With automatic builds, keep dependencies declared in the app's own manifest where possible.

> **Note:** If your build can't find a shared package, it usually means the package lives outside the root directory and isn't part of the build context. Move the dependency into the app or adjust your Dockerfile to include it.

## Next steps

- [Configuration](/docs/guides/configuration.md): set the root directory and Dockerfile path.
- [Supported frameworks](/docs/guides/supported-frameworks.md): Dockerfile vs automatic builds.
- [Projects](/docs/concepts/projects.md): one project per app.