Skip to content

Web codebase split — apps/web → apps/web-snow + apps/web-summaryto

Status: Deferred to Phase 4 of the summary.to execution plan.

Trigger to execute: summary.to needs an independent release cadence — i.e. when shipping a summary.to change is blocked, slowed, or risk-coupled to SNOW releases (or vice versa). Until then, the single apps/web codebase with host-routed sub-apps is sufficient.

SurfaceBrandServiceCodebase
platform.snowmed.health, app.snowmed.io, snowmed.healthsnowmedsnow_webapps/web
summarisenow.snowmed.healthsummarisenowsnow_webapps/web
*.summary.to, summary.to/Dr.Xsummary_tosnow_webapps/web

SNOW is the engine (internal), not a customer-facing brand. The B2B brand is snowmed.

All three brands deploy out of one Vercel project. Host-routing branches at the React root into per-brand subtrees.

SurfaceBrandNew serviceNew codebase
platform.snowmed.health, app.snowmed.io, snowmed.health, summarisenow.snowmed.healthsnowmed, summarisenowsnow_webapps/web-snow
*.summary.tosummary_tosummaryto_webapps/web-summaryto

Two Vercel projects. Independent CI, bundles, cache, CSP/headers.

Reason to do it nowCounter
Cleaner brand isolationAlready achieved via host-routed subtrees
Smaller bundlesNot yet a measured problem
Independent deploysNot yet a release-cadence conflict
Easier carve-out for entity splitCarve-out optionality preserved via brand-tagged P&L; physical split not required yet
Reason to deferCost if done now
Duplicate auth wiring~1 week eng
Shared component package neededRefactor apps/web/src/componentspackages/ui-core; ~1 week
×2 CI/CD pipelinesOngoing maintenance + slower local DX
×2 Vercel cache, ×2 cold-start budgetCost + perf surface area

Pre-work (do now, while still one codebase)

Section titled “Pre-work (do now, while still one codebase)”

To make the future split a near-mechanical lift:

  • Branch on host at React root: <SnowApp /> / <SumNowApp /> / <SummaryToApp /> subtrees with their own routers and layouts.
  • Move shared primitives (forms, file upload, auth hooks, theme) to packages/ui-core even within the monorepo — no ../../web/src imports across subtrees.
  • Brand-tag every emitted event (brand axis, distinct from service axis). See brand-vs-service taxonomy.
  • Independent visual systems per brand: no shared CSS variables or design tokens leaking across subtrees.
  • Per-brand environment-variable convention: VITE_SNOW_*, VITE_SUMNOW_*, VITE_SUMMARYTO_*.
  1. Create apps/web-summaryto from the <SummaryToApp /> subtree. Pull only the imports it actually uses.
  2. Lift shared deps into packages/ui-core if not already.
  3. New Vercel project snow-web-summaryto; bind summary.to apex + all *.summary.to subdomains.
  4. Rename existing Vercel project’s domain bindings to drop *.summary.to.
  5. Update API CORS allowlist to source-of-truth (no per-codebase config).
  6. Cut over via DNS — both projects can serve in parallel for a soak period.
  7. Drop the <SummaryToApp /> branch from apps/web once traffic confirms.
  • summary.to and *.summary.to resolve to apps/web-summaryto Vercel project
  • apps/web no longer contains summary.to-specific code paths
  • CI builds both projects independently
  • No regression in auth, upload, or share flows on either brand
  • One full release cycle each ships independently without coordination
  • Brand vs service taxonomy
  • summary.to execution plan — Phase 4
  • External presentation policy (house-of-brands)