Royal Glow internal docs · now fully interactive — Steps, API tables, file trees & live status
Royal Glow Docs

Tech Stack

Every technology used in the Royal Glow platform and why it was chosen.

Tech Stack

Royal Glow is built for scale (20k–50k users), premium feel, and long-term maintainability by a single developer. Every technology choice is made with that constraint in mind.

Total monthly infrastructure cost at launch: ₹0. Every service runs on a free tier that is generous enough for a salon at this scale. The whole stack is edge-first, India-first (DPDP, IST, paise, GST 18%), and chosen so one developer can run it with minimal ops overhead.

The Stack by Layer

Browse each layer of the platform. Every choice below is in production use.

LayerTechnologyWhy
RuntimeBunFaster than Node.js for installs, test runs, and scripts
LanguageTypeScript (strict)Type safety across the full stack — catches ~40% of bugs before tests run
FrameworkNext.js 16.2.9 (App Router)SSR, SSG, API routes, edge-ready. params/searchParams are Promises in v16.
UIReactComponent model, ecosystem
StylingTailwind CSS v4Utility-first, design tokens, fast iteration
Componentsshadcn/uiCopy-paste Radix-based components — fully owned, zero runtime overhead
Animationmotion (motion.dev)Page transitions, staggered reveals, micro-interactions — free tier
MonorepoTurborepo + Bun workspacesBun manages packages; Turborepo handles task orchestration + incremental caching

Why shadcn/ui: components are copy-pasted into your repo — you own 100% of the code. Built on Radix UI primitives for production-tested accessibility, with zero runtime overhead.

ToolRole
Neon PostgreSQL 16Serverless Postgres with branching — 1 project, 4 environment branches, free tier
Drizzle ORMPure TypeScript, no binary — edge-native, runs on Cloudflare Workers without adapters
Better AuthPrimary auth library — Google OAuth, RBAC plugin, session management
Better Auth CloudFree dashboard, audit logs, user management UI

Why Drizzle over Prisma: Prisma's Rust query engine binary cannot run in a V8 isolate (Cloudflare Workers) without workarounds or paid Prisma Accelerate. Drizzle is pure TypeScript and works everywhere.

Google OAuth only — no email/password. This eliminates credential stuffing, weak passwords, and reset flows. All salon customers in India have Google accounts.

LayerTechnology
Edge HostingCloudflare Workers (OpenNext adapter — rgss-web, rgss-admin)
CMS HostingRender (Singapore, free tier — rgss-cms, cms.theroyalglow.in)
DatabaseNeon DB (PostgreSQL, 4 branches)
RealtimeAbly (6M messages/mo free)
File StorageCloudflare R2 (10 GB free, zero egress)
Cache + QueueUpstash Redis + QStash
Edge CacheCloudflare KV (service catalog, 5-min TTL)
CMSPayload CMS v3 (self-hosted on Render, media to R2)
DocumentationFumadocsdocs.theroyalglow.in
ToolRole
ResendTransactional emails (invoices, booking confirmations)
React EmailEmail templates in React/TypeScript
BrevoMarketing/bulk emails with unsubscribe management
ToolPurpose
Biome + UltraciteLinting + formatting (replaces ESLint + Prettier — 100x faster)
VitestUnit & integration testing
React Testing LibraryComponent testing
PlaywrightEnd-to-end testing (5 browsers)
MSWAPI mocking (network-level, works in browser + Node)
k6Load testing (target: 50 concurrent on pprd)
Lighthouse CIPerformance gate — ≥95 score required to merge
Trivy + Semgrep + Socket.devSecurity scanning (deps, SAST, supply chain)
Husky + lint-stagedPre-commit hooks (lint + format on staged files)
ChecklySynthetic monitoring (real Playwright scripts in prod)
LayerToolFree Tier
Error monitoringSentry5k errors/mo
Uptime + status + jobs + logsBetterStack10 monitors, 1 GB logs/mo
Product analyticsPostHog1M events/mo
Heatmaps + session recordingsMicrosoft ClarityFree forever
ToolRole
AiSensyWhatsApp lead management — shared team inbox, Meta Click-to-WhatsApp
Meta PixelBrowser-side event tracking
Meta Conversions API (CAPI)Server-side event tracking — reliable, unaffected by iOS privacy
Custom /admin/leadsIn-house lead pipeline — reads directly from Neon DB

Why no external CRM: all customer and booking data lives in Neon DB. An external CRM would require a continuous sync pipeline, creating two sources of truth. The CRM is built as admin views inside the app.

Design Principles

  • Lighthouse gates: performance ≥ 95; accessibility, best practices, and SEO = 100
  • Premium feel — rich, high-end aesthetic matching the brand
  • Edge-first — sub-100ms response times globally via Cloudflare
  • Single developer — tooling must minimise ops overhead
  • ₹0/month at launch — every service on a free tier

Technology Decision Log

Key decisions where alternatives were seriously considered. Expand each to see what was rejected and why.

OpenReport an issue

Was this page helpful?

On this page