Loading video player...
Once you start building your own SaaS, one of the most important concepts you will have to understand and implement is multi-tenancy. Therefore, in this video, we will go through what multi-tenancy is and how it compares to single-tenancy. We will also cover how to design your database, comparing shared versus per-tenant models. And of course, we will also implement multi-tenancy in a real-world application and use the Decorator Pattern to guarantee zero data leakage. To power our database, we will use RavenDB, which offers a very powerful NoSQL database perfect for multi-tenant applications. ā” Experience RavenDB for FREE: https://dub.sh/5tgDdWE š¤ Meet the new AI Agent in RavenDB: https://dub.sh/XLY36cN šø Screen Recording Software: https://dub.sh/eDa47SO š My favorite Auth Solution: https://dub.sh/xeU8r3v āØļø GitHub Repo: https://github.com/ski043/multi-tenant-nextjs š My Website: https://marshalcode.com/ šš» Discord: https://discord.gg/ZzGqgpmd24 ā Follow me on X: https://x.com/janmarshaldev š§ Business ONLY: jan@alenix.de Timestamps: 00:00 Intro 01:33 Single Tenancy 04:20 Multi-Tenancy 06:35 Multi-Tenant Database Strategies 09:20 Comparing Tenancy Architectures 14:08 Creating a Multi-Tenant Application 16:00 Setting Up the Database 33:00 Data Separation (Tenant ID) 42:00 Data Separation (Decorator for Security)