├── .erb-lint.yml ├── .eslintrc-react.json ├── .eslintrc-vue.json ├── .eslintrc.json ├── .github └── workflows │ └── gem-push.yml ├── .gitignore ├── CHANGELOG.md ├── Gemfile ├── Procfile.dev ├── README.md ├── README_BOOTSTRAP.md ├── README_BULMA.md ├── Rakefile ├── app-react ├── assets │ ├── config │ │ └── manifest.js │ ├── images │ │ └── .keep │ └── stylesheets │ │ └── application.css ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ └── pages_controller.rb ├── frontend │ ├── components │ │ └── views │ │ │ └── home.jsx │ └── entrypoints │ │ ├── application.js │ │ ├── main.scss │ │ └── stylesheets │ │ ├── _alert.scss │ │ ├── _buttons.scss │ │ ├── _form.scss │ │ ├── _global.scss │ │ └── _navbar.scss ├── helpers │ ├── application_helper.rb │ ├── nav_helper.rb │ ├── pages_helper.rb │ └── tag_helpers.rb ├── jobs │ └── application_job.rb ├── mailers │ └── application_mailer.rb ├── models │ ├── application_record.rb │ └── concerns │ │ └── .keep └── views │ ├── devise │ ├── confirmations │ │ └── new.html.erb │ ├── mailer │ │ ├── confirmation_instructions.html.erb │ │ ├── email_changed.html.erb │ │ ├── password_change.html.erb │ │ ├── reset_password_instructions.html.erb │ │ └── unlock_instructions.html.erb │ ├── passwords │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── registrations │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── sessions │ │ └── new.html.erb │ ├── shared │ │ ├── _error_messages.html.erb │ │ ├── _form-layout.html.erb │ │ └── _links.html.erb │ └── unlocks │ │ └── new.html.erb │ ├── layouts │ ├── application.html.erb │ ├── mailer.html.erb │ └── mailer.text.erb │ ├── pages │ └── home.html.erb │ └── shared │ ├── _error_messages.html.erb │ ├── _flash.html.erb │ ├── _footer.html.erb │ └── _navbar.html.erb ├── app-vue ├── assets │ ├── config │ │ └── manifest.js │ └── images │ │ └── .keep ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ └── pages_controller.rb ├── frontend │ ├── components │ │ └── views │ │ │ └── Home.vue │ └── entrypoints │ │ ├── application.js │ │ ├── main.scss │ │ └── stylesheets │ │ ├── _alert.scss │ │ ├── _buttons.scss │ │ ├── _form.scss │ │ ├── _global.scss │ │ └── _navbar.scss ├── helpers │ ├── application_helper.rb │ ├── nav_helper.rb │ └── pages_helper.rb ├── jobs │ └── application_job.rb ├── mailers │ └── application_mailer.rb ├── models │ ├── application_record.rb │ └── concerns │ │ └── .keep └── views │ ├── devise │ ├── confirmations │ │ └── new.html.erb │ ├── mailer │ │ ├── confirmation_instructions.html.erb │ │ ├── email_changed.html.erb │ │ ├── password_change.html.erb │ │ ├── reset_password_instructions.html.erb │ │ └── unlock_instructions.html.erb │ ├── passwords │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── registrations │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── sessions │ │ └── new.html.erb │ ├── shared │ │ ├── _error_messages.html.erb │ │ ├── _form-layout.html.erb │ │ └── _links.html.erb │ └── unlocks │ │ └── new.html.erb │ ├── layouts │ ├── application.html.erb │ ├── mailer.html.erb │ └── mailer.text.erb │ ├── pages │ └── home.html.erb │ └── shared │ ├── _error_messages.html.erb │ ├── _flash.html.erb │ ├── _footer.html.erb │ └── _navbar.html.erb ├── app ├── assets │ ├── config │ │ └── manifest.js │ └── images │ │ └── .keep ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ └── pages_controller.rb ├── frontend │ └── entrypoints │ │ ├── application.js │ │ ├── main.scss │ │ └── stylesheets │ │ ├── _alert.scss │ │ ├── _buttons.scss │ │ ├── _form.scss │ │ ├── _global.scss │ │ └── _navbar.scss ├── helpers │ ├── application_helper.rb │ ├── nav_helper.rb │ └── pages_helper.rb ├── jobs │ └── application_job.rb ├── mailers │ └── application_mailer.rb ├── models │ ├── application_record.rb │ └── concerns │ │ └── .keep └── views │ ├── devise │ ├── confirmations │ │ └── new.html.erb │ ├── mailer │ │ ├── confirmation_instructions.html.erb │ │ ├── email_changed.html.erb │ │ ├── password_change.html.erb │ │ ├── reset_password_instructions.html.erb │ │ └── unlock_instructions.html.erb │ ├── passwords │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── registrations │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── sessions │ │ └── new.html.erb │ ├── shared │ │ ├── _error_messages.html.erb │ │ ├── _form-layout.html.erb │ │ └── _links.html.erb │ └── unlocks │ │ └── new.html.erb │ ├── layouts │ ├── application.html.erb │ ├── mailer.html.erb │ └── mailer.text.erb │ ├── pages │ └── home.html.erb │ └── shared │ ├── _error_messages.html.erb │ ├── _flash.html.erb │ ├── _footer.html.erb │ └── _navbar.html.erb ├── bootstrap-react ├── app │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ └── images │ │ │ └── .keep │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ ├── controllers │ │ ├── application_controller.rb │ │ ├── concerns │ │ │ └── .keep │ │ └── pages_controller.rb │ ├── frontend │ │ ├── components │ │ │ └── views │ │ │ │ └── home.jsx │ │ └── entrypoints │ │ │ ├── application.js │ │ │ ├── main.scss │ │ │ └── stylesheets │ │ │ ├── _alert.scss │ │ │ └── _global.scss │ ├── helpers │ │ ├── application_helper.rb │ │ ├── nav_helper.rb │ │ └── pages_helper.rb │ ├── jobs │ │ └── application_job.rb │ ├── mailers │ │ └── application_mailer.rb │ ├── models │ │ ├── application_record.rb │ │ └── concerns │ │ │ └── .keep │ └── views │ │ ├── devise │ │ ├── confirmations │ │ │ └── new.html.erb │ │ ├── mailer │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── email_changed.html.erb │ │ │ ├── password_change.html.erb │ │ │ ├── reset_password_instructions.html.erb │ │ │ └── unlock_instructions.html.erb │ │ ├── passwords │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── registrations │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ ├── shared │ │ │ ├── _error_messages.html.erb │ │ │ ├── _form-layout.html.erb │ │ │ └── _links.html.erb │ │ └── unlocks │ │ │ └── new.html.erb │ │ ├── layouts │ │ ├── application.html.erb │ │ ├── mailer.html.erb │ │ └── mailer.text.erb │ │ ├── pages │ │ └── home.html.erb │ │ └── shared │ │ ├── _error_messages.html.erb │ │ ├── _flash.html.erb │ │ ├── _footer.html.erb │ │ └── _navbar.html.erb ├── config │ └── cable.yml ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ ├── .keep │ │ └── auto_annotate_models.rake └── test │ ├── application_system_test_case.rb │ ├── channels │ └── application_cable │ │ └── connection_test.rb │ ├── controllers │ ├── .keep │ └── pages_controller_test.rb │ ├── fixtures │ └── files │ │ └── .keep │ ├── helpers │ └── .keep │ ├── integration │ └── .keep │ ├── mailers │ └── .keep │ ├── models │ └── .keep │ ├── system │ └── .keep │ └── test_helper.rb ├── bootstrap-vue ├── app │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ └── images │ │ │ └── .keep │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ ├── controllers │ │ ├── application_controller.rb │ │ ├── concerns │ │ │ └── .keep │ │ └── pages_controller.rb │ ├── frontend │ │ ├── components │ │ │ └── views │ │ │ │ └── Home.vue │ │ └── entrypoints │ │ │ ├── application.js │ │ │ ├── main.scss │ │ │ └── stylesheets │ │ │ ├── _alert.scss │ │ │ └── _global.scss │ ├── helpers │ │ ├── application_helper.rb │ │ ├── nav_helper.rb │ │ └── pages_helper.rb │ ├── jobs │ │ └── application_job.rb │ ├── mailers │ │ └── application_mailer.rb │ ├── models │ │ ├── application_record.rb │ │ └── concerns │ │ │ └── .keep │ └── views │ │ ├── devise │ │ ├── confirmations │ │ │ └── new.html.erb │ │ ├── mailer │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── email_changed.html.erb │ │ │ ├── password_change.html.erb │ │ │ ├── reset_password_instructions.html.erb │ │ │ └── unlock_instructions.html.erb │ │ ├── passwords │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── registrations │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ ├── shared │ │ │ ├── _error_messages.html.erb │ │ │ ├── _form-layout.html.erb │ │ │ └── _links.html.erb │ │ └── unlocks │ │ │ └── new.html.erb │ │ ├── layouts │ │ ├── application.html.erb │ │ ├── mailer.html.erb │ │ └── mailer.text.erb │ │ ├── pages │ │ └── home.html.erb │ │ └── shared │ │ ├── _error_messages.html.erb │ │ ├── _flash.html.erb │ │ ├── _footer.html.erb │ │ └── _navbar.html.erb ├── config │ └── cable.yml ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ ├── .keep │ │ └── auto_annotate_models.rake └── test │ ├── application_system_test_case.rb │ ├── channels │ └── application_cable │ │ └── connection_test.rb │ ├── controllers │ ├── .keep │ └── pages_controller_test.rb │ ├── fixtures │ └── files │ │ └── .keep │ ├── helpers │ └── .keep │ ├── integration │ └── .keep │ ├── mailers │ └── .keep │ ├── models │ └── .keep │ ├── system │ └── .keep │ └── test_helper.rb ├── bootstrap ├── app │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ └── images │ │ │ └── .keep │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ ├── controllers │ │ ├── application_controller.rb │ │ ├── concerns │ │ │ └── .keep │ │ └── pages_controller.rb │ ├── frontend │ │ └── entrypoints │ │ │ ├── application.js │ │ │ ├── main.scss │ │ │ └── stylesheets │ │ │ ├── _alert.scss │ │ │ └── _global.scss │ ├── helpers │ │ ├── application_helper.rb │ │ ├── nav_helper.rb │ │ └── pages_helper.rb │ ├── jobs │ │ └── application_job.rb │ ├── mailers │ │ └── application_mailer.rb │ ├── models │ │ ├── application_record.rb │ │ └── concerns │ │ │ └── .keep │ └── views │ │ ├── devise │ │ ├── confirmations │ │ │ └── new.html.erb │ │ ├── mailer │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── email_changed.html.erb │ │ │ ├── password_change.html.erb │ │ │ ├── reset_password_instructions.html.erb │ │ │ └── unlock_instructions.html.erb │ │ ├── passwords │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── registrations │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ ├── shared │ │ │ ├── _error_messages.html.erb │ │ │ ├── _form-layout.html.erb │ │ │ └── _links.html.erb │ │ └── unlocks │ │ │ └── new.html.erb │ │ ├── layouts │ │ ├── application.html.erb │ │ ├── mailer.html.erb │ │ └── mailer.text.erb │ │ ├── pages │ │ └── home.html.erb │ │ └── shared │ │ ├── _error_messages.html.erb │ │ ├── _flash.html.erb │ │ ├── _footer.html.erb │ │ └── _navbar.html.erb ├── config │ └── cable.yml ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ ├── .keep │ │ └── auto_annotate_models.rake └── test │ ├── application_system_test_case.rb │ ├── channels │ └── application_cable │ │ └── connection_test.rb │ ├── controllers │ ├── .keep │ └── pages_controller_test.rb │ ├── fixtures │ └── files │ │ └── .keep │ ├── helpers │ └── .keep │ ├── integration │ └── .keep │ ├── mailers │ └── .keep │ ├── models │ └── .keep │ ├── system │ └── .keep │ └── test_helper.rb ├── bulma-react ├── app │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ └── images │ │ │ └── .keep │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ ├── controllers │ │ ├── application_controller.rb │ │ ├── concerns │ │ │ └── .keep │ │ └── pages_controller.rb │ ├── frontend │ │ ├── components │ │ │ └── views │ │ │ │ └── home.jsx │ │ └── entrypoints │ │ │ ├── application.js │ │ │ ├── main.scss │ │ │ └── stylesheets │ │ │ ├── _global.scss │ │ │ └── _notification.scss │ ├── helpers │ │ ├── application_helper.rb │ │ ├── nav_helper.rb │ │ └── pages_helper.rb │ ├── jobs │ │ └── application_job.rb │ ├── mailers │ │ └── application_mailer.rb │ ├── models │ │ ├── application_record.rb │ │ └── concerns │ │ │ └── .keep │ └── views │ │ ├── devise │ │ ├── confirmations │ │ │ └── new.html.erb │ │ ├── mailer │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── email_changed.html.erb │ │ │ ├── password_change.html.erb │ │ │ ├── reset_password_instructions.html.erb │ │ │ └── unlock_instructions.html.erb │ │ ├── passwords │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── registrations │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ ├── shared │ │ │ ├── _error_messages.html.erb │ │ │ ├── _form-layout.html.erb │ │ │ └── _links.html.erb │ │ └── unlocks │ │ │ └── new.html.erb │ │ ├── layouts │ │ ├── application.html.erb │ │ ├── mailer.html.erb │ │ └── mailer.text.erb │ │ ├── pages │ │ └── home.html.erb │ │ └── shared │ │ ├── _error_messages.html.erb │ │ ├── _flash.html.erb │ │ ├── _footer.html.erb │ │ └── _navbar.html.erb ├── config │ └── cable.yml ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ ├── .keep │ │ └── auto_annotate_models.rake └── test │ ├── application_system_test_case.rb │ ├── channels │ └── application_cable │ │ └── connection_test.rb │ ├── controllers │ ├── .keep │ └── pages_controller_test.rb │ ├── fixtures │ └── files │ │ └── .keep │ ├── helpers │ └── .keep │ ├── integration │ └── .keep │ ├── mailers │ └── .keep │ ├── models │ └── .keep │ ├── system │ └── .keep │ └── test_helper.rb ├── bulma-vue ├── app │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ └── images │ │ │ └── .keep │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ ├── controllers │ │ ├── application_controller.rb │ │ ├── concerns │ │ │ └── .keep │ │ └── pages_controller.rb │ ├── frontend │ │ ├── components │ │ │ └── views │ │ │ │ └── Home.vue │ │ └── entrypoints │ │ │ ├── application.js │ │ │ ├── main.scss │ │ │ └── stylesheets │ │ │ ├── _global.scss │ │ │ └── _notification.scss │ ├── helpers │ │ ├── application_helper.rb │ │ ├── nav_helper.rb │ │ └── pages_helper.rb │ ├── jobs │ │ └── application_job.rb │ ├── mailers │ │ └── application_mailer.rb │ ├── models │ │ ├── application_record.rb │ │ └── concerns │ │ │ └── .keep │ └── views │ │ ├── devise │ │ ├── confirmations │ │ │ └── new.html.erb │ │ ├── mailer │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── email_changed.html.erb │ │ │ ├── password_change.html.erb │ │ │ ├── reset_password_instructions.html.erb │ │ │ └── unlock_instructions.html.erb │ │ ├── passwords │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── registrations │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ ├── shared │ │ │ ├── _error_messages.html.erb │ │ │ ├── _form-layout.html.erb │ │ │ └── _links.html.erb │ │ └── unlocks │ │ │ └── new.html.erb │ │ ├── layouts │ │ ├── application.html.erb │ │ ├── mailer.html.erb │ │ └── mailer.text.erb │ │ ├── pages │ │ └── home.html.erb │ │ └── shared │ │ ├── _error_messages.html.erb │ │ ├── _flash.html.erb │ │ ├── _footer.html.erb │ │ └── _navbar.html.erb ├── config │ └── cable.yml ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ ├── .keep │ │ └── auto_annotate_models.rake └── test │ ├── application_system_test_case.rb │ ├── channels │ └── application_cable │ │ └── connection_test.rb │ ├── controllers │ ├── .keep │ └── pages_controller_test.rb │ ├── fixtures │ └── files │ │ └── .keep │ ├── helpers │ └── .keep │ ├── integration │ └── .keep │ ├── mailers │ └── .keep │ ├── models │ └── .keep │ ├── system │ └── .keep │ └── test_helper.rb ├── bulma ├── app │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ └── images │ │ │ └── .keep │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ ├── controllers │ │ ├── application_controller.rb │ │ ├── concerns │ │ │ └── .keep │ │ └── pages_controller.rb │ ├── frontend │ │ └── entrypoints │ │ │ ├── application.js │ │ │ ├── main.scss │ │ │ └── stylesheets │ │ │ ├── _global.scss │ │ │ └── _notification.scss │ ├── helpers │ │ ├── application_helper.rb │ │ ├── nav_helper.rb │ │ └── pages_helper.rb │ ├── jobs │ │ └── application_job.rb │ ├── mailers │ │ └── application_mailer.rb │ ├── models │ │ ├── application_record.rb │ │ └── concerns │ │ │ └── .keep │ └── views │ │ ├── devise │ │ ├── confirmations │ │ │ └── new.html.erb │ │ ├── mailer │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── email_changed.html.erb │ │ │ ├── password_change.html.erb │ │ │ ├── reset_password_instructions.html.erb │ │ │ └── unlock_instructions.html.erb │ │ ├── passwords │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── registrations │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ ├── shared │ │ │ ├── _error_messages.html.erb │ │ │ ├── _form-layout.html.erb │ │ │ └── _links.html.erb │ │ └── unlocks │ │ │ └── new.html.erb │ │ ├── layouts │ │ ├── application.html.erb │ │ ├── mailer.html.erb │ │ └── mailer.text.erb │ │ ├── pages │ │ └── home.html.erb │ │ └── shared │ │ ├── _error_messages.html.erb │ │ ├── _flash.html.erb │ │ ├── _footer.html.erb │ │ └── _navbar.html.erb ├── config │ └── cable.yml ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ ├── .keep │ │ └── auto_annotate_models.rake └── test │ ├── application_system_test_case.rb │ ├── channels │ └── application_cable │ │ └── connection_test.rb │ ├── controllers │ ├── .keep │ └── pages_controller_test.rb │ ├── fixtures │ └── files │ │ └── .keep │ ├── helpers │ └── .keep │ ├── integration │ └── .keep │ ├── mailers │ └── .keep │ ├── models │ └── .keep │ ├── system │ └── .keep │ └── test_helper.rb ├── config ├── .DS_Store └── cable.yml ├── hotwired-generator └── stimulus │ ├── USAGE │ ├── stimulus_generator.rb │ └── templates │ └── controller.js ├── jsconfig.json ├── lib-bootstrap ├── assets │ └── .keep ├── tasks │ ├── .keep │ └── auto_annotate_models.rake └── templates │ ├── active_record │ └── model │ │ └── model.rb.txt │ ├── erb │ └── scaffold │ │ ├── _form.html.erb.txt │ │ ├── edit.html.erb.txt │ │ ├── index.html.erb.txt │ │ ├── new.html.erb.txt │ │ ├── partial.html.erb.txt │ │ └── show.html.erb.txt │ └── rails │ └── scaffold_controller │ └── controller.rb.txt ├── lib-bulma ├── assets │ └── .keep ├── tasks │ ├── .keep │ └── auto_annotate_models.rake └── templates │ ├── active_record │ └── model │ │ └── model.rb.txt │ ├── erb │ └── scaffold │ │ ├── _form.html.erb.txt │ │ ├── edit.html.erb.txt │ │ ├── index.html.erb.txt │ │ ├── new.html.erb.txt │ │ ├── partial.html.erb.txt │ │ └── show.html.erb.txt │ └── rails │ └── scaffold_controller │ └── controller.rb.txt ├── lib ├── .DS_Store ├── assets │ └── .keep ├── tasks │ ├── .keep │ └── auto_annotate_models.rake └── templates │ ├── active_record │ └── model │ │ └── model.rb.txt │ ├── erb │ └── scaffold │ │ ├── _form.html.erb.txt │ │ ├── edit.html.erb.txt │ │ ├── index.html.erb.txt │ │ ├── new.html.erb.txt │ │ ├── partial.html.erb.txt │ │ └── show.html.erb.txt │ └── rails │ └── scaffold_controller │ └── controller.rb.txt ├── postcss.config.js ├── tailwind.config.js ├── template.rb ├── template_bootstrap.rb ├── template_bulma.rb ├── test ├── .DS_Store ├── application_system_test_case.rb ├── channels │ └── application_cable │ │ └── connection_test.rb ├── controllers │ ├── .keep │ └── pages_controller_test.rb ├── fixtures │ └── files │ │ └── .keep ├── helpers │ └── .keep ├── integration │ └── .keep ├── mailers │ └── .keep ├── models │ └── .keep ├── system │ └── .keep └── test_helper.rb ├── vite.config-react.ts ├── vite.config-vue.ts └── vite.config.ts /.erb-lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | exclude: 3 | - '**/vendor/**/*' 4 | - '**/gems/**/*' 5 | - '/opt/**/*' 6 | - '**/opt/**/*' 7 | - '**/node_modules/**/*' 8 | -------------------------------------------------------------------------------- /.eslintrc-vue.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true 5 | }, 6 | "extends": [ 7 | "plugin:vue/essential", 8 | "eslint:recommended", 9 | "plugin:prettier/recommended" 10 | ], 11 | "parserOptions": { 12 | "ecmaVersion": 12, 13 | "sourceType": "module" 14 | }, 15 | "plugins": [ 16 | "vue", 17 | "prettier" 18 | ], 19 | "rules": { 20 | "vue/multi-word-component-names": 0, 21 | "no-var": "error", 22 | "indent": ["error", 2], 23 | "no-multi-spaces": "error", 24 | "prefer-const": "error", 25 | "vue/html-indent": ["error", 2], 26 | "vue/no-side-effects-in-computed-properties": 0, 27 | "no-undef": "off", 28 | "prettier/prettier": [ 29 | 2, 30 | { 31 | "bracketSpacing": true, 32 | "printWidth": 140, 33 | "singleQuote": false, 34 | "semi": true, 35 | "trailingComma": "none", 36 | "tabWidth": 2, 37 | "useTabs": false, 38 | "endOfLine": "auto" 39 | } 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:prettier/recommended" 9 | ], 10 | "parserOptions": { 11 | "ecmaVersion": 12, 12 | "sourceType": "module" 13 | }, 14 | "plugins": [ 15 | "prettier" 16 | ], 17 | "rules": { 18 | "no-var": "error", 19 | "indent": ["error", 2], 20 | "no-multi-spaces": "error", 21 | "prefer-const": "error", 22 | "no-undef": "off", 23 | "prettier/prettier": [ 24 | 2, 25 | { 26 | "bracketSpacing": true, 27 | "printWidth": 140, 28 | "singleQuote": false, 29 | "semi": true, 30 | "trailingComma": "none", 31 | "tabWidth": 2, 32 | "useTabs": false, 33 | "endOfLine": "auto" 34 | } 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | .DS_Store 4 | Gemfile.lock 5 | app/.DS_Store 6 | app/frontend/.DS_Store 7 | app/views/.DS_Store 8 | app/assets/.DS_Store 9 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # Gemfile 2 | source 'https://rubygems.org' 3 | # ruby '3.1.0' 4 | gem 'rails' 5 | 6 | gem 'rubocop' 7 | gem 'erb_lint' 8 | -------------------------------------------------------------------------------- /Procfile.dev: -------------------------------------------------------------------------------- 1 | web: bin/rails server -p 3000 2 | vite: bin/vite dev 3 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative "config/application" 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /app-react/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | -------------------------------------------------------------------------------- /app-react/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app-react/assets/images/.keep -------------------------------------------------------------------------------- /app-react/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's 6 | * vendor/assets/stylesheets directory can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 | * compiled file so the styles you add here take precedence over styles defined in any other CSS 10 | * files in this directory. Styles in this file should be added after the last require_* statement. 11 | * It is generally better to create a new file per style scope. 12 | * 13 | *= require_tree . 14 | *= require_self 15 | */ 16 | -------------------------------------------------------------------------------- /app-react/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app-react/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app-react/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /app-react/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app-react/controllers/concerns/.keep -------------------------------------------------------------------------------- /app-react/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app-react/frontend/components/views/home.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function Home() { 4 | return ( 5 | <> 6 |

This is the homepage component

7 |
You can find me in: frontend/components/views/home.jsx
8 | 9 | ) 10 | } -------------------------------------------------------------------------------- /app-react/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; 2 | 3 | import React, {createElement} from 'react'; 4 | import { createRoot } from 'react-dom/client'; 5 | import App from '@/components/views/home'; 6 | 7 | const domContainer = document.querySelector('#home'); 8 | const home = createRoot(domContainer); 9 | home.render(createElement(App)); 10 | -------------------------------------------------------------------------------- /app-react/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "tailwindcss/base"; 2 | @import "tailwindcss/components"; 3 | 4 | @import "./stylesheets/global"; 5 | @import "./stylesheets/buttons"; 6 | @import "./stylesheets/form"; 7 | @import "./stylesheets/alert"; 8 | @import "./stylesheets/navbar"; 9 | 10 | @import "tailwindcss/utilities"; -------------------------------------------------------------------------------- /app-react/frontend/entrypoints/stylesheets/_alert.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | @apply w-fit absolute top-20 right-10 overflow-hidden rounded bg-gray-200 p-5 shadow-lg flex; 3 | &.alert-primary { 4 | @apply bg-blue-600 bg-opacity-80 text-white; 5 | } 6 | &.alert-danger { 7 | @apply bg-red-600 bg-opacity-80 text-white; 8 | } 9 | } -------------------------------------------------------------------------------- /app-react/frontend/entrypoints/stylesheets/_buttons.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | @apply bg-gray-100 hover:bg-gray-200 block text-center rounded-lg py-3 px-5 font-medium cursor-pointer transition-all duration-300 ease-in-out; 3 | 4 | &.btn-primary { 5 | @apply bg-blue-400 hover:bg-blue-600 text-white; 6 | } 7 | 8 | &.btn-secondary { 9 | @apply bg-gray-100 hover:bg-gray-200; 10 | } 11 | 12 | &.btn-danger { 13 | @apply bg-red-400 hover:bg-red-600 text-white; 14 | } 15 | } -------------------------------------------------------------------------------- /app-react/frontend/entrypoints/stylesheets/_form.scss: -------------------------------------------------------------------------------- 1 | .label { 2 | @apply mb-1 block font-semibold; 3 | } 4 | 5 | .field { 6 | &:not(:last-child) { 7 | @apply mb-4; 8 | } 9 | .input { 10 | @apply bg-gray-50 border border-gray-200 px-4 py-2 rounded w-full; 11 | } 12 | } -------------------------------------------------------------------------------- /app-react/frontend/entrypoints/stylesheets/_navbar.scss: -------------------------------------------------------------------------------- 1 | .navbar { 2 | @apply flex flex-wrap items-center px-8 py-4 shadow-sm bg-gray-50; 3 | .logo { 4 | @apply mb-0 text-xl font-semibold text-center; 5 | } 6 | .menu { 7 | @apply flex ml-auto space-x-4; 8 | .nav-link { 9 | @apply text-gray-600 font-medium; 10 | &:hover, 11 | &.is-active { 12 | @apply text-sky-600; 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /app-react/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app-react/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'is-active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | 19 | 20 | end 21 | -------------------------------------------------------------------------------- /app-react/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app-react/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /app-react/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /app-react/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /app-react/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app-react/models/concerns/.keep -------------------------------------------------------------------------------- /app-react/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "btn btn-primary" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /app-react/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /app-react/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /app-react/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /app-react/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /app-react/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /app-react/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Forgot your password?

3 | 4 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 10 |
11 | 12 |
13 | <%= f.submit "Send me reset password instructions", class: "btn btn-primary w-full" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /app-react/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "input" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me %> 18 | <%= f.label :remember_me %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "btn btn-primary block w-full" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /app-react/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |
3 |

4 | <%= I18n.t("errors.messages.not_saved", count: resource.errors.count, resource: resource.class.model_name.human.downcase) %> 5 |

6 | 11 |
12 | <% end %> 13 | -------------------------------------------------------------------------------- /app-react/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%= yield :form_layout %> 5 |
6 |
7 |
8 | -------------------------------------------------------------------------------- /app-react/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /app-react/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails + ReactJS + Vite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | <%= vite_react_refresh_tag %> 9 | 10 | 11 | 12 |
13 | <%= render "shared/navbar" %> 14 | <%= render "shared/flash" %> 15 |
16 | <%= yield %> 17 |
18 | <%= render "shared/footer" %> 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /app-react/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /app-react/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /app-react/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 |
4 |
5 | -------------------------------------------------------------------------------- /app-react/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "alert alert-danger", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "alert alert-primary", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "alert alert-primary", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /app-react/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /app-react/views/shared/_navbar.html.erb: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /app-vue/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /app-vue/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app-vue/assets/images/.keep -------------------------------------------------------------------------------- /app-vue/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app-vue/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app-vue/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /app-vue/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app-vue/controllers/concerns/.keep -------------------------------------------------------------------------------- /app-vue/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app-vue/frontend/components/views/Home.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app-vue/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; 2 | 3 | import { createApp } from 'vue'; 4 | import Home from "../components/views/Home.vue"; 5 | 6 | if (document.querySelector('#home')) { 7 | const home = createApp(Home); 8 | home.mount('#home'); 9 | } -------------------------------------------------------------------------------- /app-vue/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "tailwindcss/base"; 2 | @import "tailwindcss/components"; 3 | 4 | @import "./stylesheets/global"; 5 | @import "./stylesheets/buttons"; 6 | @import "./stylesheets/form"; 7 | @import "./stylesheets/alert"; 8 | @import "./stylesheets/navbar"; 9 | 10 | @import "tailwindcss/utilities"; -------------------------------------------------------------------------------- /app-vue/frontend/entrypoints/stylesheets/_alert.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | @apply w-fit absolute top-20 right-10 overflow-hidden rounded bg-gray-200 p-5 shadow-lg flex; 3 | &.alert-primary { 4 | @apply bg-blue-600 bg-opacity-80 text-white; 5 | } 6 | &.alert-danger { 7 | @apply bg-red-600 bg-opacity-80 text-white; 8 | } 9 | } -------------------------------------------------------------------------------- /app-vue/frontend/entrypoints/stylesheets/_buttons.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | @apply bg-gray-100 hover:bg-gray-200 block text-center rounded-lg py-3 px-5 font-medium cursor-pointer transition-all duration-300 ease-in-out; 3 | 4 | &.btn-primary { 5 | @apply bg-blue-400 hover:bg-blue-600 text-white; 6 | } 7 | 8 | &.btn-secondary { 9 | @apply bg-gray-100 hover:bg-gray-200; 10 | } 11 | 12 | &.btn-danger { 13 | @apply bg-red-400 hover:bg-red-600 text-white; 14 | } 15 | } -------------------------------------------------------------------------------- /app-vue/frontend/entrypoints/stylesheets/_form.scss: -------------------------------------------------------------------------------- 1 | .label { 2 | @apply mb-1 block font-semibold; 3 | } 4 | 5 | .field { 6 | &:not(:last-child) { 7 | @apply mb-4; 8 | } 9 | .input { 10 | @apply bg-gray-50 border border-gray-200 px-4 py-2 rounded w-full; 11 | } 12 | } -------------------------------------------------------------------------------- /app-vue/frontend/entrypoints/stylesheets/_navbar.scss: -------------------------------------------------------------------------------- 1 | .navbar { 2 | @apply flex flex-wrap items-center px-8 py-4 shadow-sm bg-gray-50; 3 | .logo { 4 | @apply mb-0 text-xl font-semibold text-center; 5 | } 6 | .menu { 7 | @apply flex ml-auto space-x-4; 8 | .nav-link { 9 | @apply text-gray-600 font-medium; 10 | &:hover, 11 | &.is-active { 12 | @apply text-sky-600; 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /app-vue/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app-vue/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'is-active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | 19 | 20 | end 21 | -------------------------------------------------------------------------------- /app-vue/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app-vue/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /app-vue/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /app-vue/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /app-vue/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app-vue/models/concerns/.keep -------------------------------------------------------------------------------- /app-vue/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "btn btn-primary" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /app-vue/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /app-vue/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /app-vue/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /app-vue/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /app-vue/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /app-vue/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Forgot your password?

3 | 4 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 10 |
11 | 12 |
13 | <%= f.submit "Send me reset password instructions", class: "btn btn-primary w-full" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /app-vue/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "input" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me %> 18 | <%= f.label :remember_me %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "btn btn-primary block w-full" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /app-vue/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |
3 |

4 | <%= I18n.t("errors.messages.not_saved", count: resource.errors.count, resource: resource.class.model_name.human.downcase) %> 5 |

6 | 12 |
13 | <% end %> 14 | -------------------------------------------------------------------------------- /app-vue/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%= yield :form_layout %> 5 |
6 |
7 |
8 | -------------------------------------------------------------------------------- /app-vue/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /app-vue/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails7VueVite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | 9 | 10 | 11 |
12 | <%= render "shared/navbar" %> 13 | <%= render "shared/flash" %> 14 |
15 | <%= yield %> 16 |
17 | <%= render "shared/footer" %> 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /app-vue/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /app-vue/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /app-vue/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 |
4 |
5 | -------------------------------------------------------------------------------- /app-vue/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "alert alert-danger", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "alert alert-primary", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "alert alert-primary", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /app-vue/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /app-vue/views/shared/_navbar.html.erb: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app/assets/images/.keep -------------------------------------------------------------------------------- /app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; -------------------------------------------------------------------------------- /app/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "tailwindcss/base"; 2 | @import "tailwindcss/components"; 3 | 4 | @import "./stylesheets/global"; 5 | @import "./stylesheets/buttons"; 6 | @import "./stylesheets/form"; 7 | @import "./stylesheets/alert"; 8 | @import "./stylesheets/navbar"; 9 | 10 | @import "tailwindcss/utilities"; -------------------------------------------------------------------------------- /app/frontend/entrypoints/stylesheets/_alert.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | @apply w-fit absolute top-20 right-10 overflow-hidden rounded bg-gray-200 p-5 shadow-lg flex; 3 | &.alert-primary { 4 | @apply bg-blue-600 bg-opacity-80 text-white; 5 | } 6 | &.alert-danger { 7 | @apply bg-red-600 bg-opacity-80 text-white; 8 | } 9 | } -------------------------------------------------------------------------------- /app/frontend/entrypoints/stylesheets/_buttons.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | @apply bg-gray-100 hover:bg-gray-200 block text-center rounded-lg py-3 px-5 font-medium cursor-pointer transition-all duration-300 ease-in-out; 3 | 4 | &.btn-primary { 5 | @apply bg-blue-400 hover:bg-blue-600 text-white; 6 | } 7 | 8 | &.btn-secondary { 9 | @apply bg-gray-100 hover:bg-gray-200; 10 | } 11 | 12 | &.btn-danger { 13 | @apply bg-red-400 hover:bg-red-600 text-white; 14 | } 15 | } -------------------------------------------------------------------------------- /app/frontend/entrypoints/stylesheets/_form.scss: -------------------------------------------------------------------------------- 1 | .label { 2 | @apply mb-1 block font-semibold; 3 | } 4 | 5 | .field { 6 | &:not(:last-child) { 7 | @apply mb-4; 8 | } 9 | .input { 10 | @apply bg-gray-50 border border-gray-200 px-4 py-2 rounded w-full; 11 | } 12 | } -------------------------------------------------------------------------------- /app/frontend/entrypoints/stylesheets/_navbar.scss: -------------------------------------------------------------------------------- 1 | .navbar { 2 | @apply flex flex-wrap items-center px-8 py-4 shadow-sm bg-gray-50; 3 | .logo { 4 | @apply mb-0 text-xl font-semibold text-center; 5 | } 6 | .menu { 7 | @apply flex ml-auto space-x-4; 8 | .nav-link { 9 | @apply text-gray-600 font-medium; 10 | &:hover, 11 | &.is-active { 12 | @apply text-sky-600; 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'is-active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | 19 | 20 | end 21 | -------------------------------------------------------------------------------- /app/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "btn btn-primary" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Forgot your password?

3 | 4 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 10 |
11 | 12 |
13 | <%= f.submit "Send me reset password instructions", class: "btn btn-primary w-full" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "input" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me %> 18 | <%= f.label :remember_me %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "btn btn-primary block w-full" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /app/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |
3 |

4 | <%= I18n.t("errors.messages.not_saved", count: resource.errors.count, resource: resource.class.model_name.human.downcase) %> 5 |

6 | 12 |
13 | <% end %> 14 | -------------------------------------------------------------------------------- /app/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%= yield :form_layout %> 5 |
6 |
7 |
8 | -------------------------------------------------------------------------------- /app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails7 + Vite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | 9 | 10 | 11 |
12 | <%= render "shared/navbar" %> 13 | <%= render "shared/flash" %> 14 |
15 | <%= yield %> 16 |
17 | <%= render "shared/footer" %> 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /app/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 | -------------------------------------------------------------------------------- /app/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "alert alert-danger", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "alert alert-primary", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "alert alert-primary", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /app/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /app/views/shared/_navbar.html.erb: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /bootstrap-react/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /bootstrap-react/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/app/assets/images/.keep -------------------------------------------------------------------------------- /bootstrap-react/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap-react/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap-react/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap-react/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /bootstrap-react/app/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap-react/app/frontend/components/views/home.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function Home() { 4 | return ( 5 | <> 6 |

This is the homepage component

7 |
You can find me in: frontend/components/views/home.jsx
8 | 9 | ) 10 | } -------------------------------------------------------------------------------- /bootstrap-react/app/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; 2 | import "@popperjs/core"; 3 | import "bootstrap"; 4 | 5 | import React, {createElement} from 'react'; 6 | import { createRoot } from 'react-dom/client'; 7 | import App from '@/components/views/home'; 8 | 9 | const domContainer = document.querySelector('#home'); 10 | const home = createRoot(domContainer); 11 | home.render(createElement(App)); 12 | -------------------------------------------------------------------------------- /bootstrap-react/app/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "bootstrap"; 2 | 3 | @import "./stylesheets/global"; 4 | @import "./stylesheets/alert"; -------------------------------------------------------------------------------- /bootstrap-react/app/frontend/entrypoints/stylesheets/_alert.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | top: 5%; 3 | right: 5%; 4 | } -------------------------------------------------------------------------------- /bootstrap-react/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap-react/app/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /bootstrap-react/app/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap-react/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /bootstrap-react/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap-react/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /bootstrap-react/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/app/models/concerns/.keep -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "form-label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "btn btn-primary w-100" %> 14 |
15 | <% end %> 16 | 17 |
18 | <%= render "devise/shared/links" %> 19 | <% end %> 20 | <%= render "devise/shared/form-layout" %> 21 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 | 3 |

Forgot your password?

4 | 5 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 6 | <%= render "devise/shared/error_messages", resource: resource %> 7 | 8 |
9 | <%= f.label :email, class: "form-label" %> 10 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %> 11 |
12 | 13 |
14 | <%= f.submit "Send me reset password instructions", class: "btn btn-primary w-100" %> 15 |
16 | <% end %> 17 | 18 |
19 | <%= render "devise/shared/links" %> 20 | <% end %> 21 | <%= render "devise/shared/form-layout" %> 22 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "form-label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "form-label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "form-control" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me, class: "form-check-input" %> 18 | <%= f.label :remember_me, class: "form-check-label" %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "btn btn-primary w-100" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <%= yield :form_layout %> 6 |
7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails + ReactJS + Vite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | <%= vite_react_refresh_tag %> 9 | 10 | 11 | 12 |
13 | <%= render "shared/navbar" %> 14 | <%= render "shared/flash" %> 15 |
16 | <%= yield %> 17 |
18 | <%= render "shared/footer" %> 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 | 17 | <% end %> 18 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "alert alert-danger position-absolute", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "alert alert-primary position-absolute", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "alert alert-primary position-absolute", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /bootstrap-react/app/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /bootstrap-react/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: rails_7_vue_vite_production 11 | -------------------------------------------------------------------------------- /bootstrap-react/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/lib/assets/.keep -------------------------------------------------------------------------------- /bootstrap-react/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/lib/tasks/.keep -------------------------------------------------------------------------------- /bootstrap-react/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /bootstrap-react/test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /bootstrap-react/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/test/controllers/.keep -------------------------------------------------------------------------------- /bootstrap-react/test/controllers/pages_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class PagesControllerTest < ActionDispatch::IntegrationTest 4 | test "should get home" do 5 | get pages_home_url 6 | assert_response :success 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /bootstrap-react/test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/test/fixtures/files/.keep -------------------------------------------------------------------------------- /bootstrap-react/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/test/helpers/.keep -------------------------------------------------------------------------------- /bootstrap-react/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/test/integration/.keep -------------------------------------------------------------------------------- /bootstrap-react/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/test/mailers/.keep -------------------------------------------------------------------------------- /bootstrap-react/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/test/models/.keep -------------------------------------------------------------------------------- /bootstrap-react/test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-react/test/system/.keep -------------------------------------------------------------------------------- /bootstrap-react/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /bootstrap-vue/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /bootstrap-vue/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/app/assets/images/.keep -------------------------------------------------------------------------------- /bootstrap-vue/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap-vue/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap-vue/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap-vue/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /bootstrap-vue/app/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap-vue/app/frontend/components/views/Home.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrap-vue/app/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; 2 | import "@popperjs/core"; 3 | import "bootstrap" 4 | 5 | import { createApp } from 'vue'; 6 | import Home from "../components/views/Home.vue"; 7 | 8 | if (document.querySelector('#home')) { 9 | const home = createApp(Home); 10 | home.mount('#home'); 11 | } -------------------------------------------------------------------------------- /bootstrap-vue/app/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "bootstrap"; 2 | 3 | @import "./stylesheets/global"; 4 | @import "./stylesheets/alert"; -------------------------------------------------------------------------------- /bootstrap-vue/app/frontend/entrypoints/stylesheets/_alert.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | top: 5%; 3 | right: 5%; 4 | } -------------------------------------------------------------------------------- /bootstrap-vue/app/frontend/entrypoints/stylesheets/_global.scss: -------------------------------------------------------------------------------- 1 | html { 2 | scroll-behavior: smooth; 3 | } 4 | 5 | body { 6 | font-size: 16px; 7 | color: #232323; 8 | line-height: 1.5; 9 | } 10 | 11 | h1 { 12 | font-size: 2.75em; 13 | } 14 | 15 | h2 { 16 | font-size: 2.25em; 17 | } 18 | 19 | h3 { 20 | font-size: 2em; 21 | } 22 | 23 | h4 { 24 | font-size: 1.625em; 25 | } 26 | 27 | h5 { 28 | font-size: 1.25em; 29 | } 30 | 31 | h6 { 32 | font-size: 1.125em; 33 | } 34 | 35 | p { 36 | font-size: 1em; 37 | margin-bottom: 10px; 38 | } 39 | 40 | @media screen and (max-width: 767px){ 41 | h1 { 42 | font-size: 2em; 43 | } 44 | 45 | h2 { 46 | font-size: 1.875em; 47 | } 48 | 49 | h3 { 50 | font-size: 1.75em; 51 | } 52 | 53 | h4 { 54 | font-size: 1.5em; 55 | } 56 | 57 | h5 { 58 | font-size: 1.375em; 59 | } 60 | } -------------------------------------------------------------------------------- /bootstrap-vue/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap-vue/app/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /bootstrap-vue/app/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap-vue/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /bootstrap-vue/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap-vue/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /bootstrap-vue/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/app/models/concerns/.keep -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "form-label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "btn btn-primary w-100" %> 14 |
15 | <% end %> 16 | 17 |
18 | <%= render "devise/shared/links" %> 19 | <% end %> 20 | <%= render "devise/shared/form-layout" %> 21 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 | 3 |

Forgot your password?

4 | 5 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 6 | <%= render "devise/shared/error_messages", resource: resource %> 7 | 8 |
9 | <%= f.label :email, class: "form-label" %> 10 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %> 11 |
12 | 13 |
14 | <%= f.submit "Send me reset password instructions", class: "btn btn-primary w-100" %> 15 |
16 | <% end %> 17 | 18 |
19 | <%= render "devise/shared/links" %> 20 | <% end %> 21 | <%= render "devise/shared/form-layout" %> 22 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "form-label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "form-label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "form-control" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me, class: "form-check-input" %> 18 | <%= f.label :remember_me, class: "form-check-label" %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "btn btn-primary w-100" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <%= yield :form_layout %> 6 |
7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails + VueJS + Vite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | 9 | 10 | 11 |
12 | <%= render "shared/navbar" %> 13 | <%= render "shared/flash" %> 14 |
15 | <%= yield %> 16 |
17 | <%= render "shared/footer" %> 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 | 17 | <% end %> 18 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "alert alert-danger position-absolute", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "alert alert-primary position-absolute", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "alert alert-primary position-absolute", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /bootstrap-vue/app/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /bootstrap-vue/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: rails_7_vue_vite_production 11 | -------------------------------------------------------------------------------- /bootstrap-vue/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/lib/assets/.keep -------------------------------------------------------------------------------- /bootstrap-vue/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/lib/tasks/.keep -------------------------------------------------------------------------------- /bootstrap-vue/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /bootstrap-vue/test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /bootstrap-vue/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/test/controllers/.keep -------------------------------------------------------------------------------- /bootstrap-vue/test/controllers/pages_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class PagesControllerTest < ActionDispatch::IntegrationTest 4 | test "should get home" do 5 | get pages_home_url 6 | assert_response :success 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /bootstrap-vue/test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/test/fixtures/files/.keep -------------------------------------------------------------------------------- /bootstrap-vue/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/test/helpers/.keep -------------------------------------------------------------------------------- /bootstrap-vue/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/test/integration/.keep -------------------------------------------------------------------------------- /bootstrap-vue/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/test/mailers/.keep -------------------------------------------------------------------------------- /bootstrap-vue/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/test/models/.keep -------------------------------------------------------------------------------- /bootstrap-vue/test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap-vue/test/system/.keep -------------------------------------------------------------------------------- /bootstrap-vue/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /bootstrap/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /bootstrap/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/app/assets/images/.keep -------------------------------------------------------------------------------- /bootstrap/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /bootstrap/app/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap/app/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; 2 | import "@popperjs/core"; 3 | import "bootstrap" -------------------------------------------------------------------------------- /bootstrap/app/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "bootstrap"; 2 | 3 | @import "./stylesheets/global"; 4 | @import "./stylesheets/alert"; -------------------------------------------------------------------------------- /bootstrap/app/frontend/entrypoints/stylesheets/_alert.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | top: 5%; 3 | right: 5%; 4 | } -------------------------------------------------------------------------------- /bootstrap/app/frontend/entrypoints/stylesheets/_global.scss: -------------------------------------------------------------------------------- 1 | html { 2 | scroll-behavior: smooth; 3 | } 4 | 5 | body { 6 | font-size: 16px; 7 | color: #232323; 8 | line-height: 1.5; 9 | } 10 | 11 | h1 { 12 | font-size: 2.75em; 13 | } 14 | 15 | h2 { 16 | font-size: 2.25em; 17 | } 18 | 19 | h3 { 20 | font-size: 2em; 21 | } 22 | 23 | h4 { 24 | font-size: 1.625em; 25 | } 26 | 27 | h5 { 28 | font-size: 1.25em; 29 | } 30 | 31 | h6 { 32 | font-size: 1.125em; 33 | } 34 | 35 | p { 36 | font-size: 1em; 37 | margin-bottom: 10px; 38 | } 39 | 40 | @media screen and (max-width: 767px){ 41 | h1 { 42 | font-size: 2em; 43 | } 44 | 45 | h2 { 46 | font-size: 1.875em; 47 | } 48 | 49 | h3 { 50 | font-size: 1.75em; 51 | } 52 | 53 | h4 { 54 | font-size: 1.5em; 55 | } 56 | 57 | h5 { 58 | font-size: 1.375em; 59 | } 60 | } -------------------------------------------------------------------------------- /bootstrap/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap/app/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /bootstrap/app/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /bootstrap/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /bootstrap/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /bootstrap/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /bootstrap/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/app/models/concerns/.keep -------------------------------------------------------------------------------- /bootstrap/app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "form-label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "btn btn-primary w-100" %> 14 |
15 | <% end %> 16 | 17 |
18 | <%= render "devise/shared/links" %> 19 | <% end %> 20 | <%= render "devise/shared/form-layout" %> 21 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 | 3 |

Forgot your password?

4 | 5 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 6 | <%= render "devise/shared/error_messages", resource: resource %> 7 | 8 |
9 | <%= f.label :email, class: "form-label" %> 10 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %> 11 |
12 | 13 |
14 | <%= f.submit "Send me reset password instructions", class: "btn btn-primary w-100" %> 15 |
16 | <% end %> 17 | 18 |
19 | <%= render "devise/shared/links" %> 20 | <% end %> 21 | <%= render "devise/shared/form-layout" %> 22 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "form-label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "form-label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "form-control" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me, class: "form-check-input" %> 18 | <%= f.label :remember_me, class: "form-check-label" %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "btn btn-primary w-100" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <%= yield :form_layout %> 6 |
7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /bootstrap/app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /bootstrap/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails + Vite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | 9 | 10 | 11 |
12 | <%= render "shared/navbar" %> 13 | <%= render "shared/flash" %> 14 |
15 | <%= yield %> 16 |
17 | <%= render "shared/footer" %> 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /bootstrap/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /bootstrap/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /bootstrap/app/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 | 13 | -------------------------------------------------------------------------------- /bootstrap/app/views/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 | 17 | <% end %> 18 | -------------------------------------------------------------------------------- /bootstrap/app/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "alert alert-danger position-absolute", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "alert alert-primary position-absolute", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "alert alert-primary position-absolute", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /bootstrap/app/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /bootstrap/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: rails_7_vue_vite_production 11 | -------------------------------------------------------------------------------- /bootstrap/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/lib/assets/.keep -------------------------------------------------------------------------------- /bootstrap/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/lib/tasks/.keep -------------------------------------------------------------------------------- /bootstrap/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /bootstrap/test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /bootstrap/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/test/controllers/.keep -------------------------------------------------------------------------------- /bootstrap/test/controllers/pages_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class PagesControllerTest < ActionDispatch::IntegrationTest 4 | test "should get home" do 5 | get pages_home_url 6 | assert_response :success 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /bootstrap/test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/test/fixtures/files/.keep -------------------------------------------------------------------------------- /bootstrap/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/test/helpers/.keep -------------------------------------------------------------------------------- /bootstrap/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/test/integration/.keep -------------------------------------------------------------------------------- /bootstrap/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/test/mailers/.keep -------------------------------------------------------------------------------- /bootstrap/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/test/models/.keep -------------------------------------------------------------------------------- /bootstrap/test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bootstrap/test/system/.keep -------------------------------------------------------------------------------- /bootstrap/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /bulma-react/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /bulma-react/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/app/assets/images/.keep -------------------------------------------------------------------------------- /bulma-react/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma-react/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma-react/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /bulma-react/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /bulma-react/app/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma-react/app/frontend/components/views/home.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function Home() { 4 | return ( 5 | <> 6 |

This is the homepage component

7 |
You can find me in: frontend/components/views/home.jsx
8 | 9 | ) 10 | } -------------------------------------------------------------------------------- /bulma-react/app/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; 2 | 3 | import React, { createElement } from 'react'; 4 | import { createRoot } from 'react-dom/client'; 5 | import App from '@/components/views/home'; 6 | 7 | const domContainer = document.querySelector('#home'); 8 | const home = createRoot(domContainer); 9 | home.render(createElement(App)); 10 | -------------------------------------------------------------------------------- /bulma-react/app/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "bulma/bulma"; 2 | 3 | @import "./stylesheets/global"; 4 | @import "./stylesheets/notification"; 5 | -------------------------------------------------------------------------------- /bulma-react/app/frontend/entrypoints/stylesheets/_notification.scss: -------------------------------------------------------------------------------- 1 | .notification { 2 | position: absolute; 3 | top: 5%; 4 | right: 5%; 5 | z-index: 100; 6 | } -------------------------------------------------------------------------------- /bulma-react/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /bulma-react/app/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'is-active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /bulma-react/app/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /bulma-react/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /bulma-react/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /bulma-react/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /bulma-react/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/app/models/concerns/.keep -------------------------------------------------------------------------------- /bulma-react/app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "button is-primary is-fullwidth" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Forgot your password?

3 | 4 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 10 |
11 | 12 |
13 | <%= f.submit "Send me reset password instructions", class: "button is-primary is-fullwidth" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "input" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me %> 18 | <%= f.label :remember_me %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "button is-primary is-fullwidth" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |
3 |
4 | Icons/close outline 5 |
6 |

7 | <%= I18n.t("errors.messages.not_saved", count: resource.errors.count, resource: resource.class.model_name.human.downcase) %> 8 |

9 |
    10 | <% resource.errors.full_messages.each do |message| %> 11 |
  • <%= message %>
  • 12 | <% end %> 13 |
14 |
15 |
16 |
17 | <% end %> 18 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <%= yield :form_layout %> 6 |
7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /bulma-react/app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /bulma-react/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails + ReactJS + Vite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | <%= vite_react_refresh_tag %> 9 | 10 | 11 | 12 |
13 | <%= render "shared/navbar" %> 14 | <%= render "shared/flash" %> 15 |
16 | <%= yield %> 17 |
18 | <%= render "shared/footer" %> 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /bulma-react/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /bulma-react/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /bulma-react/app/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 | 4 |
5 |
6 | -------------------------------------------------------------------------------- /bulma-react/app/views/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 | 18 | <% end %> 19 | -------------------------------------------------------------------------------- /bulma-react/app/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "notification is-danger is-light", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "notification is-primary is-light", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "notification", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /bulma-react/app/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /bulma-react/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: rails_7_vue_vite_production 11 | -------------------------------------------------------------------------------- /bulma-react/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/lib/assets/.keep -------------------------------------------------------------------------------- /bulma-react/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/lib/tasks/.keep -------------------------------------------------------------------------------- /bulma-react/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /bulma-react/test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /bulma-react/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/test/controllers/.keep -------------------------------------------------------------------------------- /bulma-react/test/controllers/pages_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class PagesControllerTest < ActionDispatch::IntegrationTest 4 | test "should get home" do 5 | get pages_home_url 6 | assert_response :success 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /bulma-react/test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/test/fixtures/files/.keep -------------------------------------------------------------------------------- /bulma-react/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/test/helpers/.keep -------------------------------------------------------------------------------- /bulma-react/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/test/integration/.keep -------------------------------------------------------------------------------- /bulma-react/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/test/mailers/.keep -------------------------------------------------------------------------------- /bulma-react/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/test/models/.keep -------------------------------------------------------------------------------- /bulma-react/test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-react/test/system/.keep -------------------------------------------------------------------------------- /bulma-react/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /bulma-vue/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /bulma-vue/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/app/assets/images/.keep -------------------------------------------------------------------------------- /bulma-vue/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma-vue/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma-vue/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /bulma-vue/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /bulma-vue/app/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma-vue/app/frontend/components/views/Home.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bulma-vue/app/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; 2 | 3 | import { createApp } from 'vue'; 4 | import Home from "../components/views/Home.vue"; 5 | 6 | if (document.querySelector('#home')) { 7 | const home = createApp(Home); 8 | home.mount('#home'); 9 | } -------------------------------------------------------------------------------- /bulma-vue/app/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "bulma/bulma"; 2 | 3 | @import "./stylesheets/global"; 4 | @import "./stylesheets/notification"; 5 | -------------------------------------------------------------------------------- /bulma-vue/app/frontend/entrypoints/stylesheets/_global.scss: -------------------------------------------------------------------------------- 1 | html { 2 | scroll-behavior: smooth; 3 | } 4 | 5 | body { 6 | font-size: 16px; 7 | color: #232323; 8 | line-height: 1.5; 9 | } 10 | 11 | h1 { 12 | font-size: 2.75em; 13 | } 14 | 15 | h2 { 16 | font-size: 2.25em; 17 | } 18 | 19 | h3 { 20 | font-size: 2em; 21 | } 22 | 23 | h4 { 24 | font-size: 1.625em; 25 | } 26 | 27 | h5 { 28 | font-size: 1.25em; 29 | } 30 | 31 | h6 { 32 | font-size: 1.125em; 33 | } 34 | 35 | p { 36 | font-size: 1em; 37 | margin-bottom: 10px; 38 | } 39 | 40 | @media screen and (max-width: 767px){ 41 | h1 { 42 | font-size: 2em; 43 | } 44 | 45 | h2 { 46 | font-size: 1.875em; 47 | } 48 | 49 | h3 { 50 | font-size: 1.75em; 51 | } 52 | 53 | h4 { 54 | font-size: 1.5em; 55 | } 56 | 57 | h5 { 58 | font-size: 1.375em; 59 | } 60 | } -------------------------------------------------------------------------------- /bulma-vue/app/frontend/entrypoints/stylesheets/_notification.scss: -------------------------------------------------------------------------------- 1 | .notification { 2 | position: absolute; 3 | top: 5%; 4 | right: 5%; 5 | z-index: 100; 6 | } -------------------------------------------------------------------------------- /bulma-vue/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /bulma-vue/app/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'is-active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /bulma-vue/app/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /bulma-vue/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /bulma-vue/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /bulma-vue/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /bulma-vue/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/app/models/concerns/.keep -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "button is-primary is-fullwidth" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Forgot your password?

3 | 4 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 10 |
11 | 12 |
13 | <%= f.submit "Send me reset password instructions", class: "button is-primary is-fullwidth" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "input" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me %> 18 | <%= f.label :remember_me %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "button is-primary is-fullwidth" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |
3 |
4 | Icons/close outline 5 |
6 |

7 | <%= I18n.t("errors.messages.not_saved", count: resource.errors.count, resource: resource.class.model_name.human.downcase) %> 8 |

9 |
    10 | <% resource.errors.full_messages.each do |message| %> 11 |
  • <%= message %>
  • 12 | <% end %> 13 |
14 |
15 |
16 |
17 | <% end %> 18 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <%= yield :form_layout %> 6 |
7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /bulma-vue/app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /bulma-vue/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails + VueJS + Vite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | 9 | 10 | 11 |
12 | <%= render "shared/navbar" %> 13 | <%= render "shared/flash" %> 14 |
15 | <%= yield %> 16 |
17 | <%= render "shared/footer" %> 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /bulma-vue/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /bulma-vue/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /bulma-vue/app/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 | 4 |
5 |
6 | -------------------------------------------------------------------------------- /bulma-vue/app/views/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 | 18 | <% end %> 19 | -------------------------------------------------------------------------------- /bulma-vue/app/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "notification is-danger is-light", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "notification is-primary is-light", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "notification", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /bulma-vue/app/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /bulma-vue/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: rails_7_vue_vite_production 11 | -------------------------------------------------------------------------------- /bulma-vue/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/lib/assets/.keep -------------------------------------------------------------------------------- /bulma-vue/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/lib/tasks/.keep -------------------------------------------------------------------------------- /bulma-vue/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /bulma-vue/test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /bulma-vue/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/test/controllers/.keep -------------------------------------------------------------------------------- /bulma-vue/test/controllers/pages_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class PagesControllerTest < ActionDispatch::IntegrationTest 4 | test "should get home" do 5 | get pages_home_url 6 | assert_response :success 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /bulma-vue/test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/test/fixtures/files/.keep -------------------------------------------------------------------------------- /bulma-vue/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/test/helpers/.keep -------------------------------------------------------------------------------- /bulma-vue/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/test/integration/.keep -------------------------------------------------------------------------------- /bulma-vue/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/test/mailers/.keep -------------------------------------------------------------------------------- /bulma-vue/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/test/models/.keep -------------------------------------------------------------------------------- /bulma-vue/test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma-vue/test/system/.keep -------------------------------------------------------------------------------- /bulma-vue/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /bulma/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /bulma/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/app/assets/images/.keep -------------------------------------------------------------------------------- /bulma/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /bulma/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /bulma/app/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | def home 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /bulma/app/frontend/entrypoints/application.js: -------------------------------------------------------------------------------- 1 | import "./main.scss"; -------------------------------------------------------------------------------- /bulma/app/frontend/entrypoints/main.scss: -------------------------------------------------------------------------------- 1 | @import "bulma/bulma"; 2 | 3 | @import "./stylesheets/global"; 4 | @import "./stylesheets/notification"; 5 | -------------------------------------------------------------------------------- /bulma/app/frontend/entrypoints/stylesheets/_global.scss: -------------------------------------------------------------------------------- 1 | html { 2 | scroll-behavior: smooth; 3 | } 4 | 5 | body { 6 | font-size: 16px; 7 | color: #232323; 8 | line-height: 1.5; 9 | } 10 | 11 | h1 { 12 | font-size: 2.75em; 13 | } 14 | 15 | h2 { 16 | font-size: 2.25em; 17 | } 18 | 19 | h3 { 20 | font-size: 2em; 21 | } 22 | 23 | h4 { 24 | font-size: 1.625em; 25 | } 26 | 27 | h5 { 28 | font-size: 1.25em; 29 | } 30 | 31 | h6 { 32 | font-size: 1.125em; 33 | } 34 | 35 | p { 36 | font-size: 1em; 37 | margin-bottom: 10px; 38 | } 39 | 40 | @media screen and (max-width: 767px){ 41 | h1 { 42 | font-size: 2em; 43 | } 44 | 45 | h2 { 46 | font-size: 1.875em; 47 | } 48 | 49 | h3 { 50 | font-size: 1.75em; 51 | } 52 | 53 | h4 { 54 | font-size: 1.5em; 55 | } 56 | 57 | h5 { 58 | font-size: 1.375em; 59 | } 60 | } -------------------------------------------------------------------------------- /bulma/app/frontend/entrypoints/stylesheets/_notification.scss: -------------------------------------------------------------------------------- 1 | .notification { 2 | position: absolute; 3 | top: 5%; 4 | right: 5%; 5 | z-index: 100; 6 | } -------------------------------------------------------------------------------- /bulma/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /bulma/app/helpers/nav_helper.rb: -------------------------------------------------------------------------------- 1 | module NavHelper 2 | def nav_link_to(name = nil, options = {}, html_options = {}, &block) 3 | name, options, html_options = block, name, options if block 4 | 5 | url = url_for(options) 6 | starts_with = html_options.delete(:starts_with) 7 | html_options[:class] ||= [] 8 | active_class = html_options.delete(:active_class) || 'is-active' 9 | inactive_class = html_options.delete(:inactive_class) || '' 10 | 11 | active = Array.wrap(starts_with).any? { |path| request.path.start_with?(path) } || request.path == url 12 | html_options[:class] << (active ? " #{active_class}" : " #{inactive_class}") 13 | 14 | html_options.except!(:class) if html_options[:class].empty? 15 | 16 | link_to(name, url, html_options, &block) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /bulma/app/helpers/pages_helper.rb: -------------------------------------------------------------------------------- 1 | module PagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /bulma/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /bulma/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /bulma/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /bulma/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/app/models/concerns/.keep -------------------------------------------------------------------------------- /bulma/app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Resend confirmation instructions

3 | 4 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 10 |
11 | 12 |
13 | <%= f.submit "Resend confirmation instructions", class: "button is-primary is-fullwidth" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /bulma/app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /bulma/app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /bulma/app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /bulma/app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /bulma/app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /bulma/app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Forgot your password?

3 | 4 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 5 | <%= render "devise/shared/error_messages", resource: resource %> 6 | 7 |
8 | <%= f.label :email, class: "label" %> 9 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 10 |
11 | 12 |
13 | <%= f.submit "Send me reset password instructions", class: "button is-primary is-fullwidth" %> 14 |
15 | <% end %> 16 |
17 | <%= render "devise/shared/links" %> 18 | <% end %> 19 | <%= render "devise/shared/form-layout" %> 20 | -------------------------------------------------------------------------------- /bulma/app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :form_layout do %> 2 |

Log in

3 | 4 | <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 5 |
6 | <%= f.label :email, class: "label" %> 7 | <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %> 8 |
9 | 10 |
11 | <%= f.label :password, class: "label" %> 12 | <%= f.password_field :password, autocomplete: "current-password", class: "input" %> 13 |
14 | 15 | <% if devise_mapping.rememberable? %> 16 |
17 | <%= f.check_box :remember_me %> 18 | <%= f.label :remember_me %> 19 |
20 | <% end %> 21 | 22 |
23 | <%= f.submit "Log in", class: "button is-primary is-fullwidth" %> 24 |
25 | <% end %> 26 |
27 | <%= render "devise/shared/links" %> 28 | <% end %> 29 | <%= render "devise/shared/form-layout" %> 30 | -------------------------------------------------------------------------------- /bulma/app/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |
3 |
4 | Icons/close outline 5 |
6 |

7 | <%= I18n.t("errors.messages.not_saved", count: resource.errors.count, resource: resource.class.model_name.human.downcase) %> 8 |

9 |
    10 | <% resource.errors.full_messages.each do |message| %> 11 |
  • <%= message %>
  • 12 | <% end %> 13 |
14 |
15 |
16 |
17 | <% end %> 18 | -------------------------------------------------------------------------------- /bulma/app/views/devise/shared/_form-layout.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <%= yield :form_layout %> 6 |
7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /bulma/app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 | <%= render "devise/shared/error_messages", resource: resource %> 5 | 6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 |
10 | 11 |
12 | <%= f.submit "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /bulma/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rails + Vite 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | 9 | 10 | 11 |
12 | <%= render "shared/navbar" %> 13 | <%= render "shared/flash" %> 14 |
15 | <%= yield %> 16 |
17 | <%= render "shared/footer" %> 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /bulma/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /bulma/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /bulma/app/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 |

Pages#home

2 |

Find me in app/views/pages/home.html.erb

3 | 4 | -------------------------------------------------------------------------------- /bulma/app/views/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 | 18 | <% end %> 19 | -------------------------------------------------------------------------------- /bulma/app/views/shared/_flash.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |type, msg| %> 2 | <% if type == 'alert' %> 3 | <%= content_tag :div, msg, class: "notification is-danger is-light", role: :alert %> 4 | <% elsif type == 'notice' %> 5 | <%= content_tag :div, msg, class: "notification is-primary is-light", role: :alert %> 6 | <% else %> 7 | <%= content_tag :div, msg, class: "notification", role: :alert %> 8 | <% end %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /bulma/app/views/shared/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /bulma/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: rails_7_vue_vite_production 11 | -------------------------------------------------------------------------------- /bulma/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/lib/assets/.keep -------------------------------------------------------------------------------- /bulma/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/lib/tasks/.keep -------------------------------------------------------------------------------- /bulma/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /bulma/test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /bulma/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/test/controllers/.keep -------------------------------------------------------------------------------- /bulma/test/controllers/pages_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class PagesControllerTest < ActionDispatch::IntegrationTest 4 | test "should get home" do 5 | get pages_home_url 6 | assert_response :success 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /bulma/test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/test/fixtures/files/.keep -------------------------------------------------------------------------------- /bulma/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/test/helpers/.keep -------------------------------------------------------------------------------- /bulma/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/test/integration/.keep -------------------------------------------------------------------------------- /bulma/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/test/mailers/.keep -------------------------------------------------------------------------------- /bulma/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/test/models/.keep -------------------------------------------------------------------------------- /bulma/test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/bulma/test/system/.keep -------------------------------------------------------------------------------- /bulma/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /config/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/config/.DS_Store -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: rails_7_vue_vite_production 11 | -------------------------------------------------------------------------------- /hotwired-generator/stimulus/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Explain the generator 3 | 4 | Example: 5 | bin/rails generate stimulus Thing 6 | 7 | This will create: 8 | what/will/it/create 9 | -------------------------------------------------------------------------------- /hotwired-generator/stimulus/stimulus_generator.rb: -------------------------------------------------------------------------------- 1 | class StimulusGenerator < Rails::Generators::NamedBase 2 | source_root File.expand_path("templates", __dir__) 3 | 4 | def create_controller 5 | template('controller.js', File.join("app/frontend/controllers/#{file_name}_controller.js")) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /hotwired-generator/stimulus/templates/controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from '@hotwired/stimulus' 2 | 3 | export default class extends Controller { 4 | static targets = [] 5 | 6 | initialize() { 7 | // Called once, when the controller is first instantiated 8 | } 9 | 10 | connect() { 11 | // Called any time the controller is connected to the DOM 12 | } 13 | 14 | disconnect() { 15 | // Called any time the controller is disconnected from the DOM 16 | } 17 | } -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "skipLibCheck": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "baseUrl": ".", 9 | "sourceMap": true, 10 | "strict": true, 11 | "paths": { 12 | "@/*": ["app/*"], 13 | "@/component*": ["app/frontend/components/*"] 14 | } 15 | }, 16 | "include": ["app/**/*", "app/frontend/components/*"], 17 | "exclude": [ 18 | "**/dist", 19 | "**/node_modules", 20 | "**/test" 21 | ] 22 | } -------------------------------------------------------------------------------- /lib-bootstrap/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/lib-bootstrap/assets/.keep -------------------------------------------------------------------------------- /lib-bootstrap/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/lib-bootstrap/tasks/.keep -------------------------------------------------------------------------------- /lib-bootstrap/templates/active_record/model/model.rb.txt: -------------------------------------------------------------------------------- 1 | <% module_namespacing do -%> 2 | class <%= class_name %> < <%= parent_class_name.classify %> 3 | <% attributes.select(&:reference?).each do |attribute| -%> 4 | belongs_to :<%= attribute.name %><%= ", polymorphic: true" if attribute.polymorphic? %> 5 | <% end -%> 6 | <% attributes.select(&:rich_text?).each do |attribute| -%> 7 | has_rich_text :<%= attribute.name %> 8 | <% end -%> 9 | <% attributes.select(&:attachment?).each do |attribute| -%> 10 | has_one_attached :<%= attribute.name %> 11 | <% end -%> 12 | <% attributes.select(&:attachments?).each do |attribute| -%> 13 | has_many_attached :<%= attribute.name %> 14 | <% end -%> 15 | <% attributes.select(&:token?).each do |attribute| -%> 16 | has_secure_token<% if attribute.name != "token" %> :<%= attribute.name %><% end %> 17 | <% end -%> 18 | <% if attributes.any?(&:password_digest?) -%> 19 | has_secure_password 20 | <% end -%> 21 | 22 | end 23 | <% end -%> 24 | -------------------------------------------------------------------------------- /lib-bootstrap/templates/erb/scaffold/edit.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Editing <%= human_name.downcase %>

4 | 5 | <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %> 6 |
7 | <%%= link_to "Show this <%= human_name.downcase %>", @<%= singular_table_name %>, class: "btn btn-secondary" %> 8 | <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "btn btn-secondary" %> 9 |
10 |
-------------------------------------------------------------------------------- /lib-bootstrap/templates/erb/scaffold/index.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 | <%% if notice.present? %> 3 | 4 | <%% end %> 5 | 6 |
7 |

<%= human_name.pluralize %>

8 | <%%= link_to 'New <%= human_name.downcase %>', new_<%= singular_route_name %>_path, class: "btn btn-primary" %> 9 |
10 | 11 |
12 | <%%= render @<%= plural_table_name %> %> 13 |
14 |
-------------------------------------------------------------------------------- /lib-bootstrap/templates/erb/scaffold/new.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 |

New <%= human_name.downcase %>

4 | 5 | <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %> 6 |
7 | <%%= link_to "Show this <%= human_name.downcase %>", @<%= singular_table_name %>, class: "btn btn-secondary" %> 8 | <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "btn btn-secondary" %> 9 |
10 |
-------------------------------------------------------------------------------- /lib-bootstrap/templates/erb/scaffold/show.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%% if notice.present? %> 4 | 5 | <%% end %> 6 | 7 | <%%= render @<%= singular_table_name %> %> 8 |
9 |
10 | <%%= link_to 'Edit this <%= singular_table_name %>', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "btn btn-primary mx-1" %> 11 | <%%= button_to 'Destroy this <%= singular_table_name %>', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, class: "btn btn-secondary mx-1" %> 12 | <%%= link_to 'Back to <%= plural_table_name %>', <%= index_helper %>_path, class: "btn btn-danger mx-1" %> 13 |
14 |
15 |
-------------------------------------------------------------------------------- /lib-bulma/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/lib-bulma/assets/.keep -------------------------------------------------------------------------------- /lib-bulma/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/lib-bulma/tasks/.keep -------------------------------------------------------------------------------- /lib-bulma/templates/active_record/model/model.rb.txt: -------------------------------------------------------------------------------- 1 | <% module_namespacing do -%> 2 | class <%= class_name %> < <%= parent_class_name.classify %> 3 | <% attributes.select(&:reference?).each do |attribute| -%> 4 | belongs_to :<%= attribute.name %><%= ", polymorphic: true" if attribute.polymorphic? %> 5 | <% end -%> 6 | <% attributes.select(&:rich_text?).each do |attribute| -%> 7 | has_rich_text :<%= attribute.name %> 8 | <% end -%> 9 | <% attributes.select(&:attachment?).each do |attribute| -%> 10 | has_one_attached :<%= attribute.name %> 11 | <% end -%> 12 | <% attributes.select(&:attachments?).each do |attribute| -%> 13 | has_many_attached :<%= attribute.name %> 14 | <% end -%> 15 | <% attributes.select(&:token?).each do |attribute| -%> 16 | has_secure_token<% if attribute.name != "token" %> :<%= attribute.name %><% end %> 17 | <% end -%> 18 | <% if attributes.any?(&:password_digest?) -%> 19 | has_secure_password 20 | <% end -%> 21 | 22 | end 23 | <% end -%> 24 | -------------------------------------------------------------------------------- /lib-bulma/templates/erb/scaffold/edit.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Editing <%= human_name.downcase %>

4 | 5 | <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %> 6 |
7 | <%%= link_to "Show this <%= human_name.downcase %>", @<%= singular_table_name %>, class: "button is-secondary" %> 8 | <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "button is-secondary" %> 9 |
10 |
-------------------------------------------------------------------------------- /lib-bulma/templates/erb/scaffold/index.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 | <%% if notice.present? %> 3 | 4 | <%% end %> 5 | 6 |
7 |

<%= human_name.pluralize %>

8 | <%%= link_to 'New <%= human_name.downcase %>', new_<%= singular_route_name %>_path, class: "button is-primary" %> 9 |
10 | 11 |
12 | <%%= render @<%= plural_table_name %> %> 13 |
14 |
-------------------------------------------------------------------------------- /lib-bulma/templates/erb/scaffold/new.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 |

New <%= human_name.downcase %>

4 | 5 | <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %> 6 |
7 | <%%= link_to "Show this <%= human_name.downcase %>", @<%= singular_table_name %>, class: "button is-secondary" %> 8 | <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "button is-secondary" %> 9 |
10 |
-------------------------------------------------------------------------------- /lib-bulma/templates/erb/scaffold/show.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%% if notice.present? %> 4 | 5 | <%% end %> 6 | 7 | <%%= render @<%= singular_table_name %> %> 8 |
9 |
10 | <%%= link_to 'Edit this <%= singular_table_name %>', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "button is-primary mx-1" %> 11 | <%%= link_to 'Back to <%= plural_table_name %>', <%= index_helper %>_path, class: "button is-secondary mx-1" %> 12 | <%%= button_to 'Destroy this <%= singular_table_name %>', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, class: "button is-secondary mx-1" %> 13 |
14 |
15 |
-------------------------------------------------------------------------------- /lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/lib/.DS_Store -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/lib/assets/.keep -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/lib/tasks/.keep -------------------------------------------------------------------------------- /lib/templates/active_record/model/model.rb.txt: -------------------------------------------------------------------------------- 1 | <% module_namespacing do -%> 2 | class <%= class_name %> < <%= parent_class_name.classify %> 3 | <% attributes.select(&:reference?).each do |attribute| -%> 4 | belongs_to :<%= attribute.name %><%= ", polymorphic: true" if attribute.polymorphic? %> 5 | <% end -%> 6 | <% attributes.select(&:rich_text?).each do |attribute| -%> 7 | has_rich_text :<%= attribute.name %> 8 | <% end -%> 9 | <% attributes.select(&:attachment?).each do |attribute| -%> 10 | has_one_attached :<%= attribute.name %> 11 | <% end -%> 12 | <% attributes.select(&:attachments?).each do |attribute| -%> 13 | has_many_attached :<%= attribute.name %> 14 | <% end -%> 15 | <% attributes.select(&:token?).each do |attribute| -%> 16 | has_secure_token<% if attribute.name != "token" %> :<%= attribute.name %><% end %> 17 | <% end -%> 18 | <% if attributes.any?(&:password_digest?) -%> 19 | has_secure_password 20 | <% end -%> 21 | 22 | end 23 | <% end -%> 24 | -------------------------------------------------------------------------------- /lib/templates/erb/scaffold/edit.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |

Editing <%= human_name.downcase %>

3 | 4 | <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %> 5 |
6 | <%%= link_to "Show this <%= human_name.downcase %>", @<%= singular_table_name %>, class: "btn btn-secondary" %> 7 | <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "btn btn-secondary" %> 8 |
-------------------------------------------------------------------------------- /lib/templates/erb/scaffold/index.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 | <%% if notice.present? %> 3 |

<%%= notice %>

4 | <%% end %> 5 | 6 |
7 |

<%= human_name.pluralize %>

8 | <%%= link_to 'New <%= human_name.downcase %>', new_<%= singular_route_name %>_path, class: "btn btn-primary" %> 9 |
10 | 11 |
12 | <%%= render @<%= plural_table_name %> %> 13 |
14 |
-------------------------------------------------------------------------------- /lib/templates/erb/scaffold/new.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |

New <%= human_name.downcase %>

3 | 4 | <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %> 5 |
6 | <%%= link_to 'Back to <%= human_name.pluralize.downcase %>', <%= index_helper %>_path, class: "btn btn-secondary" %> 7 |
-------------------------------------------------------------------------------- /lib/templates/erb/scaffold/show.html.erb.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%% if notice.present? %> 4 |

<%%= notice %>

5 | <%% end %> 6 | 7 | <%%= render @<%= singular_table_name %> %> 8 |
9 |
10 | <%%= link_to 'Edit this <%= singular_table_name %>', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "btn btn-primary" %> 11 | <%%= button_to 'Destroy this <%= singular_table_name %>', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, class: "btn btn-secondary" %> 12 | <%%= link_to 'Back to <%= plural_table_name %>', <%= index_helper %>_path, class: "btn btn-danger" %> 13 |
14 |
15 |
-------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: [ 3 | './app/views/**/*.{html,html.erb,erb}', 4 | './app/views/devise/**/*.{html,html.erb,erb}', 5 | './app/frontend/components/**/*.{vue,js,ts,jsx,tsx}', 6 | './app/frontend/**/*.{vue,js,ts,jsx,tsx}', 7 | './app/**/*.{vue,js,ts,jsx,tsx}', 8 | ], 9 | theme: { 10 | extend: {}, 11 | }, 12 | plugins: [], 13 | } 14 | -------------------------------------------------------------------------------- /test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/test/.DS_Store -------------------------------------------------------------------------------- /test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/test/controllers/.keep -------------------------------------------------------------------------------- /test/controllers/pages_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class PagesControllerTest < ActionDispatch::IntegrationTest 4 | test "should get home" do 5 | get pages_home_url 6 | assert_response :success 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/test/fixtures/files/.keep -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/test/helpers/.keep -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/test/integration/.keep -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/test/mailers/.keep -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/test/models/.keep -------------------------------------------------------------------------------- /test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IsraelDCastro/rails-vite-tailwindcss-template/b9d9b2a73df28e8e89fcd270876e7dbe7ace61f7/test/system/.keep -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /vite.config-react.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import * as path from "path"; 3 | import FullReload from "vite-plugin-full-reload"; 4 | import RubyPlugin from "vite-plugin-ruby"; 5 | import ViteReact from "@vitejs/plugin-react-refresh"; 6 | 7 | export default defineConfig({ 8 | plugins: [ 9 | ViteReact(), 10 | RubyPlugin(), 11 | FullReload(["config/routes.rb", "app/views/**/*"], { delay: 250 }), 12 | ], 13 | resolve: { 14 | alias: [ 15 | { 16 | find: "@/lib", 17 | replacement: path.resolve(__dirname, "./app/frontend/components/lib/") 18 | }, 19 | { 20 | find: "@/components", 21 | replacement: path.resolve(__dirname, "./app/frontend/components/") 22 | }, 23 | { 24 | find: "@/entrypoints", 25 | replacement: path.resolve(__dirname, "./app/frontend/entrypoints") 26 | } 27 | ] 28 | }, 29 | }) 30 | -------------------------------------------------------------------------------- /vite.config-vue.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import vue from "@vitejs/plugin-vue"; 3 | import * as path from "path"; 4 | import FullReload from "vite-plugin-full-reload"; 5 | import RubyPlugin from "vite-plugin-ruby"; 6 | 7 | export default defineConfig({ 8 | plugins: [ 9 | vue(), 10 | RubyPlugin(), 11 | FullReload(["config/routes.rb", "app/views/**/*"], { delay: 250 }), 12 | ], 13 | resolve: { 14 | alias: [ 15 | { 16 | find: "@/lib", 17 | replacement: path.resolve(__dirname, "./app/frontend/components/lib/") 18 | }, 19 | { 20 | find: "@/components", 21 | replacement: path.resolve(__dirname, "./app/frontend/components/") 22 | }, 23 | { 24 | find: '@/entrypoints', 25 | replacement: path.resolve(__dirname, "./app/frontend/entrypoints") 26 | } 27 | ] 28 | }, 29 | }) 30 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import * as path from "path"; 3 | import FullReload from "vite-plugin-full-reload"; 4 | import RubyPlugin from "vite-plugin-ruby"; 5 | 6 | export default defineConfig({ 7 | plugins: [ 8 | RubyPlugin(), 9 | FullReload(["config/routes.rb", "app/views/**/*"], { delay: 250 }), 10 | ], 11 | resolve: { 12 | alias: [ 13 | { 14 | find: "@/lib", 15 | replacement: path.resolve(__dirname, "./app/frontend/components/lib/") 16 | }, 17 | { 18 | find: "@/components", 19 | replacement: path.resolve(__dirname, "./app/frontend/components/") 20 | }, 21 | { 22 | find: "@/entrypoints", 23 | replacement: path.resolve(__dirname, "./app/frontend/entrypoints") 24 | } 25 | ] 26 | }, 27 | }) 28 | --------------------------------------------------------------------------------