Inertia.js
The 'modern monolith' approach to building single-page apps. Inertia.js replaces the traditional SPA API layer — instead of building a JSON API for your React/Vue/Svelte frontend, Inertia renders page components directly from your server routes (Rails, Laravel, Django) and handles client-side navigation without page reloads. You get SPA-like UX without building a separate API. Often called 'the missing piece between server-side and SPA'.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Uses server framework's CSRF protection. Session-based auth inherits server security model. No separate API surface — authorization in server controllers before data passes to components.
⚡ Reliability
Best When
You're building a Rails or Laravel app and want a React/Vue/Svelte frontend with SPA-like UX, but don't want the complexity of building and maintaining a separate JSON API.
Avoid When
You need a public API for mobile apps or third parties, need fully offline SPA functionality, or are using a backend framework without official Inertia support.
Use Cases
- • Build React or Vue frontends with Rails or Laravel backends without writing a REST API — Inertia passes props directly from controller to page component
- • Modernize legacy Rails/Laravel apps with reactive Vue/React UIs without full SPA rewrite — gradually add Inertia pages alongside existing views
- • Create agent admin dashboards with complex reactive UIs backed by Rails using Inertia's controller-to-component data passing
- • Implement server-side data authorization in Rails controllers and pass only authorized data to Inertia page components — single security boundary
- • Build full-stack TypeScript agent apps with Laravel + Vue + Inertia — shared type definitions between TypeScript frontend and PHP/Ruby backend possible via Ziggy or similar
Not For
- • Public-facing APIs consumed by mobile apps or third parties — Inertia is browser-only and requires the Inertia protocol; build a REST/GraphQL API for multi-client use
- • Apps needing deep client-side routing without server roundtrips — Inertia fetches server-rendered props on every navigation; not suitable for fully client-side single-page apps with no server interaction
- • Teams using non-Rails/Laravel backends — Inertia has community adapters for other backends but official support is Rails and Laravel only
Interface
Authentication
Inertia uses the host framework's authentication (Devise for Rails, Sanctum for Laravel). Session-based auth — Inertia is not designed for token/API auth.
Pricing
Inertia.js is MIT licensed, created by Jonathan Reinink. Free for all use.
Agent Metadata
Known Gotchas
- ⚠ Inertia requires server-side adapter — inertia-rails or inertia-laravel must be installed; the client-side JS alone doesn't work without the server middleware
- ⚠ Shared data (auth user, flash messages) must be configured in server middleware — any data needed across all pages must be defined in shared props middleware, not passed per-controller
- ⚠ Inertia visits don't reload the browser — page state (scroll position, form data) persists between Inertia visits unless explicitly preserved; forms may retain old data after submission
- ⚠ Asset versioning required for deployment — Inertia detects stale JavaScript after deployment via asset version checking; forgot to configure versionedAssets causes users to see stale JS after deploy
- ⚠ SSR (server-side rendering) requires separate Node.js process — Inertia SSR for SEO runs a Node.js server alongside the Rails/Laravel app; adds deployment complexity for server-rendered pages
- ⚠ File uploads require special handling — multipart form data must use FormData with Inertia.post; standard form serialization doesn't handle files and will send null
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Inertia.js.
Scores are editorial opinions as of 2026-03-06.