Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Hotwire Example Template

A collection of branches that transmit HTML over the wire.

Deploy to Heroku

How to read this repository

Through the power of incremental Git diffs, each of this repository's branches provides a step-by-step demonstration of how to implement a feature or behavior.

This repository's main branch serves as the root all of the other branches, and consists of a handful of commits generated by the Rails command line interface.

Some branches are works-in-progress. Others are more refined. Some noteworthy branches include:

A branch's includes a prose explanation of the patterns at-play. When reading a branch's source code, read the changes commit-by-commit either on the branch comparison page (for example, main...hotwire-example-live-preview), the branch's commits page (for example, hotwire-example-live-preview), or the branch's file (for example, hotwire-example-live-preview).

To experiment with a branch on your own, clone the repository, check out the branch, execute its set up script, start the local server, then visit http://localhost:3000:

bin/rails server
open http://localhost:3000

How to fork this repository

⚠️ If you're hoping to fork this repository and periodically pull down upstream changes, you're going to have a Bad Time. ⚠️

Each branch builds its narrative through incremental changesets that are visualized as Git diffs. It's not uncommon for code revisions to be made after a branch is published. Changes are retroactively incorporated into the most appropriate commit available. In fact, histories are rebased and rewritten on a regular basis. In practice, these deviations from conventional Git workflows make this repository a bad candidate for forking.

With that being said, if you're comfortable with interactive rebasing, the guide outlines some of the commands and procedures used to create this repository's content.

How to experiment with this repository

Run on

You can fork the @seanpdoyle/hotwire-example-template sandbox project on


A collection of branches that transmit HTML over the wire.



Code of conduct




Sponsor this project