supabase/supabase
www
The marketing site at supabase.com. Next.js (mostly Pages Router with App Router for the /go/* flow), Tailwind, MDX content for blog posts, customer stories, and events.
Purpose
The product's public face. Landing pages, pricing, blog (_blog/), customer stories (_customers/), events (_events/), changelog, and the campaign-page system at /go/*.
Directory layout
apps/www/
├── pages/ # Pages Router routes
├── app/ # App Router routes (incl. /go/[slug]/page.tsx)
├── components/ # ~43 sub-folders for marketing components
├── _blog/ # MDX blog posts
├── _customers/ # MDX customer stories
├── _events/ # MDX events
├── _go/ # Typed campaign-page definitions (see below)
├── _alternatives/ # "vs Firebase" / "vs Heroku" landing copy
├── content/ # Misc static content
├── data/ # Sidebar config, CustomerStories.ts, hero data, ...
├── lib/ # Helpers, redirects.js
├── public/ # Images and static assets
├── supabase/ # Local Supabase project for the Edge Function below
├── scripts/ # Sitemap and feed generators
├── middleware.ts # CMS rewrites and locale handling
├── next.config.mjs
└── schema.sql # SQL schema used by the dynamic OG-image functionContent systems
Blog
MDX files in _blog/. Frontmatter conventions (full details in apps/www/README.md):
| Field | Purpose |
|---|---|
imgSocial |
OG / social-share image. Should include text overlay. |
imgThumb |
Listing-page thumbnail. Clean image without text. |
tags, categories, authors |
Indexed for filtering. |
date, description, title |
Standard. |
Image paths are relative to apps/www/public/images/blog/. The /images/blog/ prefix is added automatically.
Customer stories
MDX in _customers/. No og_image field — OG images are generated dynamically by the og-images Edge Function (deployed by og_images.yml).
Events
MDX in _events/. Image fields are thumb (grid item), cover_url (banner), and optional og_image to override the dynamically generated OG image.
/go/* campaign system
A separate, typed system for lead-generation, legal, and thank-you pages. Pages are TS objects, not MDX, and are validated at build time with Zod.
| Location | Purpose |
|---|---|
apps/www/_go/ |
Page definitions; index.tsx registers all pages. |
apps/www/app/go/[slug]/page.tsx |
App Router route, 404 + metadata handling. |
apps/www/components/Go/GoPageRenderer.tsx |
Wraps the marketing page in the Supabase header/footer; registers custom section renderers. |
packages/marketing/src/go/ |
Framework-agnostic core: schemas, section components, templates, form server action. |
packages/marketing/src/crm/ |
HubSpot + Customer.io abstraction used by the form server action. |
Templates: lead-gen, thank-you, legal. Each page is an array of typed section objects; a SectionRenderer dispatches to the right component. To add a www-specific section type (e.g. tweets), register a custom renderer in GoPageRenderer.tsx.
OG image generation
supabase/functions/og-images/ is a Supabase Edge Function that generates OG images for events and customer stories. In dev it is reachable at http://127.0.0.1:54321/functions/v1/og-images via the local Supabase CLI. CI deploys it via og_images.yml.
Redirects
URL redirects are managed in apps/www/lib/redirects.js. Adding one is a single PR — no infra changes needed.
Middleware
apps/www/middleware.ts handles geo / locale rewrites, A/B testing hooks, and CMS-driven URLs. It is unit-tested in middleware.test.ts.
Build / deploy
Vercel builds and deploys on merge to master. The www-tests.yml workflow runs Vitest on PRs.
Integration points
- Pulls in
packages/marketingfor/go/*rendering and the CRM client. - Uses
packages/shared-datafor navigation and content fixtures. - Shares UI primitives with
packages/ui.
Entry points for modification
- New blog post → add an MDX file under
_blog/withimgSocial/imgThumbfrontmatter. - New customer story → add an MDX file under
_customers/(noog_image). - New event → add an MDX file under
_events/. - New
/go/*page → add a typed page inapps/www/_go/<category>/, register inapps/www/_go/index.tsx. - New redirect → edit
apps/www/lib/redirects.js.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.