A minimal, but fully functioning, demo TodoMVC app built with Rails 7, StimulusReflex, and Import Maps.
Only 185 lines of code. 😳
View a full diff from rails new
to functional app. It's a great way to quickly grok what's required to get Rails 7 and StimulusReflex 3.5.0.pre8 working with Import Maps.
git clone -o github https://github.com/hopsoft/todomvc.git
cd todomvc
bundle
bin/rails db:create db:migrate
bin/rails dev:cache
bin/rails s
Then visit http://localhost:3000 in a web browser.
cloc app
21 text files.
21 unique files.
0 files ignored.
github.com/AlDanial/cloc v 1.92 T=0.01 s (1823.4 files/s, 20838.7 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
ERB 6 6 1 92
Ruby 11 17 16 79
JavaScript 3 7 7 14
CSS 1 0 1 0
-------------------------------------------------------------------------------
SUM: 21 30 25 185
-------------------------------------------------------------------------------
Note that this demo app violates what might be considered "best practices." Namely, it uses reflexes for what would traditionally be handled with Rails forms.