Hotwire (Turbo + Stimulus)
Basecamp/37signals' HTML-over-the-wire approach to building fast, real-time web apps with minimal JavaScript. Hotwire combines Turbo (handles navigation without full page reloads via Turbo Drive, partial page updates via Turbo Frames, and server-pushed HTML via Turbo Streams) and Stimulus (lightweight JS controller framework for sprinkles of behavior). Rails 7's default frontend approach. Enables rich UIs with server-side rendering and WebSocket real-time updates.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
CSRF protection via Rails. ActionCable stream authentication via signed names. Session verification on WebSocket connect. HTML-over-wire approach reduces XSS risk vs JSON APIs.
⚡ Reliability
Best When
You're building Rails apps and want fast, real-time UIs without a complex JavaScript frontend — Hotwire is Rails 7's default and has excellent Rails integration.
Avoid When
You need complex client-side interactions (rich editors, canvas, drag-and-drop at scale) or have a non-Rails backend — React or HTMX are better choices.
Use Cases
- • Add real-time updates to Rails agent dashboards using Turbo Streams broadcast — update HTML elements on all connected clients when agent data changes
- • Build fast Rails apps with single-page-app-like navigation using Turbo Drive — no full page reloads, browser back/forward works, minimal JS required
- • Create partial page update UIs (live search, sortable tables, inline editing) using Turbo Frames with form submission responses
- • Add targeted real-time HTML updates to agent monitoring pages via ActionCable Turbo Streams — push <turbo-stream> elements from server to connected browsers
- • Sprinkle progressive enhancement behavior (dropdowns, tooltips, form validation) using Stimulus controllers without writing custom event handling boilerplate
Not For
- • Complex client-side state management — Hotwire is server-driven; use React/Vue for apps with complex client-side state (drag-and-drop, canvas, complex forms)
- • Non-Rails backends — Turbo/Stimulus work with any backend but official support and generators are Rails-focused; use HTMX for backend-agnostic HTML-over-wire
- • Mobile apps — Hotwire is web-only; use React Native or native SDKs for mobile
Interface
Authentication
Hotwire uses the host framework's authentication (Devise for Rails). ActionCable WebSocket connections verified via Rails session on connection. No separate auth mechanism.
Pricing
Turbo and Stimulus are MIT licensed, maintained by Basecamp/37signals. turbo-rails is the Rails gem integration. Free for all use.
Agent Metadata
Known Gotchas
- ⚠ Turbo form validation requires 422 status — on validation failure, render :new, status: :unprocessable_entity must be used; returning 200 with errors causes Turbo to replace the page body instead of showing inline errors
- ⚠ Turbo Streams require signed stream names in ActionCable — Turbo::StreamsChannel.signed_stream_name must be used; unsigned stream subscriptions allow stream name manipulation
- ⚠ Stimulus connect/disconnect lifecycle — stimulus controllers connect on element insertion to DOM and disconnect on removal; controllers with timers or subscriptions must clean up in disconnect() method
- ⚠ Turbo Drive caches pages — navigating back shows cached page before server response; pages with time-sensitive data must set meta[name='turbo-cache-control'][content='no-cache']
- ⚠ Turbo Frames reload entire frame on navigation — nested Turbo Frames inside a parent frame can trigger unexpected frame reloads; debug with turbo:frame-load events in browser console
- ⚠ AnyCable for production WebSockets — Rails default ActionCable is not efficient for many concurrent connections; AnyCable replaces the Ruby WebSocket server with Go for production scale at 10K+ connections
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Hotwire (Turbo + Stimulus).
Scores are editorial opinions as of 2026-03-06.