Blog

Why We Used App Router Server Components for a Multi-Tenant Salon Platform

How route groups, server-side data orchestration, and middleware produced predictable role-aware UX at scale.

Why We Used App Router Server Components for a Multi-Tenant Salon Platform
1 min read2026-04-28
By Published Updated

Why We Used App Router Server Components for a Multi-Tenant Salon Platform

Because multi-tenant booking systems fail when authorization and rendering drift apart. App Router server components let us resolve role, salon context, and data before client hydration. In this project, middleware, server layouts, and route groups enforce consistent behavior across owner, staff, customer, and admin journeys.

App Router Architecture

Route-group structure as product architecture

  • (public): marketplace and booking discovery.
  • (auth): login/signup/business onboarding entry.
  • (protected): owner/staff dashboard operations.
  • portal: customer account experience.
  • admin: super-admin controls.

Server-first data orchestration

const [salonsResult, servicesResult, homepageSettingsResult] =
  await Promise.all([
    getFeaturedSalons(),
    getAllPublicServices(HOMEPAGE_LIMIT),
    (async () => {
      const supabase = await createClient();
      return await supabase
        .from("homepage_settings")
        .select("section_order, section_heading_overrides, section_visibility")
        .eq("id", 1)
        .maybeSingle();
    })(),
  ]);
const [salonsResult, servicesResult, productsResult, professionalsResult, packagesResult] =
  await Promise.all([
    getAllActiveSalons(),
    getAllPublicServices(),
    getAllPublicProducts(),
    getAllPublicProfessionals(),
    getAllPublicPackages(),
  ]);

Middleware as the global contract

The middleware checks role, route intent, and subscription status before protected rendering. That prevents fragmented auth checks across dozens of pages and keeps tenant boundaries consistent.

Practical lesson

In SaaS operations software, server components are not only a performance choice. They are also a governance choice: put business-critical access decisions into central server and middleware layers, then let client components focus on interaction quality.

Read the full implementation context in the case study: /case-studies/cooard-salon-platform

Related reading

How We Used Agentic Workflows and AI Automation Without Risking Core Transactions

A blueprint for using AI in delivery and content automation while keeping booking, billing, and access control deterministic.

Continue reading

How To Design Multi-Tenant RBAC with Supabase RLS and Next.js Middleware

A practical MSIS-aligned model for tenant isolation, role controls, and safe privileged operations in a Next.js + Supabase SaaS.

Continue reading

How I Implemented Stripe Subscriptions and Credit Top-Ups in Next.js 16

A production pattern for combining Stripe subscriptions, one-time credit purchases, idempotent webhook fulfillment, and Supabase-backed access control.

Continue reading