2. Projects and environments
Level: structure. How work is organized inside an organization, what never changes and why a deletion can be refused. The previous page is Navigation and session, the next one is Members and roles.
The hierarchy
Organization (tenant)
└── Project (stable slug, e.g. mobile-suite)
└── Environment (name, e.g. staging / production)
└── App (appId, with its configuration)
Each level separates one precise thing:
- the project groups what is released together (a product, a customer, a line of apps);
- the environment separates the stages (
development,staging,production): the same app in two environments has two independent configurations, and there is no automatic promotion from one to the other; - the app is not created here: it comes into being the moment a configuration is saved for it in an environment (Configurations).
A newly created organization already has a default project with a default environment, so you can publish straight away without creating anything.
Creating, renaming, deleting
Everything happens from the Projects tree in the sidebar. You need at least the Editor role: a Viewer sees the commands too, but Squiddy refuses them with “You do not have permission to manage this project.” (or this environment).
| Action | Where | Notes |
|---|---|---|
| New project | The + button (New project) next to Projects | Only the name is needed |
| New environment | The project's menu → Add environment | The name is unique within the project |
| Rename | The menu of the project or the environment → Rename | Changes only the name you see |
| Delete | The menu of the project or the environment → Delete | Only if it is empty: see below |
The project's slug never changes
A project has two identifiers, and they behave in opposite ways:
| Name | Slug | |
|---|---|---|
| What it is for | The name you read in the dashboard | The project's stable reference |
| Can it change? | Yes, whenever you want | No, never |
| Where it comes from | You write it | Derived from the name when the project is created |
The New project window shows it as you type (Generated slug), so you know which reference you are about to fix. The name must contain at least one Latin letter or number, otherwise it gives no slug; accents become plain letters (à → a).
The slug does not change to protect whoever quotes it: renaming the project must not make a slug already written in a ticket or a script wrong. The apps, on the other hand, do not send it: Squiddy works out organization, project and environment from the API key they call with (page 4). If a name is wrong, you rename the name; if the slug is wrong, the way out is to create a new project and move the configuration into it.
The slug also appears at the top of the environment's Configurations page (Project slug), with the button to copy it.
Why a deletion is refused
Squiddy never deletes the content together with its container. When this happens, the message is:
This project still has children and cannot be deleted. Remove them first.
For an environment the message says This environment.
| You want to delete | It is refused if |
|---|---|
| A project | It still has at least one environment |
| An environment | It still has at least one configuration that is not archived |
So the order for taking things apart is: delete the environment's configurations (Configurations), then the environment, then the project. It is slow on purpose: deleting a project with all its content would take away configurations the apps are using with a single click.
Once deleted, projects and environments cannot be recovered: the confirmation says so (“This cannot be undone”).
Effects on API keys
API keys belong to one environment: the key determines organization, project and environment for every call the apps make (page 4). Therefore:
- a new environment cannot be reached by the apps until you generate a key for it;
- deleting an environment (once emptied) makes its keys useless;
- renaming an environment does not invalidate its keys: the key points to the environment, not to its name.
How to organize, in practice
There is no limit to the number of projects or environments, so pick what reads best:
- one project per product, not per app: the apps of the same product share environments and keys, and belong together;
- the environments you actually release to: an extra environment nobody publishes to is just a place to publish to by mistake;
- consistent environment names across projects (
stagingalwaysstaging): the name is what you read when you decide whether to publish, and consistency is what makes you notice you are in the wrong place.