31 — Product domain surfaces & Beacon

Target hostname map · API on apex · Beacon rebrand · phased cutover · July 2026

CEO Summary

Today most product surfaces share one host (staging.gopastearth.com) with path prefixes (/dashboard, /pos, /admin/signage). The target is a clear product domain structure: dedicated subdomains for operator-facing apps, while all API and shared services stay on the main domain. Digital signage is product-named Beacon (UI: “Beacon Screen”; nav: “Beacon”).

Business value: Cleaner bookmarks for staff and devices, stronger branding per surface, easier CDN/TLS policy per workload, room to grow without path soup. Risk if rushed: Session cookies and CORS break login across hosts — this doc plans that first.

Design principles

  1. One money spine, many windows. Subdomains are presentation shells. Core Invoicing, inventory, tenants, and auth remain one backend.
  2. API lives on the main domain. Browsers and devices call https://gopastearth.com/api/… (and related service paths), not api.pos.gopastearth.com.
  3. Subdomains are surface routers. Each host loads the SPA entry that belongs there and may deep-link into path routes for compatibility.
  4. Cookies span the product family. Session cookie domain = .gopastearth.com so dashboard ↔ POS ↔ KDS share login when appropriate.
  5. Beacon is the product name for signage. Code may keep signage packages for a while; user-facing strings and hostnames use Beacon.

Target domain map

flowchart TB subgraph apex [Main domain — gopastearth.com] MKT[Marketing public site] API["/api · /auth · /customer · /media · /health"] WS["Bridge WebSocket · webhooks"] end subgraph product [Product surface subdomains] DASH[dashboard.gopastearth.com] POS[pos.gopastearth.com] KDS[kds.gopastearth.com] BCN[beacon.gopastearth.com] BC[barcodes.gopastearth.com] MS[memestream.gopastearth.com] end subgraph platform [Platform / ops hosts — keep] STG[staging.gopastearth.com] DOC[dochub.gopastearth.com] GIT[gperep.gopastearth.com] end DASH -->|XHR/fetch cookies| API POS --> API KDS --> API BCN -->|public playlist + assets| API BC -->|public barcode API| API MS -->|JSON feed for web + Qt| API MKT --> API STG -.->|current all-in-one| API
HostnameAudiencePrimary UXToday (path on staging)
gopastearth.com
www.gopastearth.com
Public + all clients Marketing, signup entry, API & shared services public-site + /api on same host
dashboard.gopastearth.com Owners, managers, staff (office) Login, Dashboard, Admin, Catalog, Inventory, Reports, Business Hub, Master Admin, HR, Tickets admin, Beacon config /login · /dashboard · /admin/* · /inventory · /reports · /master-admin
pos.gopastearth.com Cashiers, floor, mobile handheld browsers Modern POS, Mobile POS, register open, kiosk entry (optional) /pos · /pos/* · /pos/kiosk
kds.gopastearth.com Kitchen / expo screens Kitchen Display System only (fullscreen-friendly) /pos/kitchen (and related KDS routes)
beacon.gopastearth.com TVs, lobby players, menu boards Beacon Screen public player (playlist loop) /{tenant}/signage/{displaySlug}
barcodes.gopastearth.com Public web + GPE merchants Barcodes — standalone UPC/EAN/GTIN catalog lookup (same master catalog as POS) /barcode on marketing / staging
memestream.gopastearth.com Public web + Dogecoin Qt client Meme Stream — scrollable Doge/community feed, Doge of the Day, soft likes; on-chain tips phase 2 /memestream on marketing; API /api/public/memestream/*
staging.gopastearth.com Internal QA All-in-one host during migration (compat) Current production-like environment
dochub.gopastearth.com Engineering / product DocHub + OAO Already live
gperep.gopastearth.com Engineering Gitea Already live

Optional later hosts (not required for first cut)

HostUseNotes
shop.gopastearth.com or path on apexTenant storefrontsToday /{slug}/store; may stay path-based on apex or dashboard-linked
app.gopastearth.comAlias → dashboardMarketing “Open app” CTA
bridge.gopastearth.comDocumented WS endpoint onlyPrefer WS under apex /api/bridges/connect unless ops needs split

API & shared services on the main domain

All surface subdomains are API consumers. They do not host Express.

Path on gopastearth.comServiceUsed by
/api/*REST Business OS (POS, invoices, catalog, Beacon admin API, storefront, HR, …)All product SPAs, public storefront, Beacon player playlist
/auth/*Auth helpers (if mounted separately)Login flows
/customer/*Customer portal APICustomer portal SPA / pages
/media/*Static/media (platform catalog images, uploads)POS, admin, Beacon creatives
/healthLivenessLB / ops
/api/bridges/connect (WS)On-prem BridgeBridge clients
/api/webhooks/*Inbound PSP / crypto webhooksExternal providers
/api/signage/* → product docs as Beacon APIFolders, ads, displays, public playlistDashboard admin + Beacon players
Why not api.gopastearth.com first? Path-based API on the apex keeps one TLS name, simpler cookie pairing with marketing signup, and matches current Nginx mental model (/api → backend. A dedicated API host can be added later as a CNAME/alias without rewriting business logic.

Frontend env (target)

# Product SPAs (dashboard / pos / kds / beacon builds)
VITE_API_BASE_URL=https://gopastearth.com
# or relative only if SPA is reverse-proxied with /api on same host (staging all-in-one)

# Cookie / CORS (backend)
COOKIE_DOMAIN=.gopastearth.com
CORS_ORIGIN=https://dashboard.gopastearth.com,https://pos.gopastearth.com,https://kds.gopastearth.com,https://beacon.gopastearth.com,https://gopastearth.com,https://www.gopastearth.com,https://staging.gopastearth.com
SESSION_SAME_SITE=None   # if cross-site; or Lax if always same-site eTLD+1 with Domain=.gopastearth.com
SESSION_SECURE=true

Beacon (was: Signage / nSign-class service)

ContextName
Product / marketingBeacon
Page title / H1Beacon Screen
Dashboard nav labelBeacon (not “Signage & ads”)
Hostnamebeacon.gopastearth.com
Player URL (target)https://beacon.gopastearth.com/{tenantSlug}/{displaySlug}
Player URL (today)https://staging…/{tenantSlug}/signage/{displaySlug}
Admin config (target)https://dashboard.gopastearth.com/admin/beacon (alias of signage routes)
API (stable, code)GET/POST /api/signage/* initially; optional /api/beacon/* facade later

Beacon responsibilities

Deep technical behavior remains in 26 — Signage & Displays until that chapter is fully retitled; this chapter owns naming + host placement.

Surface → route ownership

HostSPA shell servesRedirects / defaults
dashboard /dashboard, /admin/*, /inventory/*, /reports/*, /business-hub, /master-admin/*, /hr/*, tickets admin, login //dashboard (if session) else /login
pos /pos, mobile POS, optional kiosk //pos; staff without register → open-register flow
kds Kitchen display only / → KDS home; no admin chrome
beacon Public player only (minimal chrome) / → help “paste display URL” or device pairing later; /{tenant}/{display} → player
apex Marketing, pricing, signup; reverse-proxy /api CTA “Open dashboard” → dashboard host

Auth & tenant context across hosts

sequenceDiagram participant U as User participant D as dashboard.gopastearth.com participant A as gopastearth.com/api participant P as pos.gopastearth.com U->>D: Login D->>A: POST /api/auth/login A-->>D: Set-Cookie session Domain=.gopastearth.com U->>P: Open POS P->>A: GET /api/... Cookie sent A-->>P: 200 tenant-scoped data

Nginx sketch (target)

# Apex — marketing + API
server {
  server_name gopastearth.com www.gopastearth.com;
  location /api/   { proxy_pass http://127.0.0.1:4000; ... }
  location /auth/  { proxy_pass http://127.0.0.1:4000; ... }
  location /media/ { proxy_pass http://127.0.0.1:4000; ... }
  location /health { proxy_pass http://127.0.0.1:4000; }
  location /       { proxy_pass http://public_site_or_static; }
}

# Product shells — same frontend build or surface-specific builds
server {
  server_name dashboard.gopastearth.com pos.gopastearth.com
              kds.gopastearth.com beacon.gopastearth.com;
  # SPA fallback
  location / { proxy_pass http://127.0.0.1:5173; /* or static dist */ }
  # Optional: do NOT proxy /api here — force clients to apex (clear separation)
}

