My Ruby on Rails stack for side projects in 2021

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Blitz

    ⚡️ The Missing Fullstack Toolkit for Next.js

  • Why would you start a new side project in Ruby on Rails in 2021? Shouldn't you use something like Next.js or even Blitz? Well, I find that Ruby on Rails is still one of the most productive ways to create an application. It is safe and boring and it gets the job done.

  • phoenix_live_view

    Rich, real-time user experiences with server-rendered HTML

  • With HTML over the wire becoming popular with tools like Phoenix LiveView and Laravel Livewire, you can't go wrong with good old Ruby on Rails. You can even try Hotwire to stream HTML over web sockets.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Webpacker

    Use Webpack to manage app-like JavaScript modules in Rails

  • Ruby and Rails versions : Ruby 3 and Ruby on Rails 6 Architecture : Use "the Rails way" Background jobs : Sidekiq Database : PostgreSQL Asset Management : Webpacker CSS : Tailwind Javascript : Alpine.js, Stimulus, and Vue Pagination : Pagy Testing : RSpec or Minitest with VCR Periodic jobs : Clockwork Code formatting : Prettier for Javascript. Rubocop for Ruby Exception management : Rollbar or Honeybadger Sending email : Postmark Slugs : friendly_id Full Text Search : pg_search or searchkick Deployment : Heroku or Dokku Self-hosted tools : Thumbor, Huginn, OpenFaaS and Grafana Editor tools : Solargraph, Rails fast nav, Prettier, ruby-rubocop Monitoring : InfluxDB, Grafana and influxdb-rails Templating engine : ERB Admin tool : activeadmin

  • cockroach

    CockroachDB - the open source, cloud-native distributed SQL database.

  • Use a relational database such as PostgreSQL or MySQL. I do not recommend using document databases such as MongoDB because there is really no reason for it in my opinion. PostgreSQL is plenty fast and you probably won't need things like horizontal scaling for a side project. You can of course try something fancy like FaunaDB, CockroachDB, or any of the many database flavors.

  • Draper

    Decorators/View-Models for Rails Applications

  • Don't introduce decorators and view models. Use helpers instead. Don't extract domain models. Put the code in the ActiveRecord models and the controllers. Don't reach for interactors to model your domain logic. Don't try to avoid duplication too early.

  • Sidekiq

    Simple, efficient background processing for Ruby

  • Sidekiq. I've been using that for many years now and it has been rock solid both for side projects and work projects. I also recommend using ActiveJob with Sidekiq just to make things a bit easier and rails-like. It will make things a bit slower but that shouldn't matter for side projects.

  • Svelte

    Cybernetically enhanced web apps

  • A lot of Javascript You might not reach this stage and you should be very careful about choosing to go down this path prematurely since it is quite a bit of work. If you need advanced state management, high performance and complicated client side logic then Stimulus might no longer cut it. You may have to reach for a declarative, component based library like React, Vue, or Svelte. All of these, and others, work very well with Webpacker and there are wrappers to make things easier for you. For example we have React on Rails for React integration.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • limiter

    Simple Ruby rate limiting mechanism. (by Shopify)

  • One issue with Sidekiq is that you won't have access to rate limiting and scheduled jobs unless you pay for the enterprise version. If you are running a business then this is probably a good idea but we are going for dirt cheap here. The rate limit part can be solved using something like ruby-limiter for global rate limiting and sidekiq_limit_fetch to limit concurrency per queue. It doesn't have official support for modern Sidekiq versions but in my experience it works fine anyway. You should probably not use that for business critical things however.

  • Faktory

    Language-agnostic persistent background job server

  • If you want to get fancy you can also take a look at Faktory, which is a polyglot job processing framework from the creator of Sidekiq. Then you can write your jobs in any language you want as well.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts