A modern full-stack starter application with Rails backend and React frontend using Inertia.js based on the Laravel Starter Kit.
- Inertia Rails & Vite Rails setup
- React frontend with TypeScript & shadcn/ui component library
- User authentication system (based on Authentication Zero)
- Kamal for deployment
- Optional SSR support
See also:
- Svelte Starter Kit for Inertia Rails with Svelte
- Vue Starter Kit for Inertia Rails with Vue
- Clone this repository
- Setup dependencies & run the server:
bin/setup
- Open http://localhost:3000
This starter kit ships SSR-ready but turned off. The Puma plugin
(plugin :inertia_ssr) manages the Node.js renderer
in-process — no separate accessory required.
To turn SSR on, flip two switches:
-
Set
config.ssr_enabled = trueinconfig/initializers/inertia_rails.rb. -
Build the image with
SSR_ENABLED=trueso the SSR bundle ships alongside the app. Two ways:With Kamal — add to
config/deploy.yml:builder: args: SSR_ENABLED: true
By hand — pass the build arg directly:
docker build --build-arg SSR_ENABLED=true -t react_starter_kit .
That's it. Puma boots the SSR process automatically when
ssr_enabled is true, and Inertia falls back to client-side
rendering if it ever fails (see config.on_ssr_error).
In development, flipping ssr_enabled is enough — Vite serves SSR
via its own dev endpoint with HMR. The Docker build arg only matters
for production images.
The project is available as open source under the terms of the MIT License.