# Compat during migration
server {
  server_name staging.gopastearth.com;
  # Keep today's path-based all-in-one until cutover complete
}

TLS: wildcard *.gopastearth.com + apex, or individual certs via Certbot. Prefer wildcard for product subdomains.

DNS: A/AAAA for apex + each host (or CNAME to load balancer) → current edge IP.

Build / deploy strategy

OptionDescriptionWhen
A. Single SPA + host-based entry One frontend build; on boot read window.location.hostname and route to dashboard / pos / kds / beacon shell Recommended first — lowest fork cost
B. Multi-entry Vite builds dashboard.html, pos.html, kds.html, beacon.html smaller bundles After traffic justifies split
C. Separate repos Not recommended — shared components and auth would diverge Avoid

Host-based entry (Option A) — logic sketch

const host = window.location.hostname;
if (host.startsWith('pos.'))     defaultRoute = '/pos';
if (host.startsWith('kds.'))     defaultRoute = '/pos/kitchen'; // confirm actual path
if (host.startsWith('beacon.'))  defaultRoute = beaconPlayerFromPath();
if (host.startsWith('dashboard.') || host === 'app.') defaultRoute = '/dashboard';
// API base always https://gopastearth.com (prod) or staging for QA

Phased delivery plan

Phase 0 — Document & decide (this chapter)

Phase 1 — DNS + TLS + Nginx skeletons

Phase 2 — Auth hardens for multi-host

Phase 3 — Surface defaults + Beacon rebrand (UI)

Phase 4 — Storefront & public on apex

Phase 5 — Deprecate path-only mental model on staging

Cutover checklist

ItemOwnerDone when
DNS A/CNAME for four product hostsOpsdig resolves
TLS cert covers hostsOpsHTTPS green
Nginx vhosts liveOpsSPA loads per host
Session cookie DomainBackendCross-subdomain login works
CORS listBackendNo browser CORS errors with credentials
API base URL configFrontendNetwork tab shows apex API
Beacon labels + URLsFrontendAdmin shows beacon. host
KDS bookmark testQAKitchen screen cold-boot works
POS register openQAPIN flow on pos. host
DocHub / OAO updatedDocsThis chapter + DocHub 13/31

Non-goals (for this initiative)

DocRole
01 — InfrastructureNginx, PM2, TLS ops
14 — FrontendSPA structure
26 — SignageBeacon technical behavior (pre-rename detail)
30 — Full-stack architectureDeploy diagrams
09 — KDSKitchen surface behavior
19 — StorefrontPublic shop paths
DocHub 13-git-and-domains.htmlLive DNS hosts + this plan summary
DocHub 31-product-domains.htmlOrientation map for the same plan

Glossary snippet

TermMeaning
SurfaceA branded hostname + SPA entry focused on one job (POS, KDS, …)
Apex / main domaingopastearth.com — marketing + API/services
BeaconProduct name for digital display / menu-board system
Beacon ScreenFull product name on admin/player pages
Signage (legacy)Code paths and chapter 26 title; synonymous with Beacon until rename completes