Five Checkpoints for a B2B SaaS Tenant Foundation
A five-checkpoint walkthrough of what a B2B SaaS tenant actually needs: provisioning, identity and session defaults, per-tenant data isolation, agent access, and localized governance.
Supabaseguillaume_faasTutorial
The Supabase .NET SDK provides a single C# client for Auth, Database, Storage, Realtime, and Edge Functions; version 8.0.0 moves serialization to System.Text.Json and adds injectable HttpClient with retry. It also ships a dependency injection package for ASP.NET Core that registers the client as scoped via IHttpClientFactory to pool connections. Models derive from BaseModel with table and column attributes; queries use From () with Where filters, and updates require explicit calls without a change tracker, supporting both model-based and query-builder approaches. Authentication covers email/password, OAuth, magic links, phone, and SSO, with auto-refresh tokens attaching to subsequent requests for Row-Level Security. Setup for ASP.NET Core uses AddSupabase, while other apps construct the client manually and call InitializeAsync; the post also distinguishes publishable and anon keys for client apps from secret and service keys that bypass Row-Level Security.
Install the Supabase meta-package, define a model class inheriting from BaseModel with table and column attributes, configure the client using AddSupabase for ASP.NET Core or manual Client construction for other apps, then perform queries, inserts, updates, deletes, authentication, and file uploads through the client’s sub-services.
Version 8.0.0 switches serialization to System.Text.Json and adds injectable HttpClient with opt-in retry.
The dependency injection package registers the client as scoped via IHttpClientFactory to prevent connection pool exhaustion.
Models require explicit Update/Delete calls without a change tracker; updates can be done on retrieved models or via the query builder.
Install the Supabase.Extensions.DependencyInjection package, then call builder.Services.AddSupabase in Program.cs with your Supabase URL and key. This registers the client as a scoped service via IHttpClientFactory to pool connections and avoid socket exhaustion.
Version 8.0.0 switches serialization from Newtonsoft.Json to System.Text.Json, adds an injectable HttpClient with opt-in retry, and introduces a dependency injection package for ASP.NET Core. It also drops .NET Framework support by targeting .NET Standard 2.1.
Use the query builder: call supabase.From<T>().Set(property, value).Where(filter).Update() to update rows without fetching them first. This saves a round trip compared to retrieving the model, modifying it, and calling Update on the model.
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
A five-checkpoint walkthrough of what a B2B SaaS tenant actually needs: provisioning, identity and session defaults, per-tenant data isolation, agent access, and localized governance.
A five-checkpoint workflow for spinning up a database branch that behaves like production: clone config, replay migrations, deploy code, pull fresh data, then verify before you trust it.
In B2B, most of the engineering lives in the seams: the tenancy boundary, the integration surface, state sync, and the cross-cutting trust rail. This diagram maps those four layers end to end.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.