White-Label Setup Guide
Deploy a fully branded instance of Cronozen under your own domain. White-label partners get their own domain, branding, landing pages, and isolated data — all powered by the Cronozen platform.Architecture Overview
cronozen.com. The CloudFlare Worker handles domain rewriting, SEO meta tag substitution, and GA4 tracking ID replacement. Authentication flows through Central Auth (auth.cronozen.com) with brand-specific redirect URIs.
Prerequisites
Before starting, ensure you have:- CloudFlare account access (API token with DNS + Workers permissions)
- AWS CLI configured (for database access via Lambda)
- Access to the
thearound-opsrepository - The partner’s domain registered and DNS pointed to CloudFlare
Phase 1: Database Setup
1.1 Create White-Label Agreement
Register the partner in thewhitelabel_agreements table. This can be done via the Admin API or a provisioning script.
Via Admin API:
whitelabel_agreementsrecord (partner contract)centersrecord (tenant)center_tenant_mapping(cross-service linking)unified_actors(admin account)center_memberships(admin membership)
1.2 Configure Features & Branding
Update the white-label agreement with branding and feature flags:Set
public_signup_enabled: false initially. Enable only after testing the full auth flow.Phase 2: Application Configuration
Three config files must be updated in thethearound-ops repository.
2.1 Domain Registry
File:config/domains.config.ts
2.2 Proxy Constants
File:src/lib/proxy/constants.ts
Add three entries:
2.3 Auth Client Registration
File:config/auth-clients.config.ts
Set
usesCookieSharing: false for white-label domains. This ensures cookies are scoped to the brand domain only, preventing cross-domain leakage.Phase 3: CloudFlare Setup
3.1 DNS Configuration
Add the custom domain zone to CloudFlare, then create DNS records:3.2 CloudFlare Worker
Create a Worker that proxies requests frombrand.co.kr to cronozen.com:
Key Worker responsibilities:
- Root path (
/) rewrite to/{brand-slug}landing page - Auth paths (
/auth,/login) rewrite to/{brand-slug}/login - Static files (
/sitemap.xml,/robots.txt) served directly - HTMLRewriter transformations:
- GA4 tracking ID replacement (cronozen ID -> brand ID)
- OG/Twitter meta tag domain substitution
- Canonical link rewrite
- Remove
noindexmeta tags (enable SEO for brand domain)
- CSP header rewrite (preserve
auth.cronozen.com, replace other cronozen refs)
3.3 Legacy Domain Redirects (Optional)
If the partner has an old domain that should redirect to the new canonical domain:Phase 4: Testing
Authentication Flow
Verification Checklist
Phase 5: SEO Configuration
Philosophy
- Platform SEO =
cronozen.com(platform features, pricing) - Brand SEO =
brand.co.kr(customer-facing, indexed by Google) - Internal paths (
cronozen.com/brand-slug) arenoindexto prevent duplicate content
Canonical URLs
The CloudFlare Worker rewrites canonical links:Sitemap
Each brand domain serves its ownsitemap.xml via the CloudFlare Worker, containing only the public pages relevant to that brand.
White-Label API
GET /api/whitelabel//config
Retrieve partner branding and feature configuration at runtime.Data Model
Cross-Service Integration
White-label tenants can optionally enable CMS (blog) and LMS (learning) services:
Enable via
center_tenant_mapping: