Introducing a new way to review your PRs.

Read the announcement

gotempsh / temps

AI-native open-source alternative to Vercel + Sentry + PostHog + Pingdom + Resend + E2B. 440+ CLI operations with drop-in skills for Claude Code, Codex & OpenCode — deployments, analytics, session replay, error tracking, OpenTelemetry, email, sandboxes & AI gateway in one self-hosted Rust binary.

View on GitHub

25 documents · Updated Oct 21, 2026

docs / projects-and-environments

Projects and environments

Projects and environments define the application contexts that Temps can deploy or observe. A project holds the stable application identity and shared source and runtime policy. An environment gives that project a branch-linked place to run with its own route, overrides, deployment state, and runtime health view. The deployment lifecycle acts on these contexts, while deployment orchestration, domains and networking, backup and recovery, and managed services and data import consume the state they provide.

Context model

The context model separates what an application is from where it runs. A project is the durable parent. An environment is a child context that can track a branch and receive a deployment without copying the project definition.

The first environment is normally the production target. Other environments can represent staging, previews, or test targets. A branch can map to more than one environment, so branch identity and environment identity remain separate.

This flow shows how source and policy become a deployable context.

flowchart TD
    Source[Repository, image, archive, or monitoring target] --> Project[Project identity]
    Project --> Preset[Preset and build rules]
    Project --> Defaults[Shared project policy]
    Project --> Environment[Named environment and branch]
    Defaults --> Effective[Effective environment settings]
    Environment --> Effective
    Preset --> Effective
    Effective --> Deployment[Deployable application context]

Project identity

Project identity gives an application a stable name and scope. It includes a display name, a URL-safe slug, a source type, a main branch, repository data when needed, a preset, and the project lifecycle type. The slug also provides the base for generated environment hostnames. The resolved preset determines whether the project is a static or server application unless the project is a service project. A project can also be an external, monitoring-only project that has no hosted runtime until hosting is enabled. crates/…/project.rs• L321-362, crates/…/project.rs• L1400-1421, crates/…/types.rs• L370-460

The source type and project type describe different parts of identity. The source type selects the deployment input. The project type describes the application lifecycle. This keeps a service project tied to its reviewed release even when its runtime uses an image source. Hosting adds another boundary: hosted projects can run through Temps, while external projects only send telemetry until an operator changes that state. crates/…/project.rs• L2371-2425, crates/…/types.rs• L269-300, crates/…/types.rs• L448-460

Some project slugs can grant a deployment access to the host Docker socket. Temps treats a change onto or away from such a slug as a protected project-identity change. The detail view reports the capability so operators can distinguish a normal project from one with host access. A project with this capability also restricts who can change its source or runtime and who can deploy it. crates/…/project.rs• L1825-2161, crates/…/project.rs• L2241-2251, crates/…/handlers.rs• L1300-1311

References: crates/…/project.rs• L321-362 crates/…/project.rs• L1400-1421 crates/…/project.rs• L1825-2161 crates/…/project.rs• L2241-2251 crates/…/project.rs• L2371-2425 crates/…/handlers.rs• L1300-1311 crates/…/types.rs• L269-300 crates/…/types.rs• L370-460

Environment identity

An environment is a named child of one project. It records the branch it tracks, its generated subdomain, its current deployment, its effective settings, and whether it is a preview or protected target. It is the main unit for deployment status and runtime state. crates/…/environment_service.rs• L419-535, crates/…/handler.rs• L226-280

Environment creation binds a name to a branch and claims a unique generated subdomain. The main branch uses the default environment. A non-main branch reuses its active environment when one exists, restores a soft-deleted one when possible, or creates a preview environment. Explicit environments may share a branch. crates/…/environment_service.rs• L623-720, crates/…/environment_service.rs• L722-848

Generated hostnames are part of the environment context. Renaming an environment changes its generated hostname and its managed domain in one change. A custom domain is a separate attachment and remains independent of that generated hostname. The route view is refreshed after changes that affect request handling. crates/…/environment_service.rs• L1077-1180, crates/…/environment_service.rs• L1034-1072

References: crates/…/environment_service.rs• L419-535 crates/…/environment_service.rs• L623-720 crates/…/environment_service.rs• L722-848 crates/…/environment_service.rs• L1034-1072 crates/…/environment_service.rs• L1077-1180 crates/…/handler.rs• L226-280

Source and repository context

The source context tells Temps where deployable input comes from and how future changes map to a project. Repository ownership, repository name, source directory, main branch, provider connection, repository visibility, and clone URL belong to the project. Environments select the branches and deployment targets inside that shared source context.

Git projects need a repository and branch. Image and static-file projects can work without a repository and wait for an explicit deployment input. An external project has no hosted source until an operator enables hosting through the supported setup path. crates/…/handlers.rs• L1050-1061, crates/…/project.rs• L1137-1164, crates/…/project.rs• L1400-1421

An uploaded source archive can be inspected before project creation. The inspection identifies deployable roots and likely presets without retaining the upload. This gives a creator a safe project choice when one archive contains several applications. crates/…/handlers.rs• L652-759

