Notes to self

Business Class: A brand new Ruby on Rails SaaS template on the block

After almost a year and a half of work it’s finally here. Business Class goes 1.0.

Business Class is a brand new template focused on Rails defaults, the Paddle payment processor, and developer experience. I wanted something that follows Rails closely, something that helps me with the international sales tax, and something that’s delightful to build upon. If you are interested a bit more in the motivation behind starting a new SaaS template I described it a in more detail in a previous post.

Design

As with every project you have to do some design decitions. Here are five you might want to know about.

Template. Business Class is first and foremost designed to be a template you adopt and build upon. It’s not a library, Rails engine, or a generator (although it comes with one). Essentially you are building your own application that has nothing to do with Business Class. There are no private gems involved.

Authentication and authorization. Accounts are built on top of Devise and Devise::Otp. You can set up 2FA with OTP codes, but also trust your browser at home for convenience. The Devise views are ejected to be easy to work with and changed. There are no assumptions about authorization library.

Multitenancy. Multitenancy is implemented by team spaces with different user roles and a team_id association. Subscriptions are attached to the person starting it (as in real life), but managable by all team owners. You can rename the team feature to what you need so it’ll fit your application (Team, Organization, Space).

Paddle. The Paddle implementation is kept to a minimum to reduce the burden of maintainance. You can work with fake subscriptions in development or offer a free plan without setting up Paddle. There is also a handy a Rake task to sync subscription state in case something happens with webhooks.

Theme. Business Class comes with a simple default theme based on Bulma and you can easily change the logotype and colours to get your MVP a unique feel from day 1 by simply changing couple of SASS variables.

To see the whole list of features, visit features page.

Demo

I prepared a demo called Build a startup under 15 minutes as a homage to the original Rails 15-minute blog video.

Go watch it.

It’s my first programming video ever so keep that in mind :)

FAQ

You might have these three questions.

How can I apply updates? Ideally you won’t really need to but each minor version or a patch will come with a git diff so you can go through it and apply the relevant parts.

Can I use something else than Paddle? The underlying subscription management is done with Pay, so it would be possible. However you might need to reimplement webhooks.

Can I use Tailwind? With a little bit of extra setup you can design your new screens with Tailwind or slowly rewrite Bulma parts with it. However, I currently don’t have alternative Tailwind theme.

Launch

Go to businessclasskit.com and claim 33% discount during the launch week.

Check out my book
Interested in Ruby on Rails default testing stack? Take Minitest and fixtures for a spin with my latest book.

Get Test Driving Rails and make your tests faster and easier to maintain.

by Josef Strzibny
RSS