David Kimura PRO said 6 months ago on Hotwire Question and Answer Feature :
The template is really geared to just set up some basic things. I have a repo https://github.com/driftingruby/template with the template that I use.

I also use a .railsrc file which will set a few defaults whenever I create a new Rails app.

# ~/.railsrc
--javascript esbuild
--css bootstrap

The basic devise install is another template that I have an alias for to apply to an existing template application.

gem 'devise'
run 'bundle install'
generate(:devise, 'User')

environment 'config.action_mailer.default_url_options = { host: "localhost", port: 3000 }', env: 'development'

append_to_file 'app/views/layouts/_navigation_links.html.erb' do

  <% if user_signed_in? %>
    <li class="nav-item me-4">
      <%= link_to "My Account", edit_user_registration_path, class: "nav-link" %>
    <li class="nav-item me-4">
      <%= link_to "Sign Out", destroy_user_session_path, "data-turbo-method": :delete, class: "nav-link" %>
  <% else %>
    <li class="nav-item me-4">
      <%= link_to "Sign In", new_user_session_path, class: 'nav-link' %>
  <% end %>

rake 'db:migrate'

git add: '.'
git commit: %( -m 'added devise')