Sufyan Taskin
All work

Own project. .NET 10, Next.js, PostgreSQL.

Multi-tenant SaaS Starter

A production-grade foundation for B2B SaaS, designed and built solo.

Source on GitHub

Tenant webNext.jsPlatform portalNext.jsBFFBFFAPI.NET 10 modular monolithwebworkerPostgreSQLOne database, a schema per module
The tenant web and the platform portal each sit behind a BFF and call one API, run as web and worker processes. The API talks to one PostgreSQL database with a schema per module and Row Level Security.

The problem

Every B2B SaaS product rebuilds the same foundation (tenants, identity, roles, invitations, audit, CI/CD) before it can ship a single feature.

What I did

I designed and built a production-grade foundation solo: a .NET 10 modular monolith API, a Next.js tenant app and platform portal, and PostgreSQL.

I act as the architect. I write the specs and acceptance criteria, Claude Code agents write the code, and I review every PR.

The key decision and its tradeoff

Tenant isolation. I compared database-per-tenant, schema-per-tenant and a shared schema. Database-per-tenant multiplies migrations and cost; schema-per-tenant adds complexity without real isolation.

I chose a shared schema with PostgreSQL Row Level Security, forced on every tenant table, with no account that can bypass it. A developer who forgets a tenant filter still cannot leak data.

A second decision was messaging. MediatR and MassTransit went commercial, so I chose Wolverine (MIT) for outbox, sagas and scheduled messages, after a spike proved it works with RLS.

The result

About 1,900 tests run against real PostgreSQL. CI runs CodeQL, secret scanning, signed images and Playwright E2E. English, Turkish and Arabic (right to left) from day one.