hotwire-patterns
Hotwire Patterns for Rails 8
Overview
Hotwire = HTML Over The Wire. Build modern web apps without writing much JavaScript.
| Component | Purpose | Use Case |
|---|---|---|
| Turbo Drive | SPA-like navigation | Automatic, no code needed |
| Turbo Frames | Partial page updates | Inline editing, tabbed content |
| Turbo Streams | Real-time DOM updates | Live updates, flash messages |
| Stimulus | JavaScript sprinkles | Toggles, forms, interactions |
When to Use Each Pattern
More from dchuk/rails_ai_agents
authorization-pundit
Implements policy-based authorization with Pundit for resource access control. Use when adding authorization rules, checking permissions, restricting actions, role-based access, or when user mentions Pundit, policies, authorization, or permissions.
3install
Sets up a new Rails 8 application with recommended defaults for TDD, authentication, multi-tenancy, and Hotwire. Use when creating a new Rails project, bootstrapping an app, or when user mentions new app, rails new, project setup, or initial setup.
2api-versioning
Implements RESTful API design with versioning and request tests. Use when building APIs, adding API endpoints, versioning APIs, or when user mentions REST, JSON API, or API design.
2i18n-patterns
Implements internationalization with Rails I18n for multi-language support. Use when adding translations, managing locales, localizing dates/currencies, pluralization, or when user mentions i18n, translations, locales, or multi-language.
2rails-concern
Creates Rails concerns for shared behavior across models or controllers with TDD. Use when extracting shared code, creating reusable modules, DRYing up models/controllers, or when user mentions concerns, modules, mixins, or shared behavior.
2rails-controller
Creates Rails controllers with TDD approach - integration test first, then implementation. Use when creating new controllers, adding controller actions, implementing CRUD operations, or when user mentions controllers, routes, or API endpoints.
2