Demo Single Page Application based on Ruby on Rails 7.1.2 + Svelte served with Vite. Includes all the basic features you need to build a real world app with:
All of this is designed with maintainability and readability in mind, slightly inspired by the Rails conventions.
Boostrapping the plumbing for basic stuff can take some time, but once you get the basic it gets easy to extend and to be really efficient with Svelte + Rails. Starting with this demo you have all you need to build up your new project!
bundle install
npm install
bundle exec rails db:setup
foreman start
Make sure you have a running Redis on port 6379
docker compose up
As an experiment, CSS is done right in a public/css/development directory.
Pros:
Cons:
The purpose of this repo is demoing Svelte + Vite + Rails, not CSS, so feel free to use whatever method you'd prefer to handle styles. Sprocket is still available in the Rails app, you can use it too.
MIT