Skip to content
All projects
TypeScript·Multi-tenant SaaS starter, batteries included

GStack

A production-ready starting point for multi-tenant SaaS: Nuxt 4, Supabase, row-level-security tenancy, billing, notifications, and observability already wired together and tested.

10
isolated Nuxt layers, each a self-contained feature
RLS
tenancy enforced in the database, not app code
19
test files, plus automated a11y and screenshot CI

Stack

Nuxt 4TypeScriptSupabasePostgreSQLNuxt UI v4PlaywrightPolarResend
GStack

The architectural idea

Most SaaS starters put tenancy in the application layer: a where tenant_id = ? that someone eventually forgets. GStack pushes it into Postgres. Every table is tenant-scoped by row-level security through a current_tenant_id() helper, so a missing filter in application code is not a data leak. Roles (member / admin) are enforced the same way, with page metadata handling UX only.

That is the distinction I care about: the database is the gate, the UI is the convenience.

Feature layers

The codebase is split into ten Nuxt layers - account, admin, analytics, billing, email, feedback, marketing, notes, tour, ui. Each owns its pages, composables, and types, and most can be switched off with an environment variable. notes is a deliberately boring CRUD example that shows the pattern to copy.

Layers are not decoration here. They mean a feature can be deleted without grepping the whole app, and a new domain can be added without touching existing ones.

Operational maturity

  • Billing via Polar checkout, customer portal, and webhook, with plan gating through a useSubscription() composable
  • Notifications - a database trigger fans an event out to tenant admins, a webhook mirrors it to transactional email
  • Observability - Sentry on client and server, PostHog analytics, and feature flags that degrade safely when the service is unreachable
  • CI - lint, typecheck, tests, plus dedicated accessibility and screenshot workflows; screenshots in the README regenerate with pnpm screenshots

Let’s build something that lasts

Hiring a senior engineer or architect for a remote team? I work across EU and US time zones - tell me what you're building.

Newsletter

I write about software architecture, PHP, Vue, TypeScript, and developer experience. No spam, unsubscribe anytime.

Copyright © 2026. All rights reserved.