A modern full-stack starter application with Rails backend and Svelte frontend using Inertia.js based on the Laravel Starter Kit.
This starter kit is generated output of inertia-rails/generator: each generator release regenerates the app and opens an automated sync PR here, so most files in this repo are overwritten on every sync. To contribute changes to the app itself, open a PR against the generator — only this README and the deploy workflow are kit-owned.
Prefer different options (framework, JavaScript instead of TypeScript, feature set)? Generate your own app:
rails new myapp -m https://raw.githubusercontent.com/inertia-rails/generator/dist/template.rb- Inertia Rails & Vite Rails setup
- Svelte 5 frontend with TypeScript & shadcn-svelte component library
- User authentication system (based on Authentication Zero)
- Kamal for deployment
- Optional SSR support
See also:
- React Starter Kit for Inertia Rails with React
- 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 comes with optional SSR support. To enable it, follow these steps:
- Open
app/frontend/entrypoints/inertia.tsand uncomment part of thesetupfunction:// Uncomment the following to enable SSR hydration: // if (el.dataset.serverRendered === 'true') { // hydrate(App, {target: el, props}) // return // }
- Open
config/deploy.ymland uncomment several lines:servers: # Uncomment to enable SSR: # vite_ssr: # hosts: # - 192.168.0.1 # cmd: bundle exec vite ssr # options: # network-alias: vite_ssr # ... env: clear: # Uncomment to enable SSR: # INERTIA_SSR_ENABLED: true # INERTIA_SSR_URL: "http://vite_ssr:13714" # ... builder: # Uncomment to enable SSR: # dockerfile: Dockerfile-ssr
That's it! Now you can deploy your app with SSR support.
The project is available as open source under the terms of the MIT License.