Collect the inputs the template needs
Use a server-side key from the Quickstart. Retrieve the Brand profile for a verified domain, then add sources as needed:
A screenshot is reference material, not a code export. Handle optional calls independently and record their status. A failed screenshot should not discard a usable Brand profile or prevent a neutral preview.
Keep the source bundle on the server with its domain, retrieval time, and version. Return only the assets and tokens needed by the preview.
Map observations into semantic roles
Do not copy every color into your component system.brand.colors[] distinguishes colors observed on the site from colors sampled from a logo. Choose roles that make sense for the new page, then review the result.
The following adapter accepts a reviewed accent and preserves explicit editor choices. Its helper chooses black or white text by contrast against the accent.
site-theme.ts
Generate bounded page content
Ask a model for data your components can render, or let the editor fill it directly:Example page content
Render an editable preview
This React component uses the theme returned above and validated content. Keep the editor’s fields outside the preview so edits update the typed model, not arbitrary HTML.LandingPage.tsx
landing-page.css
Review and publish a version
Render the same template with two brand bundles and with no brand data. Check narrow and wide screens, keyboard focus, long content, blocked images, and unavailable fonts. Test the final page’s text and control contrast; a readable button alone does not validate the entire page. Save the content, approved assets, theme, and source-bundle version as one preview revision. Make publishing an explicit application action that selects that revision. A later source refresh should open a new draft without changing the live site or discarding manual edits.Extract a design system
Gather observed styles and understand their limits.
Theme an onboarding flow
Apply editable branding to a new customer’s workspace.