All posts
2026-07-15 · Unity Labs

How We Built a Multi-Tenant Salon SaaS with Convex + Clerk

GlowFlow runs unlimited salons from one codebase with strict tenant isolation, real-time dashboards, and per-salon branding — here's the architecture.

GlowFlowConvexClerkArchitecture

GlowFlow is a multi-tenant SaaS platform for salon, spa, and wellness business management. Every business record is scoped to a salon, and users access salons through membership — enforced server-side, never on the client alone.

The Stack

  • **Next.js 15** (App Router) for SSR, routing, and API routes
  • **Convex** for real-time database, queries, mutations, cron, and file storage
  • **Clerk** for JWT-based auth synced to Convex identity
  • **Stripe** for POS card payments and SaaS subscriptions
  • **Tailwind CSS v4** with CSS variables for per-salon theming

Multi-Tenancy Model

Clerk User → users table → salonMembers (role + permissions)
  → salons → clients, appointments, staff, products, transactions, payroll...

Convex custom wrappers (`salonQuery`, `salonMutation`, `ownerMutation`) enforce auth and salon membership on every request. This is Convex's recommended pattern instead of SQL row-level security.

Real-Time by Default

Every dashboard page uses `useQuery` from Convex React. When one receptionist books an appointment, every subscribed calendar updates instantly — no WebSocket wiring, no manual cache invalidation.

Per-Salon Branding

Salon colors flow from the database into CSS variables at runtime via `SalonThemeProvider`. Each tenant gets distinct visual identity without separate deployments.

Key Workflows

1. **Appointment lifecycle** — pending → confirmed → completed, with double-booking prevention 2. **POS checkout** — single Convex mutation handles line items, discounts, stock deduction, and receipt generation 3. **Payroll** — attendance records feed into pay runs with commission and deductions 4. **Subscriptions** — Stripe webhooks update salon plan limits via `subscriptionLimits.ts`

Try It

The interactive demo at glowflow.unity-labs.xyz loads 10 sample records in every module — no credit card required.

Related product

View product