Archive inspection applies the same source-safety rules used by deployment. Environment files, version-control data, and generated dependency folders are left out and reported. Private keys and credential files are refused with the archive entry named in the error. crates/…/handlers.rs• L641-655, crates/…/handlers.rs• L864-879, crates/…/handlers.rs• L895-1034

The project can point at a relative subdirectory inside a repository. This lets one repository provide more than one application context while keeping each context inside the checked-out source tree. The directory is normalized as a path inside the source root. When a Git source location changes, Temps checks the selected root directory against the configured branch before it saves the project. A confirmed missing path is rejected with the repository, branch, and path in the error. If the provider cannot give a definite answer, the save continues and the first deployment checks the checkout. crates/…/types.rs• L203-228, crates/…/project.rs• L631-657, crates/…/project.rs• L1124-1234, crates/…/project.rs• L1501-1517, crates/…/project.rs• L3013-3044, crates/…/project.rs• L3731-3754

Repository selection

Repository selection is a project concern rather than an environment concern. Git settings validate the provider connection and branch, select or update the preset, set the clone identity, and manage provider webhooks when supported. The stored provider type is authoritative for the Git host. Clients must not infer that host from a clone URL because self-hosted providers can use any host name. crates/…/types.rs• L381-397, crates/…/types.rs• L80-91

Repository identity and clone URL must describe the same source. A partial settings update cannot move the owner or repository name while leaving a clone URL that still points to the old repository. crates/…/project.rs• L166-204, crates/…/project.rs• L3157-3183

The main source type and alternate-source policy are separate choices. Changing the source type changes the primary deployment path. Enabling alternate sources keeps the primary Git identity and adds another accepted input. Docker images and static bundles remain accepted deployment inputs for every project. crates/…/types.rs• L277-297, crates/…/handlers.rs• L1460-1599, crates/…/project.rs• L2371-2499

References: crates/…/handlers.rs• L641-759 crates/…/handlers.rs• L864-879 crates/…/handlers.rs• L895-1034 crates/…/handlers.rs• L1050-1061 crates/…/handlers.rs• L1460-1599 crates/…/types.rs• L203-228 crates/…/types.rs• L277-297 crates/…/types.rs• L381-397 crates/…/project.rs• L1124-1234 crates/…/project.rs• L1400-1421 crates/…/project.rs• L2371-2499 crates/…/project.rs• L3157-3183 crates/…/types.rs• L80-91

Presets and build context

A preset describes how Temps turns source input into a runtime. It records the build shape and the options that shape needs. The project stores the resolved preset and its configuration so later deployments use the same build contract. crates/…/project.rs• L312-362, crates/…/types.rs• L211-228

Preset resolution also establishes the broad project type. The full resolved configuration matters because a framework preset can produce static output and a Nixpacks configuration can select a server or static runtime. crates/…/project.rs• L321-349

Preset configuration updates preserve omitted values when the selected preset stays compatible. This makes a small change to one build option safe. The resulting configuration is validated before it becomes the project contract. Compose public routes are also checked for clear service and port identities. crates/…/project.rs• L365-487, crates/…/project.rs• L490-566

Compose security policy

Compose security policy defines the project-level rules that protect services in a Compose application. It is managed separately from ordinary preset edits so a change can state the risk it accepts and can be checked against the policy that the operator last viewed. Only an instance administrator can change this policy. crates/…/compose_security.rs• L18-35, crates/…/compose_security.rs• L40-103

Legacy per-service sandbox exceptions are no longer accepted through generic project creation or update paths. A project with old grants must move to the named advanced policies and acknowledge the migration before the new policy is saved. Security-policy changes are audited without storing secret-bearing Compose content. crates/…/compose_security.rs• L106-153, crates/…/audit.rs• L169-211, crates/…/handlers.rs• L1050-1057

References: crates/…/compose_security.rs• L18-35 crates/…/compose_security.rs• L59-103 crates/…/compose_security.rs• L143-153 crates/…/audit.rs• L169-211 crates/…/handlers.rs• L1050-1057 crates/…/project.rs• L312-566

Template catalogs

Templates provide a guided project starting point. A template can describe source, preset, resources, required inputs, linked services, routes, and managed-service bindings. Starter templates can create Git-backed projects. Service templates can create native image projects that retain a reviewed release identity. crates/…/templates.rs• L23-69, crates/…/templates.rs• L175-220

Template creation uses one shared set of rules for runtime overrides, variable defaults and generators, managed-service requirements, and access to linked services. This keeps one-click creation and multi-service instantiation aligned. Image services use an immutable image reference; source services use a repository target. crates/…/template_creation.rs• L93-220, crates/…/template_creation.rs• L363-475, crates/…/template_creation.rs• L880-1043

Template creation has three broad paths:

  • A service template uses its reviewed image and runtime identity.
  • A connected Git provider can receive a fork, which gives the project its own repository and push-based deployment path.
  • Without a provider connection, the project can deploy from the template's public repository without a fork. This path does not receive push webhooks.

The selected path changes the future source of deployments but does not change the project and environment model. Platform settings also supply the public hostname used when a template generates an application URL. crates/…/templates.rs• L256-330, crates/…/handlers.rs• L3420-3500, crates/…/template_creation.rs• L768-798, crates/…/service.rs• L1323-1332

