These docs cover 0.2.0-beta.26. Each guide distinguishes supported beta behavior, explicit deployment boundaries, and retained 0.1 compatibility material.

Browse documentationAll guides

Start · document ownership

Document and metadata

Presolve applications do not maintain a traditional client entry HTML file. Instead, app/index.html is a compiler template: you own document metadata and surrounding markup while Presolve owns the required publication placeholders.

Use the canonical template

The template must preserve the head, application, and runtime placeholders. Presolve replaces them while producing every route’s static HTML.

<!doctype html><html lang="en"><head><meta name="viewport" content="width=device-width, initial-scale=1">{{ head }}</head><body>{{ app }}{{ runtime }}</body></html>

What belongs in the document

  • Language, viewport, description, theme-color, and other stable metadata shared by every route.
  • Favicons, web manifests, font preloads, and other document-level links that are valid for every route.
  • Analytics or third-party scripts only when their behavior is intentional and compatible with the project’s support boundary.

What belongs elsewhere

  • Shared navigation, providers, and page framing belong in app/app.tsx.
  • Global styles belong in app/app.css; Presolve emits its stylesheet link into the document head.
  • Route content belongs below app/routes/.
  • Directly served images, icons, and manifest files belong in public/.
Do not place document tags in layouts

Rendering a stylesheet or metadata link inside a route or application layout makes it part of the application subtree. Use the template for document metadata so those resources remain present independently of application lifecycle work.

Route metadata

Add a JSON sidecar beside a route to publish its canonical title and description metadata. The sidecar belongs to the route selected by the compiler; it is not a runtime head manager or a convention inferred by the deployment adapter.

{"title": "About Acme","description": "How Acme builds with Presolve."}

For app/routes/about.tsx, name this file app/routes/about.metadata.json. Schema v1 requires a non-empty title and accepts one optional non-empty description.

Compiler guarantees

  • A sidecar with no matching route, a sidecar attached to a layout, duplicate metadata, unknown fields, and non-string values fail compilation.
  • Successful builds emit one deterministic route-metadata.json publication artifact keyed by route path and entry component identity.
  • Development and deployment tools transport compiler-issued metadata; they do not infer it from rendered HTML or source filenames.
  • In beta.14 the sidecar is emitted as compiler-owned route-metadata.json; automatic projection of those records into each route’s HTML head is not yet part of the published contract.
Current title boundary

The compiler still emits the application entry component name as the document title. Give the canonical app/app.tsx component a meaningful exported class name and inspect generated route HTML. Do not add a second <title> beside {{ head }} and assume route metadata has replaced it.