# Workspaces & projects

The two objects everything else in the dashboard hangs off: who can do what in a workspace, how projects group builds and keys, and what the settings pages change.

Source: https://www.afterpack.dev/docs/dashboard/workspaces

A **workspace** owns the subscription, the [allowance pool](https://www.afterpack.dev/docs/dashboard/usage), the projects, and the [API keys](https://www.afterpack.dev/docs/dashboard/api-keys); a **project** groups the [builds](https://www.afterpack.dev/docs/dashboard/builds) those keys produce. Everything else in the dashboard is scoped to one or the other, which is why both have a selector at the top of the sidebar. [Registering](https://www.afterpack.dev/docs/accounts) creates one workspace for you with a `Default` project inside it. You can belong to several workspaces, your own plus any you are invited to, each [billing separately](https://www.afterpack.dev/docs/tiers).

## Roles

Three roles.

| | Owner | Admin | Member |
| --- | --- | --- | --- |
| Read the workspace, its projects, builds, protection maps and usage | Yes | Yes | Yes |
| Read billing state | Yes | Yes | Yes |
| Rename the workspace, create / rename / delete projects | Yes | Yes | No |
| Create and revoke API keys | Yes | Yes | No |
| Invite members, revoke invites, change a member's role | Yes | Yes | No |
| Open the payment portal, start a checkout, edit the billing profile | Yes | Yes | No |
| Change plan, cancel, resume, change the overage setting | Yes | No | No |
| Delete the workspace | Yes | No | No |
| Leave the workspace | See below | Yes | Yes |

There is always exactly one owner, who cannot be removed; removing someone else needs admin or above, while removing yourself (leaving) is always allowed. You cannot transfer ownership, which is why an owner cannot leave a workspace they own.

> **Note**
>
> Members are unlimited on every tier, Free included. Plans bound **projects** and **MB**, never people.

## Workspace settings

The page the sidebar labels **Settings**, under the workspace.

- **Name**: click the title to rename. Admin+.
- **Members**: one row per member: who they are, their role, and when they joined, with your own row marked *You*. Admins can change a role or remove someone; a pending invite shows in the same view, marked *Invited*, with how long it has left.
- **Pending invites**: email, role, when it was sent, when it expires. Invites are sent by email and expire after **7 days**; opening the link authenticates that address and accepts the invite in one step. Revoking an invite kills its link immediately, and invites can be issued as `admin` or `member`, never `owner`.
- **Danger zone**: *Leave workspace* (you lose access to it and all its projects immediately, and need a new invite to return), and for the owner, *Delete workspace* (the workspace, its projects, and all its API keys, permanently).

Inviting someone who is already a member, or who already has a pending invite, is rejected.

## Projects

A project is how a workspace subdivides its work. [API keys](https://www.afterpack.dev/docs/dashboard/api-keys) are bound to a project, and a build inherits its project from the key that made it, grouping builds, [protection maps](https://www.afterpack.dev/docs/protection-map), usage, and [diagnostics](https://www.afterpack.dev/docs/diagnostics) under it. Create one from the project selector in the sidebar (*New project*); plans cap how many a workspace can have, and hitting the cap returns an upgrade prompt. See [Plans & tiers](https://www.afterpack.dev/docs/tiers) for the per-tier limit.

### Project settings

- **Name**: click the title to rename. Admin+.
- **Protection Map**: "Store a Protection Map for every Pro Cloud build". On by default. This is a [privacy switch](https://www.afterpack.dev/docs/privacy).

A stored map embeds your original source and is readable by everyone in the workspace; see [Privacy & data handling](https://www.afterpack.dev/docs/privacy#protection-maps-for-cloud-builds-are-stored-and-you-can-turn-that-off) for retention and the per-project switch. Turning capture off stops new builds from retaining source, though the numbers behind your charts keep being recorded either way, and maps already stored stay available until they expire.

- **Danger zone**: *Delete project*. Permanent. Keys bound to it keep working, but stop attributing builds to it.

Turning capture off also gives back build time, since producing and returning the map is a real share of a Pro Cloud build's edge time.

## Setting up a new project

A project with no builds shows a checklist instead of empty charts, in the order the steps actually have to happen:

1. [Install the plugin](https://www.afterpack.dev/docs/frameworks) for your bundler.
2. [Create a project API key](https://www.afterpack.dev/docs/dashboard/api-keys).
3. [Set the key in your CI environment](https://www.afterpack.dev/docs/builds).
4. [Add the plugin to your bundler config](https://www.afterpack.dev/docs/quickstart#pick-your-framework).
5. Push a build. It appears here automatically.

## Next

- [API keys](https://www.afterpack.dev/docs/dashboard/api-keys): the credential that binds builds to this project.
- [Builds](https://www.afterpack.dev/docs/dashboard/builds): what shows up once a key is in use.
- [Usage & billing](https://www.afterpack.dev/docs/dashboard/usage): the pool all a workspace's projects draw from.
- [Accounts](https://www.afterpack.dev/docs/accounts): what an account is for, and your own account page.