References: crates/…/project.rs• L312-566 crates/…/templates.rs• L23-69 crates/…/templates.rs• L175-220 crates/…/handlers.rs• L3264-3560 crates/…/template_creation.rs• L93-220 crates/…/template_creation.rs• L363-475 crates/…/template_creation.rs• L880-1043 crates/…/service.rs• L1323-1332

Template release migrations

Service template upgrades move a project from its applied release to a newer release in the same service family. Temps first compares the applied snapshot with the catalog release. The preview reports runtime fields, inputs, managed services, and service bindings so the operator can review the migration. A catalog change without a new version is treated as drift rather than as an upgrade.

Existing project values remain in place. New required inputs must be supplied or resolved from the target release. The apply step rejects a stale preview and rejects catalog changes that do not carry a new version. A target release cannot remove or remap services and bindings that older deployments need for rollback. A single-service upgrade cannot silently become a multi-service application; that change must be applied as a whole-app operation. crates/…/types.rs• L868-912, crates/…/handlers.rs• L2414-2482, crates/…/handlers.rs• L2500-2656, crates/…/project.rs• L5716-5819

References: crates/…/types.rs• L868-912 crates/…/handlers.rs• L2414-2482 crates/…/handlers.rs• L2500-2656 crates/…/project.rs• L863-908 crates/…/project.rs• L5716-5819

Configuration inheritance

Configuration follows a parent-to-child model. Instance settings provide platform defaults and hard ceilings. Project settings provide shared deployment defaults. Environment settings override only the values that differ. The deployment flow uses the effective result after these scopes are combined.

The settings cover resources, replicas, ports, automatic deployment, placement, request limits, on-demand mode, access controls, build architecture, build location, readiness time, and image retention. An omitted environment value keeps its current meaning. An explicit value pins that setting for the environment. An explicit clear removes an environment override where the setting supports it. Empty placement selections clear the environment override instead of creating an impossible placement rule. crates/…/types.rs• L724-780, crates/…/types.rs• L785-840, crates/…/environment_service.rs• L851-980

Project defaults also include build placement and readiness behavior. A project can prefer image builds on the control plane or on a worker node. The worker choice falls back to the control plane when no worker can take the build. A project can also set the time allowed for a new deployment to start and pass its readiness check. Environments inherit these values and can override them. crates/…/types.rs• L798-840, crates/…/project.rs• L5100-5190

Instance settings are shared state rather than a private console snapshot. A settings write preserves values owned by dedicated security or credential flows, validates the complete effective document, and updates the stored settings row. Other processes learn about the change through a database notification and refresh their cached view. If that notification is unavailable, the cache still expires after a short safety period. crates/…/handler.rs• L2343-2428, crates/…/service.rs• L1643-1703, crates/…/service.rs• L2006-2127

Environment changes validate the stored environment profile after the requested fields are applied. Project and environment writes can also be limited by instance resource ceilings. Settings that affect proxy behavior publish a route change signal so the active route view does not remain stale. crates/…/environment_service.rs• L981-1074, crates/…/handler.rs• L1255-1375

This flow shows the precedence used to form runtime settings.

flowchart LR
    Global[Instance defaults and ceilings] --> Project[Project defaults]
    Project --> Environment[Environment overrides]
    Environment --> Effective[Effective context settings]
    Effective --> Deployment[Deployment and runtime]

References: crates/…/handler.rs• L2343-2428 crates/…/service.rs• L1643-1703 crates/…/service.rs• L2006-2127 crates/…/service.rs• L1323-1332 crates/…/types.rs• L724-840 crates/…/project.rs• L5100-5190 crates/…/environment_service.rs• L851-1074 crates/…/handler.rs• L1255-1375

Installation identity and secrets

The installation identity controls how a Temps instance keeps its core secrets and whether it can run without local secret files. Local installations load or create persistent authentication and encryption secrets under the data directory. Stateless installations require those secrets through direct environment values or secret files and use the persisted database identity as the runtime authority. crates/…/installation_secrets.rs• L35-98, crates/…/service.rs• L737-802

The bootstrap environment flag only requests stateless mode during startup. Once the database is available, the persisted installation mode wins. Direct and file sources cannot be set at the same time. Missing or invalid stateless secrets stop startup instead of creating local state by accident. crates/…/installation_secrets.rs• L101-160, crates/…/service.rs• L749-802

References: crates/…/installation_secrets.rs• L13-23 crates/…/installation_secrets.rs• L35-160 crates/…/installation_secrets.rs• L163-224 crates/…/service.rs• L737-802

Variables and secrets

Runtime variables provide values to an application's deployment. A value can apply to all environments or to selected environments. A production-specific value takes precedence over a global value with the same key. Linked services can also supply values. A manual value shadows an integration value with the same key.

Temps separates ordinary variables from secrets. Ordinary variables can be revealed through a permission-checked and audit-logged path. Secrets are encrypted at rest, masked in normal responses, and write-only through the HTTP API. A regular variable can be promoted to a secret, but a secret cannot be demoted; the safe path back to an ordinary variable is to create a new value. crates/…/env_var_service.rs• L46-68, crates/…/handler.rs• L164-177, crates/…/audit.rs• L201-254

