
Explore a multi-tenant SaaS boilerplate with social account connections, internationalization, plan-based subscriptions, a super admin panel, member invitations, and tenant data isolation in a Rails app.
Set up an online development environment with AWS Cloud9, create and configure a new Rails project, and verify Ruby and Rails versions while installing PostgreSQL.
Create a Rails app with PostgreSQL, install dependencies, configure development environment on cloud9, and set up the database by creating a user and database, then start the server.
Push your Ruby on Rails SaaS app to GitHub by creating a new repository, linking a remote, making the initial commit, and configuring your Git username and email.
Clean up the gemfile by removing unused gems and environments, keep PostgreSQL as the database, and omit devise, active storage, and test gems.
Learn to scaffold a Rails app by generating a home controller with an index action, setting the home#index route, and editing the index view to render the first page.
Install bootstrap in a Rails 6 app via yarn and webpacker, import bootstrap in application assets, update environment files, start the server, and confirm styling changes.
Push a Ruby on Rails SaaS app to production with the Heroku CLI, pushing from GitHub, installing dependencies, running migrations, and launching at your app address.
Learn to enhance your Ruby on Rails SaaS app by implementing bootstrap alerts for flash messages via an application helper, customizing colors and layout in the application layout.
Create a users controller with index and show actions to list all users and view a single user, with templates, a bootstrap table, and navigation links.
Configure authentication in a Rails app to let unauthenticated users view the home index and login screen, while securing other actions with before_action.
Design and implement tenants and members tables, auto-adding a user to a new tenant and inviting others by email using devise and Viterbo, with all data scoped by tenant ID.
Scaffold tenants in a Rails app, enforce not-null tenant names in migrations, create tenants and users tables, and build a tenants list with a form to add new tenants.
Learn to style the tenants index and enforce name validation by requiring presence and enforcing uniqueness, replacing users with tenants in the app UI.
Build and manage user-member-tenant relationships in a Ruby on Rails SaaS app by scaffolding members, implementing has_many through associations, and validating unique users per tenant.
Create a my tenants view that shows only the current user's tenants by filtering the index, add header links for my tenants, and render the filtered results.
Learn to enable email invitations in a Ruby on Rails app by integrating the devise_invitable gem, updating the user model, and running bundle install and migrations.
Implement an email invitation flow to add users as tenant members, using a form, routes, and controller logic to invite existing or new users with invitation emails.
Explore how to manage user invitations in a Rails-based SaaS app: create invited users, track invitation acceptance, and re-invite or resend invitations when not yet accepted.
Learn to track who invited a user by adding an invited by field, updating the members controller invite method, and displaying the inviter for each user.
Add a tenant_id to the users table via a Rails migration, add an index, enable current_user-based tenant scoping, and explore belongs_to relationships and security considerations for multi-tenant apps.
Learn to implement a switch button that lets a current user change their tenant by adding a switch action, updating their tenant, and redirecting within the Rails tenants index.
Enforce a current tenant across the app with a before action in the members controller, so only tenant-scoped members are accessible to users who have a current tenant.
Extract the require_tenant logic into an active support concern to reuse across controllers. Include it in the members controller and remove before_action.
Create a tenant and set it as the creator's current_tenant. The lecture shows automatically switching to the new tenant and updating the tenants and users controllers.
Style the header dropdown for tenants, display the current tenant name, and customize links like my talents, new tenant, and conditional members for a clean layout.
Apply Bootstrap styling to new, edit, and show views in a Ruby on Rails app, using cards with headers and footers and forms inside for a polished layout.
Learn how to secure multi-tenant access by restricting set_tenant to users who are members of the tenant, validate current_user.tenants, and prevent cross-tenant access.
refactor tenant setting logic by extracting it into a set_tenant concern and selectively including it in specific controllers, improving modularity while preserving behavior.
Learn to implement global versus tenant-specific views in a Rails SaaS app by conditionally displaying members and tenant badges, using current tenant checks, and adding member counts and validations.
Learn how to safely destroy a tenant with dependent members, redirect to maintenance mode, and move invitation logic from users to members in a Rails SaaS app.
Learn to set current_tenant by url and other controller methods, using filters and content checks to define the tenant for index and show actions, enabling tenant-specific links like members.
Set the current_tenant for a static dashboard page using a dedicated home dashboard action, avoiding global concerns and redirects, and add a dashboard link in the header.
Implement responsive tables in the app to improve mobile viewing, enabling horizontal scrolling within tables and applying the responsive table pattern across users, tenants, and numbers.
Add bootstrap shadows to the Rails SaaS app to give depth and a consistent, unique style across members tables, shows, and edit forms.
Explore how to implement mobile responsiveness by adding a viewport meta tag to scale the app for mobile screens and set utf-8 encoding for proper display.
Create an unauthenticated static pages controller in a Ruby on Rails SaaS app, add routes for about, pricing, terms, and privacy, and wire a layout with navigation links.
Replace stylesheet_link_tag with stylesheet_pack_tag by moving stylesheets into a JavaScript-managed folder, creating application_accessors, and sharing bootstrap logic across apps to keep production-ready assets.
Install the fontawesome library with yarn and add free font awesome icons to the app, importing via a quick script and inserting icons in navigation like home, dashboard, and users.
Create and polish static pages for a Ruby on Rails SaaS app, including home, about, and privacy, and apply footer styling to transform the home into a clear landing page.
Implement a counter_cache in Ruby on Rails by adding a members_count column to the users table, wiring has_many associations, generating migrations, and running counter updates to reflect changes.
Add role based access for tenant members in a Ruby on Rails SaaS app by storing roles as a JSON hash in members, with admin, editor, and viewer roles.
Implement role-based authorization in Rails by checking a current user's member roles (admin or editor) to control access to specific controller actions and visibility of edit buttons.
Implement group-based access control in Rails so only admin members who belong to a town can edit, update, or destroy the current tenant.
Add a before_action requiring a tenant member to access the show action. The code checks current_user membership and returns an authorization error for non-members.
Automate admin assignment as tenants are created: assign the creating user as admin for the new tenant during the create action.
Enforce that every member has at least one role by implementing a must have a role validation in Rails, using the console to assign and test admin and editor roles.
Explore enforcing validations for contacts in a Rails app, including presence checks for first name, last name, phone, and email, and tenant-scoped uniqueness of phone numbers.
Learn to scope contacts to tenants in a multitenant Rails app by linking contacts to a current tenant, enforcing tenant_id in params, and ensuring members see tenant-specific records.
Implement role-based access for contacts in a Rails app, restricting edits to admins and editors while viewers only view; refactor with a current member concern and before action.
Explore displaying nested resources by routing leads under tenants, creating show and new views, and navigating leads and contacts within a Rails app.
In this course you will master Web Development with Ruby on Rails.
I invite you to code-along and develop a complex, real-world professional application from start to finish.
We will be creating a Multitenant B2B SaaS applications like Salesforce, Slack, or Trello using Ruby on Rails.
You will learn:
principles of developing complex software
architecting databases and workflows
how multitenancy works
how to build billing processes
install bootstrap in Rails 6
install fontawesome in Rails 6
gem devise
gem devise_invitable
gem acts_as_tenant
Concerns and Helpers
ActionMailer for sending custom emails
ActiveStorage for uploading files and images
Amazon S3 for storing files and images in production
Advanced Routing and URLs
Creating custom Controllers
Role-based Authorization
i18n (internationalization)
This is my second Ruby on Rails course.
I am proud to say that 90% of the course contents is unique and original (not duplicated from my or other courses).
Ruby on Rails is full-stack Web Development framework.
What is "Web Development"? Creating complex applications that are accessed via a browser (Firefox, Chrome, Edge).
Why "Web Development"? Because apps that are opened through a web browsers are available on any platfrom (Android, Windows, Linux, iOs), so you don't really have to create a separate app for Android, iOs. It just works in any browser!
What is "Full stack"? You create the backend (database, business logic) and frontend (html views, javascript) harmoniously in one single environment.
What is "Ruby"? A high-level programming language, comparable to Python.
What is "Rails"? It's a framework for applying Ruby language for Web Development.
Why "Ruby on Rails" but not Java/Kotlin, NET Core, Go, PHP, Python Django?
Of course, all languages and frameworks have their pros and cons.
For example Python has Django framework for Web Development. Django is ~10% of Python applications.
Rails is 90% of Ruby applications. It is absolutely focused on Web Development.
I choose RoR because:
Very fast development cycle from idea to production MVP.
Full stack. You can configure backend, frontend, database, server all in one place. Fell like a solo independent hero!
Mature, reliable software stack
Helpful community
When to use "Ruby on Rails"? Create the next AirBNB, Groupon, Amazon, Salesforce, Udemy, Skillshare, Github, Trello, Facebook
When not to use "Ruby on Rails"? Create the next Witcher, GTA, Angry Birds, TikTok, Oculus, iPhone
What is Multitenancy? Imagine Netflix Family accounts with billing on family level (not personal). Imagine a slack team where the organization is billed (not each individual member). Each Slack environment has separate members and separate confidential data, that is not shared across teams. Multitenancy separates data based on teams or organizations.
What is "SaaS"? SaaS (Software as a Service) is the modern approach to selling software online via subscription or one-time payments for access. Think Netflix, Spotify (monthly payments).
If you value your time and DON'T want to spend hours learning how a gem works, consider getting this course.
By the end of the course you will feel capable of building any Web application Ruby on Rails web application.
You may learn the skills needed to find a job, or build the application of your dreams.
As well, you will build you own, complete application for creating and selling courses that you will be able to monetize.
Also, if you want to learn more great ruby on rails features, consider subscribing to this course.
P.S.1. In this course we do not cover the basic theory of what Ruby and Rails are. There are other, more basic courses for that. So, having some previous Ruby on Rails experience would be helpful.
P.S.2. I'm a Ruby on Rails Engineer and I built this course out of passion. I'm not a vice actor, so don't expect studio-level audio quality.
Let's start learning!