Skip to main content

Executive Summary

Royal Glow Salon & Spa is a premium beauty and wellness establishment in Bengaluru, India. This document describes the high-level design of the full-stack digital operations platform.
Royal Glow uses a monolithic modular monorepo on Next.js 16 + Neon. The customer and admin apps run on AWS Lambda behind CloudFront through SST, with Cloudflare retained for authoritative DNS and R2 storage. The platform is designed for 20k–50k users, India-first (DPDP, IST, paise, GST 18%), with Lighthouse ≥95 performance and 100 accessibility/SEO.

Scale Targets

Key Constraints

Architecture Overview

Layered Monorepo

Hosting Topology

Technology Decisions Matrix

Data Architecture

Database Strategy

Neon PostgreSQL 16 with Git-like branching.

Data Model Overview (38 tables)

Key Data Conventions

Current Data Paths and Planned Cache

Authentication & Authorization

Auth Architecture

  • Provider: Google OAuth 2.0 only (no email/password)
  • Sessions: PostgreSQL session table (HttpOnly, Secure, SameSite=Lax cookies)
  • CSRF: Built-in via Better Auth
  • Token type: Session-based (not JWT) — revocable, server-validated

API Design

Thin API Layer Pattern

API routes are thin orchestrators. No database queries in route handlers.

Standard Response Shape

API Groups

Non-Functional Requirements

Low-Level Design

State machines, sequences, indexes, and security implementation

Data Model

All 38 tables, enums, and ID formats

Architecture

Condensed architecture overview
Last modified on September 1, 2026