The resolved variable view combines manual values with variables supplied by linked services. Manual values remain visible as manual entries that override integrations. An integration key supplied by more than one service must identify its service before a plaintext value can be revealed. crates/…/handler.rs• L566-718, crates/…/handler.rs• L721-868

Project secrets have their own scope. No environment binding means project-wide use. Environment bindings restrict use to the listed environments. Compose-service bindings can further restrict a secret to selected services. Secret values are decrypted only for deployment and are materialized as files rather than returned in list responses. crates/…/secret_service.rs• L359-445, crates/…/secret_service.rs• L768-821

Preview inclusion is a separate rule from environment membership. A variable or secret enters a preview only when its preview policy allows it. This keeps production data from entering a short-lived branch context by accident. crates/…/handler.rs• L566-718, crates/…/secret_service.rs• L768-775

References: crates/…/env_var_service.rs• L46-68 crates/…/env_var_service.rs• L152-198 crates/…/env_var_service.rs• L386-563 crates/…/handler.rs• L164-177 crates/…/handler.rs• L566-868 crates/…/audit.rs• L201-254 crates/…/secret_service.rs• L359-445 crates/…/secret_service.rs• L768-821

Preview and on-demand contexts

Preview environments provide branch-linked contexts for testing changes before production. A project can enable automatic preview creation for branches. Each preview keeps its own branch, route, deployment, and effective settings, so it can be removed or put to sleep without changing production. crates/…/types.rs• L415-423, crates/…/environment_service.rs• L623-720

On-demand mode lets an environment stop its containers after inactivity. A request or operator action can wake it. The environment keeps the sleep state and timing policy as part of its runtime context. State changes use a compare-and-set rule so concurrent callers do not silently overwrite one another. crates/…/environment_service.rs• L1183-1232, crates/…/handler.rs• L226-280

References: crates/…/types.rs• L415-423 crates/…/types.rs• L104-110 crates/…/environment_service.rs• L623-720 crates/…/environment_service.rs• L1183-1232

Runtime health

Runtime health shows whether the current deployment stays healthy after it passes the deployment gate. It belongs to an environment because each environment has its own deployment, replicas, probe policy, and runtime observations. The project settings provide default probe behavior, while the selected environment supplies the workload and its effective configuration. web/…/RuntimeHealthPanel.tsx• L32-65, web/…/ProjectMonitors.tsx• L350-383

This flow shows how deployment configuration becomes an environment health view.

flowchart LR
    Defaults[Project probe defaults] --> Effective[Effective environment probe]
    Environment[Environment deployment and replicas] --> Effective
    Effective --> Gate[Deployment health gate]
    Effective --> Checks[Continuous runtime checks]
    Checks --> Replica[Replica states]
    Checks --> Summary[Availability and coverage]

Health probes

Health probes are checks that describe how Temps decides if an application is ready and how it can be checked while it runs. The default policy can select automatic detection, HTTP, TCP, process, or command checks. Repository settings can replace project defaults, and Compose services keep their own service health checks. web/…/DeployDefaultsCard.tsx• L128-166, web/…/health-probe.ts• L24-116

The same policy does not imply the same runtime capability for every probe. Process, HTTP, and TCP checks can support continuous runtime monitoring. A command check can gate deployment but is not available for continuous runtime checks until the runtime can safely contain the command. A changed probe becomes part of a deployment when the environment is redeployed. web/…/runtime-health-display.ts• L17-32, web/…/RuntimeHealthPanel.tsx• L102-151

References: web/…/DeployDefaultsCard.tsx• L128-166 web/…/health-probe.ts• L24-116 web/…/runtime-health-display.ts• L17-32 web/…/RuntimeHealthPanel.tsx• L102-151

Runtime observations

Runtime observations report the health of each replica and combine those observations into availability and observation coverage. Unknown time is not counted as an outage or a success. Paused monitoring and intentional environment sleep are excluded from uptime, so the view distinguishes missing observations from failed application health. web/…/RuntimeHealthPanel.tsx• L154-195, web/…/RuntimeHealthPanel.tsx• L282-286

Worker-backed environments use their runtime health view instead of an external endpoint monitor. The project monitor page keeps independent HTTP or TCP monitors for workloads that expose an endpoint, while the project header shows worker health at deployment time and avoids presenting a worker as a browsable site. web/…/ProjectMonitors.tsx• L350-383, web/…/ProjectMonitors.tsx• L594-681, web/…/ProjectDetailHeader.tsx• L154-175, web/…/ProjectDetailHeader.tsx• L330-410

References: web/…/RuntimeHealthPanel.tsx• L154-195 web/…/RuntimeHealthPanel.tsx• L233-286 web/…/ProjectMonitors.tsx• L350-383 web/…/ProjectMonitors.tsx• L594-681 web/…/ProjectDetailHeader.tsx• L154-175 web/…/ProjectDetailHeader.tsx• L330-410

Project console surface

