Open-Source Wikis

/

Supabase

/

Packages

/

marketing

supabase/supabase

marketing

Framework-agnostic building blocks for marketing pages. Drives the /go/* campaign system in apps/www.

Purpose

Keep the rendering of campaign pages (lead-gen, thank-you, legal) decoupled from the host framework so the same page schemas can be reused or moved between apps. Also wraps the CRM clients used by lead-gen forms.

Directory layout

packages/marketing/
└── src/
    ├── go/        # Schemas, section components, templates, form server action
    └── crm/       # CRM client abstraction (HubSpot + Customer.io)

How it works

/go/* core

src/go/ contains:

  • Schemas — Zod schemas for each section type and for full pages.
  • Section components — React renderers for hero, feature-grid, metrics, social-proof, etc.
  • Templates — top-level layouts: lead-gen, thank-you, legal.
  • Form server action — server-side handler that submits leads to CRM systems.

A SectionRenderer dispatches each section in a page array to the matching component based on its type field. Sections this package doesn't know about (e.g. www-specific tweet embeds) are handled via custom renderers registered in apps/www/components/Go/GoPageRenderer.tsx.

CRM

src/crm/ provides a single submission interface that fans out to:

  • HubSpot (forms / contacts API).
  • Customer.io (event ingestion).

Lead-gen forms call through this layer so the host app never touches a CRM SDK directly.

Integration with apps/www

graph LR
    Page[apps/www/_go/<page>.tsx]
    Index[apps/www/_go/index.tsx]
    Route[apps/www/app/go/[slug]/page.tsx]
    Renderer[apps/www/components/Go/GoPageRenderer.tsx]
    Marketing[packages/marketing/src/go]
    CRM[packages/marketing/src/crm]

    Page -->|register| Index
    Route -->|lookup by slug| Index
    Route --> Renderer
    Renderer -->|SectionRenderer + templates| Marketing
    Marketing -->|form server action| CRM

Adding a new page

(Per apps/www/README.md):

  1. Add apps/www/_go/<category>/<slug>.tsx exporting a typed page object.
  2. Register the page in apps/www/_go/index.tsx.
  3. The route /go/<slug> is statically generated automatically.

Adding a new section type

  1. Define the schema and component under packages/marketing/src/go/.
  2. Register it in the SectionRenderer dispatch.
  3. If the renderer needs apps/www context (e.g. tweet data, base path), register it as a custom renderer in GoPageRenderer.tsx.

Integration points

  • Consumed by apps/www.
  • Calls CRM systems via src/crm/ (HubSpot, Customer.io).

Entry points for modification

  • New section component → packages/marketing/src/go/sections/<section>.tsx + schema entry.
  • New template → packages/marketing/src/go/templates/<template>.tsx.
  • New CRM destination → add a client under src/crm/ and wire it into the form action.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

marketing – Supabase wiki | Factory