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.
Welcome (02:06)
What will you learn in this course? (01:19)
Who is the course for and prerequisites (03:30)
How to follow along (02:18)
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)
Course Info
Lifetime access
Add to Cart© 2025 Dometrain. All rights reserved.