The project console presents the same project identity through different capabilities. Hosted projects expose deployment, environment, source, domain, variable, and runtime controls. External projects expose monitoring and telemetry first, then use a separate hosting or repository setup path before hosted controls appear. web/…/ProjectDetail.tsx• L495-657, web/…/ProjectDetail.tsx• L659-1041

The navigation groups project tools by their purpose: analytics, observation, configuration, and service settings. Feature keys can hide tools that are not enabled. Environment variables remain a project-level entry point even though their values can be scoped to environments. web/…/project-tools.ts• L45-183, web/…/project-tools.ts• L185-220, web/…/ProjectSectionLayout.tsx• L94-163

Error tracking setup turns the project identity into a usable monitoring context. It recommends a platform from the project preset, creates or reuses a project DSN, and waits for the first error before opening the error view. Temps injects the DSN into deployed runtime environments, so the source keeps the value out of production configuration. web/…/ErrorTrackingSetup.tsx• L554-655, web/…/ErrorTrackingSetup.tsx• L987-1066

References: web/…/ProjectDetail.tsx• L495-657 web/…/ProjectDetail.tsx• L719-1041 web/…/ProjectSectionLayout.tsx• L94-163 web/…/project-tools.ts• L45-220 web/…/ErrorTrackingSetup.tsx• L554-655 web/…/ErrorTrackingSetup.tsx• L987-1066

Domains and managed routes

Every hosted environment has a generated hostname and may have custom domains. The generated hostname is managed by Temps. A custom domain is an operator-owned hostname attached to an environment. A Compose project can also attach a custom domain to a named service. External projects do not receive a managed hosted endpoint until hosting is enabled. crates/…/environment_service.rs• L273-315, crates/…/environment_service.rs• L357-415, crates/…/custom_domains.rs• L382-481, crates/…/types.rs• L659-667

Generated hostnames are normalized for the proxy route table and must be unique among active environments. A custom domain must be a valid hostname, must belong to the selected project environment, and must not use a platform-reserved hostname. crates/…/environment_service.rs• L177-230, crates/…/custom_domains.rs• L107-225

Custom domains can point to another environment or project only through an explicit reassignment flow. The operation preserves the domain and certificate association but blocks changes while CDN or DNS delivery still serves the old assignment. The reassignment records a durable intent audit before ownership changes and records completion afterward. crates/…/custom_domains.rs• L575-735, crates/…/custom_domains.rs• L294-435, crates/…/audit.rs• L56-123

Hostname lookup is scoped to projects visible to the caller. An unassigned hostname and a hostname belonging to an inaccessible project have the same empty result. This prevents the lookup from becoming a project-visibility leak. crates/…/custom_domains.rs• L507-531, crates/…/custom_domains.rs• L246-291

Redirects are part of the custom-domain context. Temps accepts a bare domain by adding HTTPS, then rejects unsafe targets, self-redirects, and redirect cycles. crates/…/custom_domains.rs• L217-369

Projects can select no delivery provider or a configured provider. An explicit provider choice must be usable at creation time. An instance default that is no longer usable does not block creation; the project starts without delivery and can be configured later. crates/…/project.rs• L75-128, crates/…/project.rs• L976-1009, crates/…/types.rs• L196-202

The instance public ingress URL is the base address used by third parties that call back into Temps. It is separate from the operator-facing external URL and must not collide with an application or the preview namespace. A change is checked against stored domains and active routes before it is saved. crates/…/service.rs• L1323-1332, crates/…/handler.rs• L2595-2719, crates/…/service.rs• L1802-1835

References: crates/…/service.rs• L1323-1332 crates/…/service.rs• L1335-1407 crates/…/handler.rs• L2595-2719 crates/…/service.rs• L1802-1835 crates/…/environment_service.rs• L177-230 crates/…/environment_service.rs• L273-315 crates/…/environment_service.rs• L357-415 crates/…/custom_domains.rs• L107-225 crates/…/custom_domains.rs• L217-369 crates/…/custom_domains.rs• L507-735 crates/…/custom_domains.rs• L246-435 crates/…/audit.rs• L56-123 crates/…/types.rs• L659-701 crates/…/project.rs• L75-128

Project and environment lifecycle

Project creation assembles the durable context before deployment begins. It validates the identity, source, preset, initial runtime profile, variables, delivery choice, and linked services. It then creates the project, creates the first environment, seeds its values, and links its managed services. A hosted Git project with complete repository data can receive an initial deployment request. An image-backed template can queue its first image deployment. Other source types wait for explicit deployment input. crates/…/project.rs• L1069-1273, crates/…/project.rs• L1274-1459, crates/…/template_creation.rs• L891-1043

Each deployment targets one environment. Git deployments use a branch, commit, or tag. Image projects use an image reference, and static projects use an uploaded bundle. A deployment can also be promoted to another environment, which keeps the environment boundary explicit instead of copying project settings. web/…/ProjectDeployments.tsx• L398-483, web/…/ProjectDeployments.tsx• L516-574, web/…/ProjectDeployments.tsx• L586-649

External project creation is a separate lifecycle choice. It rejects repository, runtime, and managed-service inputs because Temps does not deploy the application in that state. Switching back to hosted reopens the deployment path. crates/…/project.rs• L1400-1421, crates/…/handlers.rs• L1576-1646

