When we first started building Avo (March 2020), we used the tools we had at hand. Rails and VueJS. We kinda knew deep down that going the VueJS road might bite us later, but we said we gotta start somewhere.
Since DHH launched Hotwire back in December, we knew Avo should use it. We could see all the advantages of going full Hotwire & Rails. We set ourselves the goal of two months to do the refactor. We went a little over by finishing it in 2.5 months, but we’re glad we took this road.
The hotwire rewrite PR has more than 30K updated lines, 180+ commits, and touched 850+ files 📈
We had to rethink how we display the data and re-use the code to our advantage. Hotwire helps out a lot. We have Turbo enabled and use a lot of frames throughout the app. We love using frames when rendering associations. has_many uses the same views we use on the index page, and has_one association uses the views from the show page.
Speaking of views, we took them a step forward. During the refactoring process, we ended up with a lot of views. As you might know, Rails tends to slow down a bit when dealing with a lot of nested views. That’s why we implemented the fantastic view_component gem to take advantage of the performance boost.
We rewrote the public API too. We weren’t thrilled with the original one. After a lot of experimentation, feedback, and outside help (Thank you Thomas), we made some changes.
The final product
After all of that, we ended up with a fantastic product to start our journey.
22 fields out of the box ⚡️
Excellent Active Storage integration 🎁
A lot of field options 💪
A familiar DSL to declare your resources 🤓
Grid view 😎
Rails associations 🤝
Filters and Actions 👌
Advanced authorization 🔑
Localization 🇪🇸
Tons of customizations ✨
All of that 👆 wrapped into a beautiful package powered by Ruby on Rails and Hotwire ❤️