Skip to content

vs Inertia / SPA + API ​

Two paths with rendering in completely different places: Inertia and SPAs hand the UI to a client framework, while this framework keeps the UI in Blade.

What a traditional SPA + API requires ​

One "save customer" button:

Back end: route → Controller → FormRequest → JsonResource
Front end: API client → call → check status → paint 422 field errors → 403 notice →
           409 "please reload" → 500 error card → refetch the list on success → loading state

The second half is rewritten for every module. In this framework:

php
#[Computable]
#[Validate(['name' => 'required|string|max:80', 'email' => 'required|email'])]
public function create(array $args): LinkerResponse
{
    Customer::create($args);

    return $this->ok()
        ->call('ui.toast', ['level' => 'success', 'message' => 'Created'])
        ->then('render.fragment', ['target' => '#list', 'name' => CustomerController::class]);
}
blade
<button type="button" data-linker-call="create" data-linker-args="form">Create</button>

Comparison ​

InertiaSPA + APIThis framework
RoutingServerClient + API routesServer; interactions need no new routes
TemplatesReact / Vue / Svelte componentsSameBlade
Data contractPage propsAPI schema (JSON)#[Validate] rules + data
Error handlingValidation built inDIYFixed kinds, one front-end handler
Bundle sizeFramework + all page componentsSameThree core modules + the components used (e.g. the chart engine loads on demand)
Shared typesTS generators availableOpenAPI availableNot needed (no front-end business code)
Highly interactive UI (drag & drop, canvas, live editing)StrongStrongWeak
Offline / PWAPossibleStrongNot supported

Mixing them ​

You don't have to choose one. Highly interactive regions (a canvas, drag-to-reorder) can be standalone front-end components while the rest of the page uses Linker:

  • A front-end component can still call the Linker endpoint and get the same error shape.
  • Charts work exactly like this: the Chart component draws in the browser and loads data through Linker with source('load'). See Charts.

When to choose an SPA ​

  • The product itself is a highly interactive application.
  • You need offline support, push, or local data.
  • Front-end and back-end teams are separate, and the API already serves several clients.