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.- Core & UI
- Data & Auth
- Infrastructure
- Email
- Testing & Quality
- Observability
- CRM & Leads
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.
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.Auth → Better Auth (rejected: Clerk, Auth.js)
Auth → Better Auth (rejected: Clerk, Auth.js)
Self-hosted, the Google consent screen shows your domain, and it ships a built-in RBAC plugin. Clerk and Auth.js were rejected on hosting/branding and missing native RBAC.
ORM → Drizzle (rejected: Prisma)
ORM → Drizzle (rejected: Prisma)
Prisma’s query-engine binary can’t run on the Cloudflare Workers V8 isolate without paid Accelerate. Drizzle is pure TypeScript and runs everywhere.
Database → Neon (rejected: Supabase, PlanetScale)
Database → Neon (rejected: Supabase, PlanetScale)
Git-like branching (10 free branches), serverless scale-to-zero, and all scheduled work driven via QStash HTTP routes.
Hosting → Cloudflare Workers (rejected: Vercel)
Hosting → Cloudflare Workers (rejected: Vercel)
Cloudflare Workers via the OpenNext adapter (
@opennextjs/cloudflare) — generous free tier with no bandwidth surprises, plus R2, KV, and Workers all under one roof.Realtime → Ably (rejected: Pusher)
Realtime → Ably (rejected: Pusher)
6M messages/mo free versus Pusher’s 200k/day.
Analytics → PostHog (rejected: Google Analytics)
Analytics → PostHog (rejected: Google Analytics)
DPDP Act concerns with GA. PostHog offers 1M events/mo plus feature flags.
Linting → Biome (rejected: ESLint + Prettier)
Linting → Biome (rejected: ESLint + Prettier)
~100x faster, a single config file, and native TypeScript support.
Related Pages
Architecture
How these technologies fit together as a layered monorepo
Data Model
The 38-table Drizzle schema running on Neon
System Design
High-level and low-level design documents