ADR 0005 — Vue pages through the Inertia protocol

Status: accepted. Date: 2026-12-03.

Context

Fellow needs typed Vue integration with forms and navigation, without rebuilding mature infrastructure. The alternatives were: an SPA with its own router consuming the JSON API; full SSR with Vue Router; or the Inertia protocol, in which the server decides the page and the props and the client only renders it.

Decision

  • Adopt the Inertia (v3) protocol on the server, implemented in @fellowframework/core (definePage), and the official @inertiajs/vue3 client in @fellowframework/vue.
  • A page is a contract like a route: id, path, access, tenant, and props as a Zod schema. Props outside the schema never reach the browser.
  • Authorization, tenant and validation go through the same pipeline as routes. There is no second API for screens.
  • Mutations use the JSON routes through the generated typed client (src/fellow.gen.ts), with useForm validating against the same schema as the server.
  • The HTML comes from the shell built by @fellowframework/build (.fellow/shell.html, read through the virtual module #fellow/shell, ADR 0017); the page object is injected as escaped JSON.

Consequences

  • Navigation, deferred props, partial reloads and asset versioning come ready-made from the Inertia client.
  • No SSR for now: first paint depends on JavaScript. SSR is pending.
  • The page object format is public (Inertia protocol); major Inertia version changes require an ADR.

Evidence

packages/core/tests/application.test.ts (escaping, deferred props, partial reload, version 409, login redirect); Playwright E2E against the production build of examples/records (login, client-side validation, creation, 404).

Conditions for reassessment

SSR is required for SEO or performance, or the Inertia protocol changes incompatibly.