30% OFF - Use code HANDSON30 for 30% off any course or Dometrain Pro! Browse courses →
  • Courses
  • Learning Paths
  • Blogs
  • Authors
  • Leaderboard
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • Let's Build It: Multi-Tenant SaaS App in TypeScript

    Learn how to build a full-stack production-ready multi-tenant Saas Application in TypeScript and React

    About This Course

    Want to build a real SaaS product and learn how to scale it for multiple customers? This fast-paced course will show you how to build a full-stack, multi-tenant B2B SaaS application from scratch, entirely in TypeScript. You'll follow along with James, an experienced Engineering Director with 10+ years of real-world experience building B2B SaaS platforms. You'll build a collaborative note-taking tool that supports multiple organizations, each with its own users, data, and access control. But this isn't just about note-taking! It's about teaching you the architecture, infrastructure, and security concepts behind any robust multi-tenant SaaS product. Along the way, you'll integrate user authentication, build a secure backend API with database isolation, deploy cloud infrastructure using AWS CDK, and even add Stripe payments so your users can subscribe to your app. And yes - you'll do all of this in one codebase, entirely in TypeScript. This course is perfect for indie hackers, bootstrappers, and developers looking to sharpen their TypeScript skills while building something real that could turn into a profitable business.

    Course Curriculum

    8h 36m 10 sections
    Welcome
    02:06 Free preview
    What will you learn in this course?
    01:19 Free preview
    Who is the course for and prerequisites
    03:30 Free preview
    How to follow along
    02:18 Free preview
    Brief history of B2B SaaS
    02:53
    Multi tenancy explained
    03:28
    Data Isolation Models in SaaS
    04:49
    Authorization Models
    10:06
    Business Considerations & Pricing
    06:08
    Introduction
    01:58
    Wheel Of Compromise
    04:25
    Functional Requirements
    02:05
    Out Of Scope
    02:23
    Choosing a Tech Stack
    13:31
    Benefits of starting with the front end
    03:10
    Frontend Architecture
    04:10
    Creating a Vite application in React
    16:58
    Introduction to TanStack Query
    07:30
    Routing with TanStack Router
    13:43
    Styling with CSS modules
    14:19
    Working with mocked data
    16:55
    Creating front end components
    28:21
    Testing with Playwright
    06:21
    Introduction to AWS
    06:20
    Infrastructure as Code on AWS
    07:13
    Deploying AWS Services
    07:03
    Overview of Backend Architecture
    16:25
    Creating The Backend Stack
    11:00
    Deploying Backend Services
    16:50
    Creating The FrontEnd Stack
    27:53
    Recap - Authorization models for multi-tenancy
    07:29
    IAM Roles & Permissions
    04:26
    Cognito User Groups
    02:02
    Token Based Authentication Explained
    07:04
    Setting Up Cognito Hosted UI
    06:19
    Styling the Hosted UI
    03:32
    Adding Auth to the Front End
    38:47
    Recap - Tenant Isolation Strategies
    05:40
    Database Design in DynamoDB
    06:53
    Accessing Cognito From NodeJS
    09:55
    Tenant Creation Logic
    16:55
    Assuming The Tenant Role
    11:24
    Handling HTTP Requests with AWS Lambda
    11:53
    Creating the Notes Endpoint
    10:58
    Querying DynamoDB From The Reports Endpoint
    06:43
    Adding Users Into A Subscription
    14:21
    Introduction to Stripe
    04:21
    Setting Up Stripe
    09:16
    Inserting Stripe Checkout Into Signup Flow
    20:36
    Creating A Stripe Checkout Session
    11:15
    Creating the Stripe Webhook
    11:18
    Testing Stripe Checkout
    06:32
    Tracking SaaS Metrics (MRR, churn rate, LTV, CAC)
    04:50
    Product Channel Fit
    02:35
    SEO Best Practises
    02:16
    Pricing
    04:00
    Getting Your First Users
    03:31
    Building a Wait List
    05:18

    Meet Your Instructor

    James Charlesworth

    James Charlesworth

    James is a Director of Engineering, O'Reilly author, speaker, and YouTuber with 20 years of experience in the tech industry. He has worked across startups and publicly listed tech companies, helping to build and scale software products. James focuses on teaching product skills to engineers, building high-performing product engineering teams, and defining the "Product Engineer" career path. He shares practical advice on software engineering, product development, and career growth through his Train to Code YouTube channel.

    View all courses by James Charlesworth

    What's New

    Getting Started: Model Context Protocol (MCP)
    course

    Getting Started: Model Context Protocol (MCP)

    Learn how to get started with the Model Context Protocol (MCP) and integrate it into your applications.

    Learn more about Getting Started: Model Context Protocol (MCP)
    Hands-On: Learn TypeScript
    course

    Hands-On: Learn TypeScript

    Learn TypeScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn TypeScript
    Hands-On: Learn JavaScript
    course

    Hands-On: Learn JavaScript

    Learn JavaScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn JavaScript
    Hands-On: Data Structures & Algorithms in C#
    course

    Hands-On: Data Structures & Algorithms in C#

    Master data structures and algorithms through hands-on coding exercises in C#. Free to enroll for 7 days!

    Learn more about Hands-On: Data Structures & Algorithms in C#
    Blogsmith.ai
    feature

    Blogsmith.ai

    Turn your videos into blogs and newsletters with AI. Check out our new product at blogsmith.ai.

    Learn more about Blogsmith.ai
    Leaderboard
    feature

    Leaderboard

    See how you stack up against other learners. Track your progress, climb the ranks, and compete with the Dometrain community.

    Learn more about Leaderboard
    Hands-On: Learn PostgreSQL
    course

    Hands-On: Learn PostgreSQL

    Learn PostgreSQL through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn PostgreSQL
    Free Hands-On: C# for Beginners
    course

    Free Hands-On: C# for Beginners

    Learn C# through hands-on coding exercises. Practice what you learn with interactive challenges designed for everyone, from beginners to experts.

    Learn more about Free Hands-On: C# for Beginners
    Getting Started: AI for .NET Developers
    course

    Getting Started: AI for .NET Developers

    Get started with integrating AI into your .NET applications effectively using the latest LLM best practices.

    Learn more about Getting Started: AI for .NET Developers
    Getting Started: Building .NET Applications on AWS
    course

    Getting Started: Building .NET Applications on AWS

    Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

    Learn more about Getting Started: Building .NET Applications on AWS
    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn more about What's new in C# 14
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn more about Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn more about From Zero to Hero: SignalR in .NET
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn more about Deep Dive: Solution Architecture
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn more about Migrating: ASP.NET Web APIs to ASP.NET Core
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn more about Getting Started: Caching in .NET
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn more about From Zero to Hero: Testing with xUnit in C#
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn more about Create a ChatGPT Console AI Chatbot in C#