"I'm a marketer by trade and a wannabe developer by night …and to me, user management and billing are always the most overwhelming parts of my project.'"
Dirty Little Secret Alert!
Even seasoned engineers, with decades of experience consider this repetitive, boilerplate code a time consuming nuisance.
The most important place to focus your limited time, at this stage of the game, is adding a Unique Value Proposition that users will pay for, not wasting time creating user login and billing code.
"It is much more critical to the business that you focus your time talking to as many potential customers as possible and doing market research to make sure you are building something that people actually want.'"
So let's take advantage, and download, Rails boilerplate templates for all of the boring, complex code. Let's stay focused on what's important - adding value for potential customers.
4 Boilerplate Code Templates For Your Rails SaaS App
1. Limestone Accounts
Limestone Accounts is an open source boilerplate SaaS app built with Rails 5.2. It's well maintained and updated regularly.
This SaaS app is multi tenant, meaning for each of your user accounts will have a subscription. Credit Card processing is dealt with via Stripe.
The feature list is impressive:
- Free trial begins upon registration without credit card.
- Per-seat billing.
- Subscription management. Card update form and cancel account button.
- Emails for welcome, billing updated, invoice paid, invoice failed and trial expiring. All except welcome are controlled by Stripe webhooks.
- Invoice PDF attached to invoice paid email.
- Mail sends through Sidekiq with deliver_later. Devise mailing also configured for Sidekiq dispatch.
- Direct uploading to S3 with ActiveStorage. Lazy transform for resizing. Demonstrated with user avatars.
- Icon helper for user avatars with fallback to user initials. Icon helper for font awesome icons.
- Administrate dashboard lets you manage records (ex: accounts, users, invoices). Easy to add more and customize as you like. Visit /admin.
- Impersonate users through administrate dashboard.
- Pretty modals using bootstrap integrated into rails_ujs data-confirm. Demonstrated with cancel account button.
- Persistent banner with link to billing page for accounts that are past due.
- Opinionated search integration using Elasticsearch via Searchkick. Gem is in place but integration is up to you.
- Feature control using the flipper gem. Demonstrated with public_registration.
- Notifications with ActionCable. See console example in app/models/notification.rb.
- 88% RSpec test coverage.
2. Sjabloon
Don't let the confusing name fool you, this is a full featured Rails SaaS starter kit that allows you to focus on what's important for your business.
- Ruby on Rails 5.2
- Subscription and One Time Payments with Stripe
- User authentication
- User dashboard
- Email list subscriptions
- and a bunch more…
This isn't free and open source like Limestone Accounts, but it's very reasonably priced. As of this writing they are running an "early bird'" discount originally $129 now down to $59 for 12 months of free updates and improvements. Great deal!
- Unlimited usage
- Ruby on Rails 5.2.x and PostgreSQL
- Webpack, PostCss, Tailwind, Stimulus JS
- Beautiful theme with custom-designed homepage
- Access to the full UI components library
- Authentication with Devise (configuration, setup and design)
- User dashboard layout
- Announcements (change log) system
- SMTP ready-to-go (for multiple providers)
- Analytics, chat widgets and error monitoring set up
- Designed transactional emails
3. RailsKits
Skip the boring stuff and dive right into the code that makes your SaaS unique.
Another paid offering, as of this writing they offer two licenses: $999 and $249 with a full refund within 30 days if you're not happy.
Features include:
- Authorize.net CIM, Braintree, Payment Express, Stripe, and TrustCommerce, all via ActiveMerchant
- No local credit card storage. All credit card information is stored with the payment gateway, so you don't have to worry about the PCI implications of storing credit card numbers.
- Automated billing script runs nightly for anniversary billing.
- Configurable subscription renewal period (defaults to one month).
- Automated notification and retry of failed renewals.
- Free accounts and one-month trials are supported.
- Optionally collect payment information for paid accounts at account creation.
- Optionally collect setup fees, if you collect payment info up-front and don't have a trial period.
- Self-serve account creation.
- Self-serve account upgrades and downgrades, with limit checking to prevent downgrading to a plan for which the account does not qualify, based on the plan limits.
- Automated notification and retry of failed renewals.
- Free accounts and one-month trials are supported.
- Easy customization of plan levels pricing and custom limits.
- Ability to tweak limits and fees per account.
- Ability for users to reset their own passwords (Forgot your password?…)
- Easily provide Discounts
- Account lookups by subdomain (multi-tenant).
4. Bullet Train
Bullet Train is a Ruby on Rails Saas-in-a-box. It saves you weeks of development by starting you off with all the features that are the same in every SaaS - now you can focus on what makes your app valuable to customers.
They have a free live demo and a one time purchase tier at $1,450 (as of this writing) for 12 months of new features and improvements.
Features include:
- Pricing page and subscriptions
- User account management
- Teams
- Security and permissions
- Code generation
- Onboarding workflows
- Full mobile responsiveness
- Complete test coverage
- Third party integrations