Domain Registry Testing Guide

Documentation for Testing

Domain Registry — Internal Testing Guide

Feature: Subdomain Registry, Custom Domain Verification, Space-Branded Routing Sessions: S234.4, S235.1 Branch: session-234-235


Prerequisites

  1. Backend running: yarn serve:backend (port 3000)
  2. Frontend running: yarn serve:space (port 6200)
  3. MongoDB running locally (or connected to dev environment)
  4. A space with at least 2 universes created

Test 1: Subdomain Availability Check (Launch Dashboard)

Navigate to: http://localhost:6200/space/{your-space-slug}/launch-station/dashboard

Steps

  1. Select a universe from the carousel
  2. Find the subdomain input field (has .gograb.space suffix)
  3. Type a subdomain name (e.g., my-test-site)
  4. Wait ~500ms for the debounced check

Expected

Input Result
my-test-site (unclaimed) Green "Available" indicator appears
api Red "Taken" indicator (reserved name)
admin Red "Taken" indicator (reserved name)
app Red "Taken" indicator (reserved name)
Any already-deployed subdomain Red "Taken" + suggestion chips appear below
MY-SITE (uppercase) Input should be rejected by format validation
a (too short) No check triggered (min 3 chars)

What to verify


Test 2: "Use My Own Domain" Toggle (Launch Dashboard)

Same page: Launch Dashboard

Steps

  1. Find the "I'll use my own domain" checkbox toggle
  2. Enable it

Expected

  1. Disable the toggle

Expected


Test 3: Subdomain Preview During Universe Creation

Navigate to: http://localhost:6200/space/{your-space-slug}/universe/create

Steps

  1. Start the universe creation wizard
  2. In Step 1 (Basic Info), type a universe name (e.g., "My Portal")
  3. Observe the area below the name input

Expected

Important

This check is informational only — it does NOT block universe creation. The subdomain is claimed at deploy time.


Test 4: Space Info — Deployment Mode & Active Subdomains

Navigate to: http://localhost:6200/space/{your-space-slug}/dashboard

Steps

  1. Look at the Space Info panel (usually sidebar or top section)
  2. Check for deployment mode and subdomains section

Expected


Test 5: Universe Settings — View & Edit Subdomain

Navigate to: Universe Hub for any deployed universe, then open Settings

Steps

  1. Open a universe's settings modal (gear icon or "Settings" button)
  2. Look for the "Deployed At" section

Expected (View Mode)

Steps (Edit Mode)

  1. Click "Change Subdomain"
  2. An input field appears with .gograb.space suffix
  3. Type a new subdomain
  4. Click "Save Subdomain"

Expected


Test 6: Deployment Modal — Correct URL Display

Trigger: Deploy a universe via the Launch Dashboard

Steps

  1. Go to Launch Dashboard
  2. Select a universe, enter a subdomain, click Deploy
  3. Wait for deployment to complete
  4. The success modal appears

Expected (Standard Deploy)

Expected (Custom Domain Deploy)


Test 7: Dashboard Universe Cards — Deployed URLs

Navigate to: http://localhost:6200/space/{your-space-slug}/dashboard

Steps

  1. Look at the universe cards grid

Expected


Test 8: Deployment History — Subdomain & Domain Display

Navigate to: http://localhost:6200/space/{your-space-slug}/launch-station/history

Steps

  1. View the deployment history list
  2. Check each deployment card

Expected


Test 9: Reserved Subdomain Protection

Via API or Launch Dashboard

Steps

Test that ALL of these subdomains are blocked:

Category Names
Platform infra api, ai-api, docs-api, vitto-api, app, admin, dev, ai, docs, pulse, space-admin, vitto-updater
Common names www, mail, ftp, ssh, ns1, ns2, staging, preview, test, demo, dashboard, console, portal, login, status, health, cdn, assets, static

Via API (quick check)

