Introducing Rails Stats: view LoC of Rails Products

This article was originally published on Rails Designer

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…


This content originally appeared on DEV Community and was authored by Rails Designer

This article was originally published on Rails Designer

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 (and, okay, I also have used a few decorators). 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! ❤️)


This content originally appeared on DEV Community and was authored by Rails Designer


Print Share Comment Cite Upload Translate Updates
APA

Rails Designer | Sciencx (2025-01-16T19:00:00+00:00) Introducing Rails Stats: view LoC of Rails Products. Retrieved from https://www.scien.cx/2025/01/16/introducing-rails-stats-view-loc-of-rails-products/

MLA
" » Introducing Rails Stats: view LoC of Rails Products." Rails Designer | Sciencx - Thursday January 16, 2025, https://www.scien.cx/2025/01/16/introducing-rails-stats-view-loc-of-rails-products/
HARVARD
Rails Designer | Sciencx Thursday January 16, 2025 » Introducing Rails Stats: view LoC of Rails Products., viewed ,<https://www.scien.cx/2025/01/16/introducing-rails-stats-view-loc-of-rails-products/>
VANCOUVER
Rails Designer | Sciencx - » Introducing Rails Stats: view LoC of Rails Products. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/16/introducing-rails-stats-view-loc-of-rails-products/
CHICAGO
" » Introducing Rails Stats: view LoC of Rails Products." Rails Designer | Sciencx - Accessed . https://www.scien.cx/2025/01/16/introducing-rails-stats-view-loc-of-rails-products/
IEEE
" » Introducing Rails Stats: view LoC of Rails Products." Rails Designer | Sciencx [Online]. Available: https://www.scien.cx/2025/01/16/introducing-rails-stats-view-loc-of-rails-products/. [Accessed: ]
rf:citation
» Introducing Rails Stats: view LoC of Rails Products | Rails Designer | Sciencx | https://www.scien.cx/2025/01/16/introducing-rails-stats-view-loc-of-rails-products/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.