Documentation

Source-of-truth docs, references, plans, and product material across Harbor surfaces.

Commercial And Brand

Public Sites Refactor Notes

This pass refactored the static/browser-facing apps around clearer entrypoints and feature ownership without changing the generated site behavior:

commercial and brandpublicsitesrefactornotes
Source: public-sites-refactor-notes.md

Public Sites Refactor Notes

Scope

This pass refactored the static/browser-facing apps around clearer entrypoints and feature ownership without changing the generated site behavior:

  • apps/cloud-admin
  • apps/docs-site
  • apps/website

What Moved Where

Cloud Admin

- main.ts - supportConsole.ts - theme.ts - api.ts - dom.ts - state.ts - types.ts - config.ts

- buildSite.ts - renderLayout.ts - renderBody.ts

  • src/admin-client.ts is now a thin bootstrap.
  • src/admin/ owns the browser runtime:
  • src/site/ owns the static site builder:
  • src/shared/themeTypography.ts holds shared font metadata.

Docs Site

- buildDocsSite.ts - config.ts - types.ts - utils.ts - metadata.ts - markdown.ts - render.ts

  • src/site.ts is now a thin bootstrap/export surface.
  • src/site/ owns the docs build flow:
  • Docs now use env-backed public site links instead of workspace-relative cross-app links, which fixes broken localhost navigation between Docs and Website.

Website

- main.ts - pages.ts - api.ts - dom.ts - validation.ts - types.ts - config.ts

- buildSite.ts - layout.ts - marketingPages.ts - accountPages.ts - pages.ts - types.ts - config.ts

  • src/account-client.ts is now a thin bootstrap.
  • src/account/ owns account-portal browser behavior:
  • src/build-site.ts is now a thin bootstrap.
  • src/site/ owns the static marketing/account site builder:
  • src/site-client.ts owns lightweight public-page behavior such as the Contact Us form submit flow.
  • Public docs/install destinations are now externalized through HARBOR_WEBSITE_DOCS_URL and HARBOR_WEBSITE_INSTALL_URL, and the website no longer generates internal /docs/ or /install/ marketing pages.
  • Website marketing now includes first-class /about/ and /contact/ pages, and contact submissions are stored in cloud data for admin review.

Shared chrome additions

- Harbor-style sticky top header - a horizontal tab row under the header - a shared two-column sitemap footer

- About - Contact - Gitea Repo - Docs - Website - Hub

- HARBOR_PUBLIC_WEBSITE_URL - HARBOR_PUBLIC_DOCS_URL - HARBOR_PUBLIC_HUB_URL - HARBOR_PUBLIC_REPO_URL - HARBOR_CONTACT_EMAIL - HARBOR_CONTACT_SEND_EMAIL

  • Website, Docs, and Cloud Admin now share the same broad shell direction:
  • The left sitemap column is app-specific.
  • The right sitemap column is shared corporate navigation linking to:
  • Shared public link config now comes from env-backed build-time values:

Intentional Deviations

  • The website page factory layer is split into marketingPages.ts and accountPages.ts instead of one giant pages.ts. This keeps the account portal and public marketing content easy to navigate without fragmenting the builder into tiny files.
  • The website account runtime stayed framework-free and DOM-driven to preserve the current implementation style.

Technical Debt Left Behind

  • apps/cloud-admin/src/admin/supportConsole.ts is still the largest remaining module in this set and could be split by screen/feature later.
  • apps/docs-site/src/site/render.ts still combines layout styling and doc-page rendering. It is much better than the previous monolith, but it remains the most likely future extraction point.
  • apps/website/src/site/layout.ts still owns a large inline CSS block. If the public site grows meaningfully, that CSS should move to a dedicated shared asset or typed style helper.

Suggested Next Targets

  1. Refactor apps/cloud-api if the route/controller surface has started accumulating multiple product concerns.
  2. Review apps/harbor-node-api for the same kind of domain-controller extraction that worked well in NodeUI.
  3. Decide whether the static-site apps should eventually share a small internal helper package for theme/bootstrap loading and common layout utilities.