Introducing Rails Stats

Ever wondered about how big a Rails project or product is? Looking for inspiration for small, but still (financial) successful Rails products? Want to share your Rails project with others? Now you can!

Introducing: railsstats.com

Over the past weeks I spent a bit of time here and there to build the most basic version. The goal with this first version is to collect as many projects as possible. Then later cool features and views can be built on top of them.

bin/rails stats

But first, bin/rails stats? Yes, Rails comes with a feature to view your app’s stats. It includes lines of code, test ratio and so on. You can view them by running bin/rails stats in your app. It will output a table-like view with all the deets.

It’s this data you can paste into railsstats.com.

Small, medium or large

13 years ago, almost to the day today, DHH shared in this article, Basecamp Next (aka “Basecamp 2”) was almost 15,000 lines of code upon launch (today Basecamp is closer to 244,000 🤯). The article also mentions the original Basecamp was just about 2,000 lines when it launched! 😎 For comparison: Rails Stats, also just launched, and which is a wáy simpler app (minimal business logic) than Basecamp original, is about 1,500 lines of code.

Compare that to GitHub’s Rails monolith that, in 2023, had about 2 million lines of code (GitHub dev, if you read this: feel free to add your stats ✌️).

As a guideline you can use:

  • Small: Up to 25,000 LOC;
  • Medium: 25,000 to 150,000 LOC;
  • Large: 150,000 to 500,000 LOC;
  • Enterprise: Over 500,000 LOC.

Open Source

railsstats.com is OSS so you can see the full codebase, clone it and add features and fix bugs. It’s a truly vanilla Rails 8 application: partials, helpers, Hotwire and vanilla CSS. Deployed using Kamal.

Some choices might surprise you, as Rails Designer has been heavily focused on ViewComponent and Tailwind CSS, but I often work with different stacks, either when building a SaaS for others or with teams via my Tailor-Made UI packages. While I love Rails Designer’s default stack, checking out the vanilla path keeps things interesting to me.

So if you run a Rails project, be sure to add the stats or check out the source (star it ⭐ and contribute! ❤️)

Get UI & Product Engineering Insights for Rails Apps (and product updates!)

Published at . Have suggestions or improvements on this content? Do reach out.

UI components Library for Ruby on Rails apps

$ 99 one-time
payment

Explore
  • One-time Payment

  • Access to the Entire Library

  • Built using ViewComponent

  • Designed with Tailwind CSS

  • Enhanced with Hotwire

Fractional Rails UI Product Engineer

$ 2k month

Hire
  • UI Modernization

  • Fractional UI and feature improvement

  • JavaScript untaming

  • No full-time commitment

Launch a Rails SaaS app in a month

$ 15k one-time

Book a call
  • Modern Rails app

  • Ready for paying customers in one month

  • 2 - 3 core features

  • You own every line of code