Having been a Ruby developer for a decade, Rails was my go-to for building Qiu. It just made sense. Rails provided a treasure trove of tools right at my fingertips. No reinventing the wheel and allowed me to build Qiu from a concept to a live product in 30 days.
Sensible Defaults
Rails comes with great feature from the start, like ActiveJob for background processing, has_secure_password for authentication, mailers for email handling, and ActiveStorage, were invaluable. This blog engine is written using ActionText! 🤯
Convention over configuration is the way
Ruby Gems
Ruby gems was what allowed us to stay productive when building Qiu. Here are some I consider great defaults.
- pay-rails - rapid integration of Stripe and other payment types
- good_job - what powers our background job, from queuing to sending
- nanoid, hashid - URL obsfucuration, allows us to create URLs with nicer slugs than incremental IDs
- discard - soft deletion, why code one when you could install one!
- bool_at - personal favorite (I made it), DSL for boolean statuses
- name_of_person - Easy first name, last name
- liquid - templating engine for dynamic data (we use this for our email parser)
- ahoy_matey, ahoy_captain - built-in Rails analytics
Analytics
Special mention to Ahoy + Ahoy Captain. It allowed us to add custom tracking without any external requirement, and it is GDPR compliant.
And includes a beautiful UI for analytics tracking.
Coding Convention
I did not follow the skinny model, nor service models very closely.
We deploy a mix of Rails callbacks and model methods to perform tasks.Instead of fighting Rails, we embrace class and instance methods than going immediately for a service class whenever we want to implement something. This allows us to avoid early code bloat and Service class hell early on while keeping code maintainable.
Hosting
Using Render with Docker allowed Qiu to iterate quickly, changing code and deployment only takes 3 minutes.
It allows us to quickly iterate, fix bugs or add features without worrying about deployment times.
And with that
Is what allowed us to build Qiu from idea to MVP in 30 days using Ruby + Rails. Hope you enjoyed this article!
Also, if you want an easier way to send emails, try Qiu.
Top comments (0)