The creation path removes the project if a required follow-up step fails. This prevents a caller from seeing a project without its first environment or required setup. crates/…/project.rs• L1367-1405

Project and environment deletion use a fence before cleanup. The fence blocks new work from entering the context. Active deployments, runtime resources, and domain delivery are then handled before durable rows are removed or marked deleted. The production environment cannot be deleted. crates/…/project.rs• L2502-2662, crates/…/environment_service.rs• L1357-1419

The projects plugin can run a deletion hook immediately after the fence commits. This lets features that serve project data publicly stop serving it before the remaining cleanup finishes. crates/…/plugin.rs• L118-140, crates/…/types.rs• L50-53

Changes that affect deployment or routing publish an update after the durable change. Consumers use that signal to refresh their view. Source changes also coordinate managed domains when an external project gains hosting. crates/…/project.rs• L2304-2462, crates/…/project.rs• L3235-3291

References: crates/…/project.rs• L1069-1273 crates/…/project.rs• L1274-1459 crates/…/project.rs• L1367-1405 crates/…/project.rs• L1400-1421 crates/…/project.rs• L2304-2462 crates/…/project.rs• L2502-2662 crates/…/project.rs• L3235-3291 crates/…/template_creation.rs• L891-1043 crates/…/handlers.rs• L1576-1646 crates/…/types.rs• L50-53 crates/…/plugin.rs• L118-140 crates/…/environment_service.rs• L1357-1419

Operations view

The operations view gives the console one recent feed for long-running work related to projects and services. It derives entries from deployment, restore, backup, and autofix records instead of creating a second operation store. The feed presents a common kind and status model so an operator can see active work and recent results in one place. crates/…/operations.rs• L4-24, crates/…/operations.rs• L1099-1173

Operation scope

The feed applies both source permissions and project visibility. Instance administrators can see all rows. A deployment token sees only its project. Other callers see projects available to their teams. Service-scoped backup and restore rows remain hidden unless all linked projects and any distinct restore target are visible. Ownerless control-plane records are administrator-only. crates/…/operations.rs• L356-382, crates/…/operations.rs• L627-729

The feed includes active work regardless of age. Finished work is limited to a seven-day window and is sorted newest first. Unknown source states are treated as terminal failures so an unrecognized state cannot appear as active work. crates/…/operations.rs• L35-38, crates/…/operations.rs• L170-251, crates/…/operations.rs• L43-185

References: crates/…/operations.rs• L4-24 crates/…/operations.rs• L35-38 crates/…/operations.rs• L170-251 crates/…/operations.rs• L356-382 crates/…/operations.rs• L627-729 crates/…/operations.rs• L1099-1173 crates/…/operations.rs• L43-185

Change checklist

When these files or sections are changed, remember to consider these:

  • A Git source-directory change must keep path normalization, provider checks, branch checks, and deploy-time checkout errors aligned. A provider failure must not become a false claim that the path exists or does not exist.
  • Archive inspection and source extraction must keep the same keep, skip, and refusal rules so a safe archive preview matches the source that deployment receives.
  • A project or environment setting must keep its inheritance meaning clear for omitted, explicit, and cleared values. This includes build location, architecture, request limits, and readiness timeout.
  • A deployment configuration field must update the stored contract, effective environment settings, audit field names, validation, and deployment consumers together.
  • A source-type or hosting change must keep repository triggers, branch environments, clone identity, and explicit deployment paths aligned. External projects must not regain deployment from an unrelated source write.
  • A repository update must keep provider identity, branch validation, clone URL, root directory, and webhook state consistent.
  • A preset change must keep the stored preset, typed configuration, project type, and build contract aligned.
  • Compose security changes must keep the advanced policy, legacy migration guard, acknowledgement requirements, service list, and audit record aligned.
  • A Compose public-port change must keep service-port pairs, generated route labels, proxy targets, and route reload signals aligned.
  • A service-template migration must preserve the applied release, user values, required inputs, managed-service links, and rollback bindings.
  • A new preview input must define both its environment scope and its preview-inclusion rule.
  • A variable or secret scope change must keep project-wide, environment-specific, service-specific, and preview rules consistent.
  • A secret promotion must keep encryption, write-only reads, deployment materialization, and audit events aligned.
  • A slug or subdomain change must update generated routes and managed-domain rows together.
  • A custom-domain change must keep project ownership, environment ownership, service routing, reserved hostnames, delivery bindings, and reassignment audit order consistent.
  • A public ingress URL change must keep callback URL resolution, preview namespace checks, stored-domain checks, route-table checks, and route refresh behavior aligned.
  • A settings write must preserve fields owned by dedicated credential, security, consent, and system-state flows. Cross-process readers must receive the settings change after the durable write.
  • Installation mode changes must keep bootstrap secret resolution separate from the persisted database identity. Stateless startup must not create local secrets as a fallback.
  • A deletion change must preserve the deletion fence before deployment cancellation and runtime cleanup.
  • A project with host Docker access must keep slug claims, source and runtime writes, preview and automatic-deploy triggers, direct deployments, and capability reporting under the same grant rules.
  • A delivery-provider change must keep explicit project choices distinct from degraded instance defaults.
  • A new operations source or state must update its normalized kind, status, age rule, permission source, project scope, and detail link together.
  • A backup or restore linked to a hidden project or an ownerless service must use the same visibility rule as its detail view for every producer and target service.
  • A health-probe change must keep project defaults, environment overrides, deployment-gate behavior, runtime support, and the need to redeploy in agreement.
  • Runtime-health changes must keep replica observations, unknown and excluded time, worker workloads, external monitors, and project status indicators aligned.
  • A worker workload must not be shown as a browsable site or as an external endpoint monitor when its health is provided by runtime probing.
  • A project-console route or tool change must keep hosted and external project capabilities distinct, and must keep environment-variable and setup links inside the same project context.

