inertia-rails-architecture

Installation
SKILL.md

Inertia Rails Architecture

Server-driven architecture for Rails + Inertia.js + React when building pages, forms, navigation, or data refresh. Inertia is NOT a traditional SPA — the server owns routing, data, and auth. React handles rendering only.

The Core Mental Model

The server is the source of truth. React receives data as props and renders UI. There is no client-side router, no global state store, no API layer.

Before building any feature, ask:

  • Where does the data come from? → If server: controller prop. If user interaction: useState.
  • Who owns this state? → If it's in the URL or DB: server owns it (use props). If it's ephemeral UI: React owns it.
  • Am I reaching for a React/SPA pattern? → Check the decision matrix below first — Inertia likely has a server-driven equivalent.

Decision Matrix

Related skills
Installs
197
GitHub Stars
48
First Seen
Feb 13, 2026