Skip to content

TodoMVC with Rails 7, StimulusReflex, & Import Maps

Notifications You must be signed in to change notification settings

hopsoft/todomvc

Repository files navigation

TodoMVC with Rails 7, StimulusReflex, & Import Maps

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.

How to run it locally

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.

Lines of code

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
-------------------------------------------------------------------------------

Best Practices

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.

About

TodoMVC with Rails 7, StimulusReflex, & Import Maps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published