All work
Personal · reusable template · side project · template

SaaS Starter Template

  • Backend
  • Full-stack
  • Side projects
[SCREENSHOT · saas-starter]

A ready-made starting point for software that serves many companies at once: sign-in, company workspaces, roles and permissions, and billing are already built, so a new product starts from the interesting part.

the result →New multi-company apps start with auth, permissions and billing already done.
cat README.md

The problem

Every product that serves many companies needs the same foundation (sign-in, company workspaces, who-can-do-what and billing), and building it from scratch each time is slow and easy to get wrong.

What I built

  • Accounts and companies: sign-in, organizations and an organization switcher.
  • Permissions: roles, plus checks on which company and which records you own.
  • Billing: Stripe built in.
  • One set of rules: the same validation code checks both the forms and the API.

How AI helped

I documented each decision (sessions vs tokens, the permission model, billing) with the research behind it, so later AI-assisted work follows the same reasoning.

The result

New multi-company apps can start with auth, permissions and billing already done.

cat stack.txt

Under the hood

  • react app · org switcher
  • shared zod schemas
  • hono api
  • better auth · rbac + abac
  • drizzle + postgres · stripe
  • Hono API with Better Auth (admin, organization and Stripe plugins) on Drizzle + Postgres
  • Roles plus attribute checks (RBAC + ABAC): roles from auth, tenant and ownership checks in the service layer
  • Session cookies instead of JWT (httpOnly and revocable), with the reasoning documented
  • One shared Zod package validates requests on the API and forms in the React app, so they can't drift
  • hono
  • better-auth
  • drizzle
  • postgresql
  • react
  • zod
  • stripe