Important failure modes

TriggerConsequenceGuard
A Git project names a root directory that the configured branch does not containCreation or source update fails before the bad path becomes the project contractTemps checks the repository when the source location changes and returns a contextual 400 on proof of absence.
A repository provider cannot verify the root directoryThe save succeeds without proof that the path is validThe result is marked unverified in logs. The first deployment checks the actual checkout.
Archive inspection and deployment apply different source-safety rulesThe preview can promise files that deployment removes or accept private material that should be refusedShared classification leaves out environment files and generated folders, while private keys and credentials are refused by name.
Repository identity changes while the clone URL points elsewhereBranch resolution and cloning can use different source treesPartial settings updates reject a proven desynchronization. The Git settings path updates the source identity together.
A non-admin claims a slug that grants host Docker accessThe project could gain a host-root-equivalent deployment contextReserved slug changes require the matching authority and step-up check.
A non-admin changes the source, runtime, preview creation, or automatic-deploy policy of a project with host Docker accessA later deployment or branch push can run untrusted input with host accessSource, runtime, trigger, and deployment writes use the host grant guard.
A legacy Compose sandbox grant is sent through a generic project writeThe old exception can bypass the reviewed security policyGeneric writes reject the legacy field. The advanced policy path requires the required acknowledgements.
A custom domain names a platform-managed hostname or invalid hostThe custom route can shadow the console or fail to match requestsHostname validation rejects malformed and reserved names.
A custom domain is moved while CDN or DNS delivery still serves itDelivery can continue to point at the old project or environmentReassignment, rename, environment changes, and deletion check active delivery bindings.
A custom domain is attached to an environment outside the selected projectA caller can route its domain into another project's runtimeThe service verifies environment ownership before it writes the domain.
A reassignment audit cannot be stored before the ownership changeThe domain can move without a durable record of the requested intentReassignment validates both scopes and writes the requested audit before mutation.
An environment patch replaces inherited settings with defaultsProject policy disappears or the effective runtime profile becomes invalidEnvironment changes apply as overrides and validate the resulting stored profile.
A project build location or readiness timeout is saved without the shared deployment-config contractEnvironments or deployment workers use a stale or incomplete runtime policyThe project request, stored config, response mapping, validation, inheritance, and audit update must remain aligned.
A settings client round-trips masked or omitted fields as empty valuesCredentials, system-owned state, or dedicated security settings can be erasedThe settings handler rebases protected fields onto the current row and aborts if it cannot read that row.
A settings change is committed but another process keeps its old cached snapshotA proxy or deployer can use stale defaults, routes, or security policyThe settings notification invalidates and reloads the cache. The short TTL remains a recovery path.
A stateless installation omits an injected authentication or encryption secretStartup fails instead of silently creating local state that replicas cannot shareStateless mode requires direct or file-backed secrets and rejects conflicting sources.
A preview receives a variable or secret without preview inclusionProduction data reaches a short-lived branch contextPreview inclusion is stored and checked separately from environment membership.
A regular variable is promoted to a secret without encryption or auditThe value can remain readable at rest or the security change cannot be tracedPromotion encrypts legacy plaintext and emits a dedicated audit event. Secrets remain write-only.
A linked integration produces an ambiguous keyA reveal request can return the wrong service valueThe resolved view identifies the source and the reveal path requires a service when needed.
A partial preset patch clears omitted build fieldsA later deployment uses a different build contractCompatible preset configuration is merged before validation and storage.
A service-template migration removes an old binding or managed serviceAn older deployment cannot start or roll back safelyThe target release must keep old services and bindings compatible.
A service-template apply uses a stale preview or an unchanged catalog versionThe project can apply a release different from the one reviewed or lose reproducibilityThe target version is checked again and catalog drift is blocked.
An image template uses a mutable image referenceA later deployment can run different code under the same template releaseTemplate image services require an immutable image identity.
An instance delivery default points to an unusable providerNew project creation fails even though delivery was not requestedExplicit choices fail clearly. Inherited defaults degrade to no delivery.
A route-affecting setting is saved without a route refreshThe proxy serves stale behavior until another event occursThe write publishes the route change signal after the durable update.
Project or environment cleanup starts before new work is fencedA deployment can recreate runtime state during deletionDeletion intent is persisted before cancellation and cleanup.
An operation source or raw state is not included in the feed's mappingThe operation can be omitted or shown with the wrong kind or statusEach source has an explicit kind and state map. Unknown states fall back to a terminal failure.
A backup or restore is linked to a hidden project or an ownerless serviceA caller can learn about work outside its project scopeService-scoped rows require every producer and target link to be visible. Ownerless rows are limited to instance administrators.
A runtime probe is changed without redeploying the environmentThe saved policy and the deployed workload use different health rulesThe runtime view explains that the effective probe is saved by redeployment.
A command probe is treated as a continuous runtime probeMonitoring can claim health without a safe way to contain the commandCommand probes remain deployment-gate checks until continuous command execution is supported.
Unknown or excluded time is counted as unhealthy timeUptime reports an outage when the system has no accepted observation or is intentionally paused or sleepingRuntime health separates unknown, paused, and sleeping time from healthy and unhealthy observations.
A worker environment is shown with an endpoint monitor or site linkOperators can follow a route that the workload does not exposeWorker detection uses runtime health and hides endpoint-only controls for that workload.
An external project is shown with hosted deployment controls before hosting is enabledAn operator can start a flow that the project lifecycle cannot acceptThe project detail route and section layout use the external source type to limit navigation and expose hosting setup separately.
Error tracking setup creates no DSN or receives no first eventThe application cannot complete the monitoring setup flowThe setup flow reuses an existing DSN when present, creates one when needed, and polls for the first error before redirecting.

