> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hosting

Bijection discovers `apps/<name>/app.ts` and app roots registered in
`bijection.json`, then builds and publishes them together with their backend.
Start with `bijection dev` on a development installation. Publish a candidate to a
named [preview installation](https://docs.bijection.com/operate/installations/environments.md#using-preview-installations)
and publish committed source to production
with `bijection deploy --installation <project>:prod`. See the
[React quickstart](https://docs.bijection.com/clients/react/quickstart.md).

## Project configuration

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "source": "bijection/",
  "apps": {
    "web": { "root": "apps/web" },
    "admin": { "root": "frontend/admin" }
  }
}
```

App registrations name frontend roots in `bijection.json`. The `source`
directory contains the backend's `app.ts` and reviewed `bijection.lock`.
With `"browserClient": true`, local development and managed hosting prepare
the [typed browser client](https://docs.bijection.com/clients/typescript.md) from those contracts.

App-local dependencies, scripts and configuration determine the framework.
Dependencies in sibling apps or a workspace root do not select an app's framework.
Conflicting evidence requires an explicit `framework` in `app.ts`. The framework's
own configuration determines rendering mode. Next.js `output: "export"` selects static output; otherwise Next uses
server rendering. SvelteKit's static and Node adapters select the corresponding
output. React/Vite and Svelte/Vite use static browser hosting. Conflicting
hosting configuration fails before compilation.

The build honors the app package's `build` script and detects the package
manager from its lockfile. Development honors the app package's `dev` script.
Put generation and custom arguments in these scripts. Custom output adapters read
`HOST` and `PORT` from their environment. Managed hosting selects a compatible installation target
automatically. Set a logical target with `hosting: { target: "web" }` in
`app.ts` when an installation requires an explicit selection. Provider
credentials stay out of source.

## Commands and installation compatibility

| Command | What it establishes |
| - | - |
| `bijection check` | Backend contracts, app declarations and configured frontend type checks; no frontend build or hosted publication |
| `bijection deploy --trial` | Analyze the backend program against the selected installation without installing it |
| `bijection build` | An immutable compiled backend and app build, printed as `program:<64 hex>`; nothing is deployed or published |
| `bijection deploy --program <program>` | That exact built program, deployed here or on another installation of the project |
| `bijection deploy` | Backend activation and app publication, with delivery reported separately |
| `bijection status request resume <request>` | Recovery using that request's original retained inputs |

Saved plans include the original placement facts and each page's native basis
and evaluation time. `--observe` collects the requirements registered by the
candidate's physical owners. Each returned provider fact retains its scope,
evidence basis, resource revision, receipt time and validity. Empty requirements
mean no provider predicates were requested. Unknown or refused observations
remain explicit; these reports do not qualify an installation.

Observation plans are advisory in the native owner. They retain no provider
operation intents and cannot activate code or open admission. The collected
facts are sealed for recovery. Activation consumes the retained build and its
bindings, and the owners make their current admission decisions separately.

The CLI checks the installation's credential-free `/v1/installation` contract
before reading a management session. Its management schema and operation digest,
source protocol and app artifact format must match. The management digest is
generated from the same route declarations as the SDKs; the service refuses to
advertise compatibility if that generated identity differs from its actual API.
A mismatch refuses the command before a new deploy
request; it requires a supported toolchain or an installation update. A deploy
manifest records this contract alongside its exact SDK, frontend tools and
workspace artifacts. API and worker deploys record the same
contract. No obsolete protocol is selected automatically.

A project is the source boundary; an installation is its persistent destination.
An app is one frontend, a build identifies immutable compiled output, and a
request identifies durable work. Backend activation selects the backend version.
A publication identifies one frontend's hosted version. The app's directory or
registration key supplies its machine name; `label` supplies its display name.

## Framework contract

| Framework | Version accepted by the adapter | Implemented artifact path |
| - | - | - |
| React/Vite | Vite 7 or 8 | Static documents, SPA navigation, retained assets |
| Svelte/Vite | Svelte 5, Vite 7 or 8 | Static browser app and retained assets |
| Next.js | 16 | Static export or Node request rendering |
| SvelteKit | 3 with Svelte 5 | Static adapter or Node request rendering |
| Custom adapter | Explicit `adapter: "amplify"` | Validated Amplify deployment output with one Node 22 or 24 compute resource |

Use `bijection app list --details` for the installed version and capability
evidence.

| Capability | Static output | Next.js server | SvelteKit server |
| - | - | - | - |
| Static artifact packaging | supported | unsupported | unsupported |
| Client navigation | unverified | unverified | unverified |
| Authentication | unverified | unverified | unverified |
| Request rendering | unsupported | unverified | unverified |
| Server endpoints and cookies | unsupported | unverified | unverified |
| Middleware | unsupported | unverified | unverified |
| Framework mutations and form actions | unsupported | unverified | unverified |
| Streaming | unsupported | unverified | unverified |
| Image optimization | unsupported | unverified | unsupported |
| Shared persistent cache | unsupported | unsupported | unsupported |
| Incremental regeneration | unsupported | unsupported | unsupported |
| Updates with open tabs | unverified | unverified | unverified |

The table is generated from the capability record used by adapter preflight.
Supported static output describes artifact packaging and names its test suite;
it does not establish hosted support. Hosted behavior remains unverified until
explicitly qualified. `app list --details` includes a suite or a reason for every
status. Artifacts declare their runtime
requirements; known shared-cache configuration and literal ISR declarations fail
during source-only CLI preflight, before a managed build is submitted. Dynamic
configuration is evaluated in the credential-free builder, and compiled
artifacts are checked again before activation.
Static analysis cannot prove the absence of every dynamically configured
unsupported feature.

Generated starters include deploy integration. Importing with `app add --root`
preserves authored framework configuration in a neighboring file and adds the
maintained wrapper. Next uses `withBijectionNext`; Vite uses the `bijection()`
plugin; SvelteKit 3 configures its adapter in the Vite plugin. The platform owns
deployment asset prefixes and backend connection settings. See
[custom adapters](https://docs.bijection.com/operate/installations/frontend/adapters.md) for lower-level output
requirements.

## Build restrictions

Managed builds install frozen dependencies through a private registry mirror.
Package projects need a root lockfile, and the builder chooses the package
manager the way the CLI does: the first of `pnpm-lock.yaml`, `bun.lock`,
`bun.lockb`, `yarn.lock` and `package-lock.json` at the root decides. The
builder then runs that manager's frozen install: `pnpm install --frozen-lockfile`,
`bun install --frozen-lockfile`, Yarn 4's `yarn install --immutable` for a
lockfile Yarn 4 wrote, Yarn 1's `yarn install --frozen-lockfile` for a Yarn 1
lockfile, or `npm ci`. An app's build script runs with the same manager. The
workspace must include every app package. In a managed build, Yarn 4 reads no
project `.yarnrc.yml`: dependencies are linked into `node_modules` and come
from the installation's registry, and no Yarn plugin or `yarnPath` deploy
runs. Dependency installation hooks are disabled; put required generation in
the app's build script. Compilation has no general network access. Vendor
remote fonts or assets rather than downloading them during a build.
Prerendering cannot read the installation backend before the captured backend
has activated; move those reads to request time. The builder uses Linux x64.
Node 22 or 24 server artifacts retain the exact Node major used at
compilation; native dependencies must match that platform.

A deploy request can queue while build or hosting capacity is unavailable.
Queue timeout is reported separately from compilation failure. Inspect the
retained attempt with `bijection status request get <request>` or read deploy build
logs with `bijection deploy log <project>:<name> <deploy-id>`.
An observation timeout leaves the accepted request running and
preserves its request.

## Publication and recovery

Builds, validation and serving preparation finish before backend activation.
Activation selects an immutable preparation binding containing both managed
assets and server app identities. Native admission opens when
the runtime is ready, before edge or provider delivery verification. That later
evidence completes the request; unavailable delivery does not erase activation.

Managed customer apps carry an immutable backend deployment binding. Old tabs and
stale entrypoints receive an explicit update response. Backend-only installations
accept ordinary unbound clients; a supplied stale binding is always refused.
Cancellation fences native selection and delayed publication with a fresh
identity. After activation, installed code and effects remain, with admission
held closed until explicit recovery authorization. Before activation, cancellation
preserves the predecessor's admission and client policy.

`bijection build` retains the compiled backend and all app artifacts as one
program and prints its `program:<64 hex>` reference. Deploy those exact bytes
with `bijection deploy --program <program>`.
`bijection deploy --trial` checks the current target without deploying.
Compatibility and current authority are checked again when deploying.
Target-bound preview artifacts cannot silently rebuild for production; deploy
source to build for another target, or deploy a verified program there with
`--program`, which promotes it from the installation that built it. Runtime
secrets never become public frontend configuration.

A deploy request identifies execution and recovery; a program identifies
immutable output. Use the native executable reference for a backend build.

`bijection deploy` builds and publishes the workspace backend and apps.
Each registered app's source root may be outside `apps/`. Changes to local
packages used only by one app are allowed when declared through package
dependencies. Backend code, other apps, packages consumed by other apps, root
configuration and lockfiles remain protected. The native compiler checks the
backend program before activation.

Source retrieval diagnostics use the `source` phase. Missing commits, incomplete
uploads, integrity mismatches and storage outages retain distinct diagnostic
codes. An unknown cause stays explicit; raw provider errors and private paths do
not enter customer output. `SourceUnavailable` means compilation did not start;
`BuildCapacityExceeded` means the capacity queue deadline elapsed before compilation.
`SourceReadUnavailable` retains the request and its original inputs while source
storage or access recovers. Uploading source, retrieving accepted source and
waiting for build capacity are reported as distinct progress phases.

Build logs retain bounded text and up to 32 structured diagnostics
independently, so noisy output cannot evict the first compiler error. Ordinary
failure output shows the app, phase, location, error code and recovery command
when known. Use `request log` for full retained output; it explicitly reports
truncation. `status request resume` reconciles uncertain acceptance and continues the original
request using its retained inputs. It never captures current source.

Server runtimes use one stable Amplify application per app and installation, with
separate protected branches for deploys. Capacity is reserved before
compilation. Superseded branches remain for 24 hours after the confirmed routing
switch, then an owned periodic task retires them. Active publications and
unresolved deploys remain protected. Source and browser artifacts remain
available for recovery; retiring an SSR branch does not delete those artifacts.

The standard React/Vite static recipe with a literal app declaration can reuse
verified immutable app output for identical captured source, toolchain,
generated contracts, public configuration, backend, mode and app placement. The
whole source snapshot is a conservative read set: shared or sibling changes
invalidate this cache. Custom plugins, lifecycle hooks and preprocessors compile
normally. Cache evidence lives in retained bundles; a cache hit does not bypass
installation authorization or backend preparation.

The frontend's ordinary data access uses the typed SDK client.
Managed transport and native admission enforce the installed app binding.
See [React configuration](https://docs.bijection.com/clients/react/configuration.md) for application
client setup.

## Published applications in the console

In the console, open your team's **Applications** tab to find published
applications. Each application has a separate row for each installation. The view
opens on production applications; use the environment filter to include
development, preview or custom installations. **Include Bijection Workspace** also
shows the generated workspace.

**Open app** opens a confirmed publication. **Deploys** shows the latest
publication attempt and any issue that needs attention. A failed update can
leave the earlier publication available. **Domains** opens the installation's
custom domain settings. Publication status records the last confirmation; it is
not continuous uptime monitoring.

## Host your own frontend

You can host a frontend independently while using a Bijection backend. This is
an alternative workflow with separate frontend publication:

* [Netlify](https://docs.bijection.com/operate/installations/frontend/netlify.md)
* [Custom hosting](https://docs.bijection.com/operate/installations/frontend/custom.md)

Immutable browser assets from an older compatible frontend remain available for
at least 30 days after replacement. Current publications and pending recovery
retain their assets. Automatic cleanup removes unreferenced serving copies;
captured source bundles and build references remain available for inspection and
rollback. This browser-asset window does not keep every historical server runtime
or backend generation executable.

A selected-app publication may combine a retained backend and other apps with
one newly built frontend. Build inspection exposes `provenance.composition`:
each app retains its own build identity and original source snapshot, archive,
builder and contract digests. The enclosing source snapshot identifies the
assembly request; it does not imply that retained apps were rebuilt.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.