Back to projects

Platform

Phase one SaaS foundation for a B2B operations product

A B2B operations product needed a first public cut: real onboarding, role boundaries, and a shell that could accept billing later without a rewrite.

Next.jsSupabaseAuth.jsTypeScriptTailwind CSS
Phase one SaaS foundation for a B2B operations product product interface

Client challenge

The team had UI prototypes but no durable tenancy model. Demo accounts shared data accidentally. Content edits required developer deploys. Subscription thinking was postponed until it became a blocker for paid pilots.

Constraints

  • Private beta within a fixed window
  • Single region deploy acceptable
  • Billing could stub; tenancy could not
  • Founders needed to edit marketing and help content themselves

Engineering decisions

Tenant id on every query path

Membership and tenant scoping were enforced in data access helpers—not left to individual pages to remember.

Separate marketing, app, and admin route groups

Clear boundaries reduced the chance of leaking admin tools into customer sessions.

Billing seam without billing UI

Customer and plan fields exist. Checkout waits. The schema does not pretend money is handled when it is not.

Architecture

Next.js + TypeScript. Supabase/Postgres for persistence. Auth.js for sessions. Structured homepage/blog/project content for the marketing surface. Feature flags gate incomplete modules.

Implementation

Phase one delivered invite-based onboarding, role-aware app shell, core operational workflow, and content editing for public pages. We documented how to add billing and reporting modules against the existing tenant model.

InterfacesWeb apps, portals, admin consolesApplication servicesAuth, domain rules, validation, jobsData & eventsPostgres, object storage, audit logsIntegrationsCRM, email, payments, model APIs

Tradeoffs

  • Skipped multi-region and advanced SSO
  • Used a pragmatic admin rather than a full internal tooling suite
  • Accepted stubbed metering events for later analytics

Lessons learned

  • Tenancy mistakes are expensive to unwind—do them early
  • Content ownership unblocks marketing without blocking engineering
  • A written list of non-goals keeps demos honest

Outcome

The team ran real onboarding demos on a system with proper boundaries. Later billing and reporting work has a place to land. Operators know which surfaces are customer-facing versus internal.

Future improvements

Stripe checkout, usage reporting, and finer admin roles are natural phase-two items on the existing foundation.

Screenshots

Phase one SaaS foundation for a B2B operations product interface 1
Phase one SaaS foundation for a B2B operations product interface 2

More work

Facing a similar constraint set?

Tell us about the workflow, the tools involved, and what “done” means for the first release.

Plan a SaaS foundation