Key files

FileWhy to read it
crates/…/project.rsDefines project creation, source selection, root-directory checks, preset resolution, project settings, deployment defaults, service-template state and migrations, delivery choices, route coordination, host-access guards, and deletion fences.
crates/…/types.rsDefines the project, source, preset, deployment configuration, hosting, environment, domain, and template API contracts.
crates/…/handlers.rsShows the public project, source, archive-safety inspection, Git, preset, configuration, hosting, template, and service-template migration flows.
crates/…/templates.rsDefines template catalog responses and the creation choices for service, fork, and public-repository projects.
crates/…/template_creation.rsDefines the shared rules for template variables, runtime choices, managed-service access, repository targets, and initial deployment.
crates/…/compose_security.rsDefines the reviewed project-level Compose security policy and its acknowledgement boundary.
crates/…/audit.rsDefines audit records for project settings, deployment configuration, Compose security, and custom-domain reassignment.
crates/…/types.rsDefines the project model, source metadata, root-directory and slug-claim error contracts, and project error mapping inputs.
crates/…/custom_domains.rsDefines custom-domain validation, redirects, assignment changes, visibility rules, delivery-binding checks, and cleanup rules.
crates/…/custom_domains.rsShows the authorized custom-domain flows, hostname lookup, and reassignment audit order.
crates/…/environment_service.rsDefines environment creation and restoration, branch mapping, effective settings, subdomains, route refreshes, on-demand state, and soft deletion.
crates/…/handler.rsShows the environment-facing flows for variables, integration values, secrets, settings, domains, previews, and runtime state.
crates/…/env_var_service.rsDefines scoped variables, encryption, resolved reads, secret promotion, and project/environment ownership checks.
crates/…/secret_service.rsDefines encrypted deployment secrets, environment and Compose-service scope, preview policy, and deployment-only reads.
crates/…/audit.rsDefines audit events for value reveals, secret changes, environment settings, routes, sleep state, and deletion.
crates/…/handler.rsDefines the settings API contract, protected partial writes, public ingress checks, delivery-default validation, and masked settings responses.
crates/…/installation_secrets.rsDefines local and stateless installation secret resolution, source precedence, validation, and safe local persistence.
crates/…/service.rsDefines instance settings storage, installation identity, effective public ingress URL, cache refresh, cross-process settings notifications, and protected settings rebasing.
crates/…/operations.rsDefines the derived operations feed, common kinds and statuses, recency rules, project scope, and visibility for service-linked records.
crates/…/operations.rsDefines the read-only operations endpoint, filters, permission-based source selection, and caller scope.
crates/…/plugin.rsConnects project, domain, and operations services to the plugin and route system.
web/…/ProjectDetail.tsxShows the hosted and external project lifecycles, project routes, environment entry point, deployment actions, and setup paths.
web/…/ProjectSectionLayout.tsxShows how project navigation changes by project type and how section links remain scoped to the current project.
web/…/project-tools.tsDefines the high-level project tool groups and the shortcuts for common project and environment tasks.
web/…/ErrorTrackingSetup.tsxShows the project-scoped DSN setup flow and the handoff from a project preset to runtime error tracking.
web/…/DeployDefaultsCard.tsxShows project deployment defaults and the supported health-probe choices.
web/…/health-probe.tsDefines the high-level probe forms and validation rules shared by deployment settings.
web/…/RuntimeHealthPanel.tsxPresents environment runtime state, replica health, availability, coverage, and monitoring controls.
web/…/ProjectMonitors.tsxCombines runtime health with independent external monitors and selects the environment shown.
web/…/ProjectDetailHeader.tsxShows project deployment and worker health state and distinguishes worker workloads from hosted sites.
web/…/runtime-health-display.tsDefines the user-facing meaning of runtime states and excluded or unknown health conditions.