6
23 Comments

I finally finished the B2B SaaS foundation I kept rebuilding

After rebuilding the same pieces across multiple B2B SaaS projects, I decided to stop starting from scratch.

I spent the last phase turning that foundation into a complete, reusable codebase.

The current version includes:
Next.js 15 + React 19
Supabase Auth + SSR
Google and GitHub OAuth
Multi-tenant organizations
Owner / Admin / Member RBAC
Secure team invitations
Stripe subscriptions, Checkout + Customer Portal
Stripe webhook synchronization
API keys with hashed secrets
Usage tracking and plan-based limits
Audit logs and notifications
Feature flags
PostgreSQL RLS
Projects and settings

The part I'm most interested in isn't the feature list, though.

It's whether having all of this already implemented actually changes the build decision for someone starting a B2B SaaS.

So I've finished the product and I'm putting it in front of developers now.

If you were starting a B2B SaaS this week, which of these would you most want already solved?

on September 6, 2026
  1. 1

    Zenovay's three edge cases (webhook ordering, RLS-bypassing background workers, seat-based billing transitions) are the sharpest comment here, and there's a version of this week's declared-vs-observed problem sitting underneath them: right now "handles these edge cases" is a declared capability, based on how it was built, not an observed one, based on someone actually hitting them in production. The golden-path test ylynbuilds suggested is the closest thing to an observation you could get before a real paying customer does — but even that only tells you the happy path runs, not that it survives Stripe's actual retry/ordering chaos zenovay described.

    Aryan's question underneath all of this is the one I'd answer first, honestly: no amount of technical hardening substitutes for one real developer paying to skip the rebuild. The foundation being genuinely good and the foundation being validated are still two different claims, and only one of them currently has evidence behind it.

  2. 2

    This is interesting. I’m building a B2B SaaS too, and I’ve found that the hard part isn’t adding more features — it’s making the product simple enough that a new user knows what to do without instructions. I’m trying to optimize for that before adding more complexity.

    1. 1

      I agree. It’s easy to mistake more functionality for a better product. I think the best infrastructure is the part the user never has to think about, so the product can stay focused on a simple core workflow.

    2. 1

      Same road here. Sixteen months in and it only really clicked for me in the last one.

      I was about to call it MVP ready, then actually sat and watched what a first time user has to figure out before any of it makes sense. That turned into about ten days of unplanned work, and none of it is a feature. It's all removing the parts where you need me standing next to you to explain it.

      Bad timing, but better now than after people start signing up.

    3. 1

      I agree. A foundation can solve a lot of the technical complexity, but that shouldn't translate into exposing more complexity to the end user. Ideally, the infrastructure stays invisible and the product experience stays simple. That's something I'm paying more attention to as I test B2B SaaS OS with other developers.

  3. 2

    One way to test whether the foundation changes the build decision: ship a single “golden path” that exercises org creation → invite a member → create a project → hit a plan-limited endpoint → change the subscription and verify webhook sync. Time how long a new developer takes to get that flow running from a blank repo, and log where they need docs or patches. That should reveal which of the many solved pieces is actually the wedge better than the feature checklist alone.

    1. 1

      This is a really good way to test it. I agree that the feature checklist alone doesn't prove much. A golden path from org creation → invite → project → plan limit → subscription change/webhook sync would make the value much more tangible. I'll probably use that as one of the first things I test with developers.

  4. 1

    Having built several SaaS backends, the feature list looks standard on paper, but the real test is how it handles edge cases that hit on day thirty after launch.

    Three specific areas make or break a B2B foundation:

    First, Stripe webhook ordering and idempotency. Most boilerplates map events like subscription updated directly to database updates. But Stripe frequently delivers webhooks out of order, or retries them multiple times. If an invoice payment event arrives seconds before the subscription created event finishes processing, database state desynchronizes. Robust idempotency keys and an append only event log save weeks of debugging billing discrepancies.

    Second, multi tenant isolation in background workers. Supabase RLS is great for direct user queries, but background queues and cron jobs run with service role privileges that bypass RLS completely. If the foundation does not enforce tenant scoping patterns in worker tasks, that is where cross tenant data leaks occur.

    Third, seat based billing transitions. Most teams start with simple flat tiers, then realize B2B buyers expect per seat licenses or usage add ons. If the data model binds organization membership directly to a single plan tier instead of separating user seats from usage metering, changing billing later requires rewriting core tables.

    If you have those three hardened, you are saving developers far more time than just scaffolding auth forms.

    1. 1

      This is exactly the kind of feedback I was hoping for from someone who’s actually shipped SaaS.

      Interestingly, those are all areas I’ve specifically tried to account for in Andrady.co — production-safe Stripe webhook handling/reconciliation, multi-tenant isolation with Postgres RLS, and separating plans, seats and usage rather than hard-wiring billing to the organization.

      I agree that the feature checklist itself is the easy part. The real value is whether the foundation still behaves correctly once you have real customers, retries, upgrades, cancellations, background jobs, etc.

      The one thing I’m particularly interested in getting right is the service-role/background-worker side of tenant isolation, since RLS obviously doesn’t protect you there in the same way.

      From what you’ve seen building SaaS, what production edge case has bitten you hardest that most boilerplates completely miss?

  5. 1

    The measurement problem you're trying to solve is actually upstream of the feature list. The current version includes a complete toolkit, but it doesn't answer the question that actually matters:

    Which parts require edits outside your foundation code vs work seamlessly inside it?

    That gap is where your real value lives. Measure which sections need customization vs which ones save developers friction-fixing work. That's your differentiation, not the checklist of what's built.

    1. 1

      That's a really useful way to frame it. The feature checklist tells you what's included, but not how much work actually disappears. I think measuring each area as “works out of the box” vs “requires customization” would give a much clearer picture of where the foundation is actually saving developers time. I'm going to test this with the next few builders I talk to.

  6. 1

    One thing I’d want to understand before buying is the update path. Once I’ve customized the code, how would I bring in fixes to auth or billing without untangling a big merge? A clear example of that would help me evaluate the foundation.

    1. 1

      That's a fair concern. Right now B2B SaaS OS is sold as a source-code foundation rather than a versioned package with an automated update/merge system, so once you've heavily customized it, updates would need to be integrated selectively. I agree that a concrete example of how auth/billing fixes would be brought into a customized project would make the purchase decision much easier.

  7. 1

    Foundations are easy to keep polishing because each missing piece feels urgent. I’d define one customer workflow end-to-end and tie every foundation task to a measurable outcome—time-to-first-value, support minutes, or conversion. After 3–5 real customers, freeze the schema for a cycle and prioritize the workflow that gets used weekly; that keeps infrastructure from becoming a second product.

    1. 1

      I like the idea of tying infrastructure work to an actual customer workflow. That's probably the best way to avoid turning the foundation itself into the product.

      I'm at that point now — the foundation is built, so the next phase is seeing which parts actually matter once real developers use it. The 3–5 customer checkpoint is a good rule for deciding what deserves another iteration.

  8. 1

    Team invitations and roles for me. In B2B, the person trialling the product may not be the eventual admin or the person paying for it. Having those people join the same workspace without starting over would make the foundation valuable.

    1. 1

      That's a really good point. The trial user and eventual buyer being different people is exactly where team invitations and roles become important.

      Have you run into situations where the workspace had to be recreated or ownership/permissions became messy when that transition happened?

      1. 1

        My comment was about what I'd want from that handoff, rather than a specific incident. Keeping the trial setup intact as other people join is the part I'd value.

  9. 1

    You’ve proven the infrastructure saves you from rebuilding it. The real validation now is whether developers will pay to skip that work on their next SaaS—have any shown that intent yet?

  10. 1

    The boring-but-painful pieces are the real win here: tenant isolation, RLS, and Stripe webhook sync. I’d probably prioritize those over feature flags when choosing a starting point, then test the setup with a tiny two-tenant app before committing. That’s where a reusable foundation either earns its keep or exposes sharp edges.

    1. 1

      Exactly. Those are the pieces that aren't particularly exciting to build, but they become expensive when you get them wrong.

      The Stripe webhook side especially is easy to underestimate — the happy path works quickly, but keeping subscription state, entitlements, and usage limits consistent when things change is where the complexity shows up.

      That's a big part of why I wanted these things solved together rather than treating them as separate starter features.

  11. 1

    The rebuild trap is real — spent 6 months on v2 of our foundation before realizing v1 was fine for the first 50 users. Shipping beats perfect infrastructure every time.

    1. 1

      That's a trap I think a lot of developers fall into — building the foundation for the product they might have instead of the product they actually have.

      That's also why I tried to keep this focused on the infrastructure a B2B SaaS needs from the beginning: auth, tenancy, permissions, billing, security and the surrounding edge cases.

      At some point you have to stop improving the foundation and actually build on top of it.