> ## 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.

# Custom app adapters

> Private artifact requirements for managed server hosting

Ordinary Next.js and SvelteKit apps use the maintained integrations described in
[deploy apps](https://docs.bijection.com/production/hosting/hosting). A custom adapter emits one
`.amplify-hosting` deployment specification with a `default` Node 22 or 24
compute resource. The Node major must match the compiler runtime; managed
hosting uses Linux x64
([AWS deployment specification](https://docs.aws.amazon.com/amplify/latest/userguide/ssr-deployment-specification.html)).
The closed compute archive is limited to 220 MiB after trusted binding.

Documents render through compute. Scripts and styles use immutable
`/releases/<BIJECTION_APP_RELEASE>/` URLs. The adapter installs the maintained
browser application-state integration and creates a backend client for each
request, preserving user identity and the release binding. Credentials remain
server-owned; public browser configuration never contains runtime secrets.

## Client and request binding

React apps use `BijectionAppProvider` from `@bijectionhq/app-tools/react`. It
owns one client for the mounted app, handles Strict Mode cleanup, installs the
framework transport binding and renders the update notice. Authenticated apps
can supply the ordinary `useAuth` hook. Svelte apps call `createBijectionClient`
from `@bijectionhq/app-tools/svelte` during layout setup; it owns request-local
SSR construction and browser cleanup.

Framework navigation and actions are bound automatically. Other app HTTP calls
opt in explicitly:

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import {
  applicationFetch,
  applicationFormAction,
} from "@bijectionhq/app-tools/application-state";

await applicationFetch("/api/preferences", { method: "POST", body: payload });
const formAction = applicationFormAction("/preferences");
```

Unrelated `fetch` calls keep their ordinary behavior. Binding retains the
backend release and frontend publication rendered into the document. Stale work
receives an explicit update state; it is never silently retried as a mutation.
The update notice lets the person preserve unsaved input before reloading.

For forms that must work without JavaScript, render the action on the server:

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { serverActionUrl } from "@bijectionhq/app-tools/server";

const action = serverActionUrl("/preferences", binding);
```

Pass the immutable binding supplied by the framework integration. Use this action on the actual HTML form. The server checks both identities
before running the handler and strips the reserved query parameters. Rendering a
plain unbound POST form does not meet this contract.

## Declared capabilities

The deployment manifest may declare additional requirements:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{ "bijection": { "requires": ["streaming", "imageOptimization"] } }
```

Request rendering is required for every server artifact. Unknown requirements
and shared persistent caching are refused before activation. Packaging
compatibility does not establish hosted support for authentication, streaming,
mutations or image optimization; those capabilities remain unverified through
the provider.

Provider targets, quota reservations, immutable branches, origin protection,
resource retirement and the x64 builder image belong to installation operations.


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