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

Pages & Routes

Complete map of all 104 pages and API routes in the Royal Glow platform.

Pages & Routes

The platform spans two Next.js apps: the customer site @rgss/web (theroyalglow.in) and the admin portal @rgss/admin (admin.theroyalglow.in). Together they cover ~104 pages plus the API layer.

The customer site uses Next.js App Router route groups (folders in parentheses) to share a layout without affecting the URL. The admin portal is a separate app served from admin.theroyalglow.in at root paths — the subdomain provides the admin namespace, so there is no /admin prefix. Legacy theroyalglow.in/admin/* paths 301-redirect to the subdomain. Staff self-service lives at /me/* within the admin app. Admin routes are RBAC-gated; everything else is public or customer-authenticated.

Route Groups (@rgss/webtheroyalglow.in)

GroupURL PatternLayoutAuth
(customer)/, /services, /bookings, etc.Header + footer + navOptional
(auth)/sign-in, /onboardingMinimal centered card
(landing)/bookNo nav — conversion-optimised
(legal)/privacy, /terms, /refund-policyMinimal

The admin portal (@rgss/admin, admin.theroyalglow.in) is a standalone app: admin pages at root paths under a sidebar + RBAC layout (receptionist+), and staff self-service pages at /me/* (staff+).

Page & API Map

Select an area of the platform.

Public (No Auth Required)

RoutePageRenderingNotes
/HomepageSSRHero, services overview, reviews, booking CTA
/servicesServicesSSRSalon/SPA toggle, category filter, service cards
/services/[slug]Service DetailSSG + ISRIndividual service with booking CTA
/aboutAboutSSGStory, team gallery
/contactContactSSGMap, phone, email, contact form
/faqFAQSSGFAQPage JSON-LD, accordion
/galleryGallerySSRPhoto grid from Payload CMS
/offersOffersSSRActive offers and combos
/blogBlogSSR + ISRPosts from Payload CMS
/blog/[slug]Blog PostSSG + ISRIndividual post with BlogPosting JSON-LD
/offlineOfflineStaticPWA offline fallback page

Authenticated (Customer)

RoutePageNotes
/bookingsMy BookingsUpcoming + past, cancel/reschedule
/bookings/[id]Booking DetailStatus timeline, services, invoice link
/membershipMy MembershipTier, hours remaining, session history
/gemsGemsBalance, transaction history, catalogue
/favoritesFavouritesSaved favourite services
/notificationsNotificationsNotification list, mark read
/profileProfileEditable fields, notification preferences

Auth Pages

RoutePageNotes
/sign-inSign InGoogle OAuth button
/onboardingOnboardingFirst-time profile setup (name, phone, DOB, gender, consents)
RoutePageNotes
/bookLead CaptureMeta/Instagram ad landing page — 3-field form, no nav
/privacyPrivacy PolicyDPDP Act 2023
/termsTerms of Service
/refund-policyRefund & Cancellation Policy

All admin routes are served from admin.theroyalglow.in at root paths (no /admin prefix) and require authentication with minimum role receptionist. The paths below are relative to admin.theroyalglow.in.

RouteMin. RolePage
/ReceptionistDashboard — today's bookings, revenue, pending actions
/bookingsReceptionistBooking list with filters
/bookings/[id]ReceptionistBooking detail — approve/reject/assign/complete
/bookings/newReceptionistWalk-in booking creation
/customersReceptionistCustomer list — search, filter, sort by LTV
/customers/[id]ReceptionistCustomer profile — history, notes, tags
/leadsReceptionistLead pipeline — kanban view
/leads/[id]ReceptionistLead detail — notes, UTM, WhatsApp link
/membershipsReceptionistMembership list
/memberships/[id]ReceptionistMembership detail — session recording
/memberships/newReceptionistCreate new membership
/billingReceptionistInvoice list and detail
/billing/[id]ReceptionistInvoice detail
/leaveReceptionistLeave request queue — approve/reject
/waitlistReceptionistWaitlist management
/servicesManagerService catalog management
/offersManagerOffer creation and management
/staffManagerStaff list and profiles
/scheduleManagerWeekly staff availability grid
/reportsManagerRevenue, bookings, staff performance
/settingsManagerSystem settings
/branchesOwnerBranch management
/usersOwnerUser management and role assignment
/integrationsDeveloperIntegration configuration
/logsDeveloperAudit logs

Staff self-service pages live at /me/* within the admin app (admin.theroyalglow.in).

RouteMin. RolePage
/me/scheduleStaffOwn weekly schedule
/me/leaveStaffSubmit and view own leave requests

Customer API routes (below) are served from theroyalglow.in/api/* by @rgss/web. Admin API routes are served from admin.theroyalglow.in/api/* by @rgss/admin — there is no /api/admin/ segment.

Public (No Auth) — theroyalglow.in

EndpointMethodDescription
/api/servicesGETAll categories + services (KV cached, 5-min TTL)
/api/services/[slug]GETSingle service detail
/api/availabilityGETAvailable slots for date + service
/api/leadsPOSTCampaign lead capture from /book form
/api/healthGETSystem health check

Authenticated (Customer) — theroyalglow.in

EndpointMethodDescription
/api/bookingsGET, POSTList bookings / create booking
/api/bookings/[id]GETBooking detail
/api/bookings/[id]/cancelPOSTCancel booking
/api/bookings/[id]/reschedulePOSTReschedule booking
/api/membershipGETCustomer's active membership
/api/gemsGETGems balance + catalogue
/api/gems/redeemPOSTRedeem gems against a catalogue service
/api/offersGETActive offers for the customer
/api/contactPOSTContact form submission
/api/notificationsGET, PATCHNotifications list + mark read
/api/profile/preferencesPATCHUpdate notification preferences
/api/push/subscribePOSTRegister push subscription
/api/push/subscribeDELETERemove push subscription
/api/ably/tokenPOSTScoped Ably JWT (Token Auth)
/api/onboarding/completePOSTSave onboarding data
/api/revalidatePOSTOn-demand ISR revalidation

Admin (Role-Gated) — admin.theroyalglow.in

Served from admin.theroyalglow.in/api/*. There is no /api/admin/ segment — the subdomain is the namespace. Paths below are relative to admin.theroyalglow.in.

EndpointMethodMin. RoleDescription
/api/bookingsGET, POSTReceptionistList / create booking
/api/bookings/newPOSTReceptionistWalk-in booking creation
/api/bookings/[id]PATCHReceptionistApprove, reject, assign staff
/api/bookings/[id]/completePOSTReceptionistMark completed + invoice + gems
/api/bookings/[id]/noshowPOSTReceptionistMark no-show
/api/customersGETReceptionistCustomer list with search/filter
/api/customers/[id]GETReceptionistCustomer detail
/api/customers/[id]/notesPOSTReceptionistAdd CRM note
/api/customers/[id]/tagsPOSTReceptionistAdd tag
/api/customers/[id]/tags/[tagId]DELETEReceptionistRemove tag
/api/leadsGET, POSTReceptionistLead list / create manual lead
/api/leads/[id]PATCHReceptionistUpdate lead status
/api/leads/[id]/notesPOSTReceptionistAdd lead note
/api/billingGETReceptionistInvoice list
/api/billing/[id]GETReceptionistInvoice detail
/api/membershipsGET, POSTReceptionistList / create membership
/api/memberships/[id]GETReceptionistMembership detail
/api/memberships/[id]/sessionsPOSTReceptionistRecord session
/api/memberships/[id]/cancelPOSTManagerCancel membership
/api/membership-tiersGETReceptionistSPA membership tiers
/api/leaveGET, POSTReceptionistLeave queue / submit leave
/api/leave/[id]PATCHReceptionistApprove / reject leave
/api/me/leaveGET, POSTStaffOwn leave list / submit
/api/me/leave/[id]PATCHStaffUpdate own leave
/api/me/scheduleGETStaffOwn schedule
/api/scheduleGETReceptionistStaff schedule for date
/api/waitlistGET, POSTReceptionistWaitlist list / add
/api/waitlist/[id]PATCH, DELETEReceptionistUpdate / remove waitlist entry
/api/tagsGETReceptionistAvailable CRM tags
/api/notificationsGET, PATCHReceptionistNotifications list + mark read
/api/offersGET, POSTManagerList / create offer
/api/offers/[id]PATCH, DELETEManagerUpdate / delete offer
/api/servicesGET, POSTManagerService list / create
/api/services/allGETManagerAll services (incl. inactive)
/api/services/[id]PATCH, DELETEManagerUpdate / delete service
/api/service-categoriesGET, POSTManagerCategory list / create
/api/service-categories/[id]PATCH, DELETEManagerUpdate / delete category
/api/staffGET, POSTManagerStaff list / create
/api/staff/allGETManagerAll staff
/api/staff/[id]GET, PATCHManagerStaff detail / update
/api/staff/[id]/servicesGET, PATCHManagerStaff service assignments
/api/reportsGETManagerReports data
/api/branchesGETManagerBranch list
/api/branches/[id]PATCHOwnerUpdate branch
/api/settingsGET, PATCHManagerSystem settings
/api/usersGETOwnerUser list / role management
/api/integrationsGETDeveloperIntegration configuration
/api/logsGETDeveloperAudit logs
/api/healthGETAdmin health check
/api/ably/tokenPOSTReceptionistScoped Ably JWT (Token Auth)

QStash signature required. Hosted in @rgss/admin and served from admin.theroyalglow.in/api/jobs/*. 19 jobs total: 14 QStash scheduled + 4 QStash triggered + 1 GitHub Actions cron.

Scheduled (14 — QStash)

EndpointDescription
/api/jobs/appointment-reminders24h + 1h push + email reminders
/api/jobs/membership-expiry30d/7d/1d expiry alerts
/api/jobs/birthday-emailsBirthday offer emails
/api/jobs/membership-usage-nudgesUsage nudge emails
/api/jobs/lead-followupsStale lead alerts
/api/jobs/daily-sales-reportDaily report
/api/jobs/weekly-reportWeekly summary
/api/jobs/gems-expiry-reminder7-day gems expiry push
/api/jobs/nightly-sales-summaryNightly sales rollup
/api/jobs/membership-auto-expireHard-expire lapsed memberships
/api/jobs/offer-auto-expireExpire ended offers
/api/jobs/gems-auto-expireExpire gems past 365 days
/api/jobs/session-cleanupPurge stale auth sessions
/api/jobs/monthly-gst-summaryMonthly GST summary

Triggered (4 — QStash, event-driven with delay)

EndpointTriggerDescription
/api/jobs/post-service-followup+24h after completionReview request
/api/jobs/stale-booking-alert+2h after pendingStale pending booking alert
/api/jobs/noshow-check+15min after end timeNo-show check
/api/jobs/membership-expired-notice+1h after expiryExpired notice

GitHub Actions cron (1)

pprd DB sync — resets the pprd Neon branch from prod and strips PII. Runs in GitHub Actions, not as an HTTP route.

An internal /api/jobs/invoice-pdf route also exists: it hands invoice rendering to the @rgss/invoicing Cloud Run PDF service. It is a support route, not one of the 19 scheduled/triggered business jobs.

RouteDescription
/api/auth/[...all]Better Auth catch-all (login, callback, session, sign-out)
/llms.txtAI agent discovery file
/llms-full.txtDetailed AI agent file with full service list
/sitemap.xmlAuto-generated by Next.js
/robots.txtAuto-generated by Next.js
/manifest.jsonPWA manifest
/sw.jsService worker (PWA offline support)
OpenReport an issue

Was this page helpful?

On this page