{"id":13878354,"url":"https://github.com/rootstrap/rails_hotwire_base","last_synced_at":"2025-08-27T03:31:41.029Z","repository":{"id":44028676,"uuid":"323751501","full_name":"rootstrap/rails_hotwire_base","owner":"rootstrap","description":"Rails + Hotwire base app","archived":true,"fork":false,"pushed_at":"2024-08-15T23:04:25.000Z","size":652,"stargazers_count":77,"open_issues_count":2,"forks_count":21,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-06-12T01:05:08.625Z","etag":null,"topics":["base","hotwire","rails","rails-hotwire","ruby","ruby-on-rails","template-project"],"latest_commit_sha":null,"homepage":"https://rootstrap.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootstrap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-22T23:02:24.000Z","updated_at":"2025-04-04T18:53:42.000Z","dependencies_parsed_at":"2024-01-07T10:51:23.951Z","dependency_job_id":"89373c92-8b44-4edc-a7fa-ec2606601829","html_url":"https://github.com/rootstrap/rails_hotwire_base","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/rootstrap/rails_hotwire_base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Frails_hotwire_base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Frails_hotwire_base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Frails_hotwire_base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Frails_hotwire_base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootstrap","download_url":"https://codeload.github.com/rootstrap/rails_hotwire_base/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Frails_hotwire_base/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272285540,"owners_count":24907110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base","hotwire","rails","rails-hotwire","ruby","ruby-on-rails","template-project"],"created_at":"2024-08-06T08:01:47.112Z","updated_at":"2025-08-27T03:31:40.690Z","avatar_url":"https://github.com/rootstrap.png","language":"Ruby","readme":"# Rails + Hotwire Template\n\n![CI](https://github.com/rootstrap/rails_hotwire_base/workflows/CI/badge.svg)\n[![Code Climate](https://api.codeclimate.com/v1/badges/6b4e50e445c617d9f25d/maintainability)](https://codeclimate.com/github/rootstrap/rails_hotwire_base/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/6b4e50e445c617d9f25d/test_coverage)](https://codeclimate.com/github/rootstrap/rails_hotwire_base/test_coverage)\n\nRails + Hotwire Base is a boilerplate project for full-stack Rails apps with a modern SPA-like experience. It follows the community best practices in terms of standards, security and maintainability, integrating a variety of testing and code quality tools. It's based on Rails 6 and Ruby 3.0.\n\nFinally, it contains a plug and play Administration console (thanks to [ActiveAdmin](https://github.com/activeadmin/activeadmin)).\n\n## Features\n\nThis template comes with:\n- Schema\n  - Users table\n  - Admin users table\n- Endpoints\n  - Sign up with user credentials\n  - Sign in with user credentials\n  - Sign out\n  - Reset password\n  - Show and update user profile\n- Administration panel for users\n- Rspec tests\n- Code quality tools\n- Docker support\n\n## How to use\n\n1. Clone this repo\n1. Install PostgreSQL in case you don't have it\n1. Run `bootstrap.sh` with the name of your your project like `./bootstrap.sh my_awesome_project`\n1. `rspec` and make sure all tests pass\n1. `rails s`\n1. You can now try your app!\n\n## How to use with docker\n\n1. Have `docker` and `docker-compose` installed (You can check this by doing `docker -v` and `docker-compose -v`)\n2. Modify the following lines in the `database.yml` file:\n  ``` yaml\n  default: \u0026default\n    adapter: postgresql\n    encoding: unicode\n    pool: 5\n    username: postgres\n    password: postgres\n    host: db\n    port: 5432\n  ```\n3. Generate a secret key for the app by running `docker-compose run --rm --entrypoint=\"\" web rake secret`, copy it and add it in your environment variables.\n4. Run `docker-compose run --rm --entrypoint=\"\" web rails db:create db:migrate`.\n   1. (Optional) Seed the database with an AdminUser for use with ActiveAdmin by running `docker-compose run --rm --entrypoint=\"\" web rails db:seed`. The credentials for this user are: email: `admin@example.com` ; password: `password`.\n5. (Optional) If you want to deny access to the database from outside of the `docker-compose` network, remove the `ports` key in the `docker-compose.yml` from the `db` service.\n6. (Optional) Run the tests to make sure everything is working with: `docker-compose run --rm --entrypoint=\"\" web rspec .`.\n7. Run the application with `docker-compose up`.\n8. You can now try your app!\n\n## Gems\n\n- [ActiveAdmin](https://github.com/activeadmin/activeadmin) for easy administration\n- [Annotate](https://github.com/ctran/annotate_models) for doc the schema in the classes\n- [Better Errors](https://github.com/charliesome/better_errors) for a better error page\n- [Brakeman](https://github.com/presidentbeef/brakeman) for static analysis security\n- [Bullet](https://github.com/flyerhzm/bullet) help to kill N+1\n- [DelayedJob](https://github.com/collectiveidea/delayed_job) for background processing\n- [Devise](https://github.com/heartcombo/devise) for basic auth\n- [Dotenv](https://github.com/bkeepers/dotenv) for handling environment variables\n- [Draper](https://github.com/drapergem/draper) for decorators\n- [Factory Bot](https://github.com/thoughtbot/factory_bot) for testing data\n- [Faker](https://github.com/stympy/faker) for generating test data\n- [Flipper](https://github.com/jnunemaker/flipper) for feature flags\n- [Letter Opener](https://github.com/ryanb/letter_opener) for previewing a mail in the browser\n- [Omniauth Google Oauth2](https://github.com/zquestz/omniauth-google-oauth2) for Google Sign Up/Sign in\n- [Pagy](https://github.com/ddnexus/pagy) for pagination\n- [Pry](https://github.com/pry/pry) for enhancing the ruby shell\n- [Puma](https://github.com/puma/puma) for the server\n- [Pundit](https://github.com/varvet/pundit) for authorization management\n- [Rails Best Practices](https://github.com/flyerhzm/rails_best_practices) for rails linting\n- [Reek](https://github.com/troessner/reek) for ruby linting\n- [RSpec](https://github.com/rspec/rspec) for testing\n- [Rubocop](https://github.com/bbatsov/rubocop/) for ruby linting\n- [Shoulda Matchers](https://github.com/thoughtbot/shoulda-matchers) adds other testing matchers\n- [Simplecov](https://github.com/colszowka/simplecov) for code coverage\n- [Webmock](https://github.com/bblimke/webmock) for stubbing http requests\n- [YAAF](https://github.com/rootstrap/yaaf) for form objects\n\n## Optional configuration\n\n- Set your mail sender in `config/initializers/devise.rb`\n- Config your timezone accordingly in `application.rb`.\n\n# Hotwire with Redis\n\n[Turbo Streams](https://github.com/hotwired/turbo-rails#turbo-streams) uses [Action Cable](https://guides.rubyonrails.org/action_cable_overview.html) to deliver asynchronous updates to subscribers. This feature allows the user to receive live updates through websockets.\n\nAction Cable relies on `redis` as [subscription adapter](https://guides.rubyonrails.org/action_cable_overview.html#subscription-adapter) for production environment.\n\nWith just a little configuration you can make it work.\n\n```yaml\n# config/cable.yml\n\nproduction:\n  adapter: redis\n  url: \u003c%= ENV.fetch(\"REDIS_URL\") { \"redis://localhost:6379/1\" } %\u003e\n```\n\n## Code quality\n\nWith `rails code_analysis` you can run the code analysis tool, you can omit rules with:\n\n- [Rubocop](https://github.com/bbatsov/rubocop/blob/master/config/default.yml) Edit `.rubocop.yml`\n- [Reek](https://github.com/troessner/reek#configuration-file) Edit `.reek.yml`\n- [Rails Best Practices](https://github.com/flyerhzm/rails_best_practices#custom-configuration) Edit `config/rails_best_practices.yml`\n- [Brakeman](https://github.com/presidentbeef/brakeman) Run `brakeman -I` to generate `config/brakeman.ignore`\n- [Bullet](https://github.com/flyerhzm/bullet#whitelist) You can add exceptions to a bullet initializer or in the controller\n\n## Configuring Code Climate\n\n1. After adding the project to CC, go to `Repo Settings`\n1. On the `Test Coverage` tab, copy the `Test Reporter ID`\n1. Set the current value of `CC_TEST_REPORTER_ID` in the CI project env variables\n\n## Code Owners\n\nYou can use [CODEOWNERS](https://help.github.com/en/articles/about-code-owners) file to define individuals or teams that are responsible for code in the repository.\n\nCode owners are automatically requested for review when someone opens a pull request that modifies code that they own.\n\n## Credits\n\nRails + Hotwire Base is maintained by [Rootstrap](http://www.rootstrap.com) with the help of our\n[contributors](https://github.com/rootstrap/rails_hotwire_base/contributors).\n\n[\u003cimg src=\"https://s3-us-west-1.amazonaws.com/rootstrap.com/img/rs.png\" width=\"100\"/\u003e](http://www.rootstrap.com)\n","funding_links":[],"categories":["Ruby","Starters/Boilerplates"],"sub_categories":["Articles"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Frails_hotwire_base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootstrap%2Frails_hotwire_base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Frails_hotwire_base/lists"}