Skip to content
SV
← Back to work
2021—2026

Multi-Tenant Framework

Proprietary ERP & enterprise SaaS architecture

Reusable enterprise SaaS framework born from proprietary ERP work at Ocean Enterprises—now powering the North Star Global product suite (GenPBR, NSG Chatbots, agency platform) and NDA client projects including sales software, CRMs, and service business platforms. Architected multi-tenant Postgres with OIDC-ready RBAC, auth, and integrated payment processing; led a team of four remote engineers on the original ERP build.

Build once, deploy many. Each tenant needs isolated data, customizable permissions, and payment flows—without maintaining separate codebases. The framework had to be opinionated enough to ship fast, flexible enough for diverse business models.

Multi-tenant

Tenants

  • Acme Corp
  • Summit Legal
  • GenPBR Org
  • Northshore K-12

Acme Corp

OIDC · RBAC
OwnerAdminSales agentMember

Scoped permissions

  • billing:read
  • users:manage
  • api:write
  • reports:export
  1. 01

    Architected proprietary ERP as key engineer and product manager at Ocean Enterprises

  2. 02

    Hired and led a team of four remote engineers through initial ERP delivery

  3. 03

    Designed tenant isolation at the database row level with Postgres schemas

  4. 04

    Built RBAC system with hierarchical roles and resource-level permissions

  5. 05

    Integrated Stripe and Lemon Squeezy with webhook-driven subscription lifecycle

  6. 06

    Established patterns for Drizzle migrations across multiple production deployments

  • Drizzle ORM with type-safe queries and migration tooling
  • Neon Postgres with connection pooling for serverless deployments
  • JWT + session hybrid auth with refresh token rotation
  • Webhook idempotency and retry patterns for payment reliability
  • Connection pooling optimized for Vercel serverless cold starts
  • Query patterns indexed for multi-tenant read-heavy workloads
  • Edge middleware for auth checks without round-trips to origin

Framework powers multiple production SaaS products—from the original Oceantech ERP through the North Star Global suite and GenPBR. Reduced time-to-market for new verticals from months to weeks while maintaining security and compliance standards.

Next.jsTypeScriptDrizzle ORMPostgreSQLNeonStripeAuthRBAC

Explore other case studies — product engineering, live game services, and platform architecture.

View full archive →