Rails
Rails is the default Rails architecture bundle.
architecture :rails
This defines:
controllersmodelshelpersmailersjobsservices
It checks that models and services stay away from controller and helper dependencies, and that they do not call controller-only APIs such as render, redirect_to, params, session, cookies, or flash.
Some apps share helper modules as plain utilities outside views. Allow that with share_helpers, which drops the models-and-services to helpers boundary while keeping the rest:
architecture :rails, share_helpers: true
Override the controller API list when a component legitimately defines one of those names, such as a service framework with its own params:
architecture :rails, controller_api: %i[render redirect_to session cookies flash]
Strict
rails_strict adds a cycle check across the Rails components and a concern independence check on app/**/concerns/**/*.rb.
architecture :rails_strict
Point the concern check elsewhere with concerns:, or turn it off with concerns: false:
architecture :rails_strict, concerns: "app/models/concerns/**/*.rb"