curl "http://localhost:3000/api/deployed-subdomains/check?subdomain=api"
# Expected: {"available":false}

curl "http://localhost:3000/api/deployed-subdomains/check?subdomain=my-unique-name-12345"
# Expected: {"available":true}

Via UI

Type any reserved name in the Launch Dashboard subdomain input — should show "Taken".


Test 10: Subdomain Suggestions

Via API or Launch Dashboard

Via API

curl "http://localhost:3000/api/deployed-subdomains/suggest?spaceSlug=my-space&universeSlug=portal"
# Expected: {"suggestions":["portal","portal-my-space","my-space","my-portal","portal-app","portal-xxxx"],"requested":"portal"}

Via UI

  1. In Launch Dashboard, enter a taken subdomain
  2. Suggestion chips should appear below the input
  3. Click a suggestion — it should populate the input and re-check availability

Test 11: Custom Domain Verification Flow

Via API (DNS verification requires actual domain ownership)

Step 1: Initiate verification

curl -X POST "http://localhost:3000/api/deployed-subdomains/universe/{universeId}/verify-domain/initiate" \
  -H "Content-Type: application/json" \
  -d '{"customDomain": "app.example.com"}'

Expected response:

{
  "txtRecordName": "_gograb-verify.app.example.com",
  "txtRecordValue": "gograb-verify=abc123...",
  "instructions": "Add a TXT record to your DNS:..."
}

Step 2: Check status

curl "http://localhost:3000/api/deployed-subdomains/universe/{universeId}/verify-domain/status"

Expected: Shows verification state (pending, with TXT record details).

Step 3: Attempt verification

curl -X POST "http://localhost:3000/api/deployed-subdomains/universe/{universeId}/verify-domain/check"

Expected (without actual DNS record): {"verified": false, "error": "DNS lookup failed: ENOTFOUND..."}


Test 12: Collision Prevention (Critical)

Test A: Same subdomain, different universes

  1. Deploy Universe A with subdomain test-collision
  2. Try to deploy Universe B with the same subdomain test-collision

Expected: Universe B's deployment fails with ConflictException: Subdomain "test-collision.gograb.space" is not available (taken)

Test B: Idempotent re-deploy

  1. Deploy Universe A with subdomain test-idem
  2. Re-deploy Universe A with the same subdomain test-idem

Expected: Succeeds — same universe re-claiming its own subdomain is idempotent.

Test C: Release on undeploy

  1. Deploy Universe A with subdomain test-release
  2. Undeploy Universe A
  3. Check availability of test-release

Expected: Available again.

  1. Deploy Universe B with subdomain test-release

Expected: Succeeds — released subdomains can be re-claimed.


Test 13: E2E Automated Tests

Run the automated test suite:

cd tests/platform-creation-e2e
npx jest src/tests/api/domain-registry.spec.ts --verbose

Expected: 35+ tests pass across 9 test suites:


API Quick Reference

All endpoints are at http://localhost:3000/api/deployed-subdomains/...

Method Path Auth Purpose
GET /check?subdomain=X&environment=production No Check availability
GET /suggest?spaceSlug=X&universeSlug=Y No Get suggestions
GET /space/:spaceId No List space subdomains
GET /universe/:universeId No Get universe subdomain
GET /space-routes/:spaceSlug No Get CF Worker routing table
PATCH /universe/:universeId Yes Update subdomain/domain
POST /universe/:id/verify-domain/initiate Yes Start verification
POST /universe/:id/verify-domain/check Yes Check DNS record
GET /universe/:id/verify-domain/status No Get verification status

Known Limitations

  1. Custom domain verification requires actual DNS access — can only be fully tested with a real domain
  2. Space-branded path routing (CF Worker) is coded but not deployed — requires KV namespace setup on Cloudflare
  3. Deployment History currently uses mock data for display — real history comes from the backend deployments collection
  4. Subdomain suggestions include a random 4-char suffix as a last resort — results vary per call