Ruby on Rails 6: SaaS multitenancy boilerplate


This is a Ruby on Rails Multitenancy Software as a Service boilerplate app.

Imagine having different secure organisations in Slack, or different team projects in Trello.

Users can create organisations, invite members, and manage access rights to different data

Ruby 2.7+, Rails 6.1+

Sign in with Sign in with Sign in with Sign in with

Buy a Licence + Video course:
Ruby on Rails 6: Learn to Build a Multitenancy Subscriptions SaaS app


Features

The core functionality works well.
We are always working on adding more features.
You can see the existing features, as well as the roadmap here:

Authentication

  • Log in with email
  • Log in with google
  • Log in with github
  • Connect multiple social accounts to one user

Team Multitenancy

  • Complete row-based multitenancy
  • User can create multiple tenants (same as [:organisations, :teams, :accounts])
  • User can switch between tenants
  • User can invite others to become members of the tenant
  • Flexible ways to set current_tenant only where you need it
  • Data is scoped based on current_tenant

Authorization

  • When a user creates a tenant, he gets tenant "admin" role
  • 3 default roles: [:admin, :editor, :viewer]. You can change them.
  • Admin can manage roles and delete users
  • Admin can manage general tenant settings
  • Editor can create, read, update, delete tenant-specific data
  • Viewer can only see the tenant-specific data


Plan-based restrictions

  • Create custom pricing Plans
  • For example - restrictions based on max. members
  • You can change the plan for a tenant

Billing and Subscriptions

  • Custom subscriptions engine (no gems!)
  • NO tenant access without an active subscription
  • Subscriptions
  • One-time Payments
  • Stripe integration

Superadmin access

  • Custom SIMPLE superadmin panel (no gems!)
  • Manage users, tenants, plans, subscriptions, charges


Bootstrap 4.5 native UI

  • Full mobile responsiveness
  • Nice styling with minimal css
  • Fontawesome icons

Internationalization (i18n)

  • Users can select language
  • Views with i18n included

Production & SEO ready

  • ActiveStorage & AWS S3 readiness
  • reCaptcha without google
  • Dark Mode
  • Progressive Web App


Super scaffolding

  • New scaffolds are automatically styled
  • New scaffolds have i18n by default

Docs

  • 100% video coverage (code-along tutorial format) of how this app was created


Inspiration

Apps that you can create using multitenancy

Salesforce

Subscription-based access to organisational data.
Bill organisations, not individuals.

Slack

Users can create multiple independent environments for different teams.

Trello

Invite different collaborators for different projects.
Role-based access.