Skip to content

Add Stargate and Code Analysis landing pages with shared landing kit#19

Merged
gabrielrangel95 merged 8 commits into
btwld:mainfrom
gabrielrangel95:feat/stargate-code-analysis-landings
Jul 15, 2026
Merged

Add Stargate and Code Analysis landing pages with shared landing kit#19
gabrielrangel95 merged 8 commits into
btwld:mainfrom
gabrielrangel95:feat/stargate-code-analysis-landings

Conversation

@gabrielrangel95

Copy link
Copy Markdown
Contributor

Summary

Folds the standalone Stargate and Code Analysis product sites (previously separate Next.js repos) into fluttermix.com as /stargate and /code-analysis, and adds both products to the FloatingNavbar products dropdown.

The two source sites were near-identical twins (both ported from this repo's Remix landing page — 19 of 22 files identical after sg-/ca- prefix normalization), so instead of copying them twice the landing pages share one unified kit:

  • components/landing/ — shared .lp-* design system (landing.css, single copy of the former 1,291-line stylesheet), motion presets, primitives (LandingButton, Wordmark, SectionHead, HighlightedCode, WaitlistForm) and 9 sections parameterized by a LandingContent config.
  • components/landing/stargate/, components/landing/code-analysis/ — per-product content configs, code snippets, and the only two genuinely divergent components each (HeroWindow, OutputsBento), plus a thin client wrapper.
  • Per-product accents (violet / cyan) come from html[data-product] CSS token blocks, reusing the existing product-theming mechanism.

Navbar / theming

  • Products dropdown now lists Mix, Remix, Stargate, and Code Analysis (new entries show a text label beside their square glyph — proper wordmark assets can be swapped in later).
  • Landing-only products hide the Docs link, Version menu, and GitHub icon; a "Join waitlist" link takes the Docs slot.
  • data-product handling extended in both the pre-hydration script (layout.jsx) and getActiveProduct, with new accent blocks in globals.css.
  • Fonts need no work: both sites already consume the --font-inter / --font-jetbrains-mono vars the root layout provides.

Waitlist API

One parameterized route (/api/waitlist) serves both products with per-product Resend audiences and welcome emails. Degrades gracefully: dev no-op / prod 503 when keys are missing.

New Vercel env vars to configure:

  • RESEND_API_KEY
  • RESEND_AUDIENCE_ID_STARGATE
  • RESEND_AUDIENCE_ID_CODE_ANALYSIS
  • RESEND_FROM_EMAIL (optional; per-product defaults otherwise)

Note on zod

zod is pinned to 4.3.6 via a pnpm override: 4.4.3 breaks nextra's Layout prop validation ("expected nonoptional, received undefined at children") and 500s every route.

Verification

  • pnpm build passes; /stargate and /code-analysis prerender as static routes; pagefind indexes only docs pages (landing pages also carry data-pagefind-ignore).
  • Dev server: all routes 200 (/, /remix, /stargate, /code-analysis, mix/remix docs, examples); both landing pages render full section stacks with correct copy and accents.
  • Waitlist API: valid posts → dev no-op 200; invalid email or unknown product → 400.

🤖 Generated with Claude Code

Gabriel Rangel and others added 8 commits July 14, 2026 16:14
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Unified .lp-* design system from the stargate/code-analysis sites (19 of 22
files were identical after prefix normalization); per-product accents come
from html[data-product] token blocks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Products dropdown now lists all four products; landing-only products hide
the Docs link, Version menu, and GitHub icon and get a waitlist CTA instead.
data-product theming extended in both the pre-hydration script and CSS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One route serves both landing pages; audiences come from
RESEND_AUDIENCE_ID_STARGATE / RESEND_AUDIENCE_ID_CODE_ANALYSIS.
Missing keys degrade gracefully (dev no-op, prod 503).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
zod 4.4.3 breaks nextra's Layout prop validation ('expected nonoptional,
received undefined at children'), 500ing every route. 4.3.6 is the version
main's lockfile already resolved for nextra.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the FlutterTools Team on Vercel.

A member of the Team first needs to authorize it.

@gabrielrangel95

Copy link
Copy Markdown
Contributor Author

Superseded by an in-repo PR now that write access is granted.

@gabrielrangel95

Copy link
Copy Markdown
Contributor Author

Adversarial review — findings & fixes

Reviewed the full diff against main, the merged landing.css against both original standalone sites, the Resend SDK source, and a production build + live smoke test. All findings below are now fixed on this branch.

# Severity Finding Fix
1 High Waitlist route ignored resend.contacts.create result; the Resend SDK never throws for API failures, so any misconfig/outage returned 200 "You're on the list" while silently losing the signup. The welcome-email try/catch was dead code for the same reason. 938e0cb — check { error } on both calls; contact failure → 502, duplicate (409) → success without re-send, failed send → logged
2 Medium No rate limit + no dedupe: repeat POSTs sent unlimited welcome emails to any address from the Concepta domain. 938e0cb — 5 req / 10 min per IP (best-effort, per instance) + 409 dedupe stops repeat sends
3 Medium Product dropdown rendered the Stargate / Code Analysis logos as solid white squares when inactive (brightness(0) invert(1) on opaque-background SVGs). 05c3766 — skip the white-out filter for square glyph logos
4 Low-Med Malformed JSON body → 500 (confirmed live); should be a client error. 938e0cb — parse separately, 400
5 Low Mobile drawer stayed open when tapping a link to the current route (pathname effect never fires). 05c3766 — explicit onClose on all internal drawer links
6 Low vs. originals: color-scheme: dark only applied post-hydration via next-themes; ::selection accent no longer covered page chrome outside .lp-root. f641091 — CSS color-scheme on html.dark; selection scoped by html[data-product] (page-wide on landing routes)
7 Info twitter:card summary_large_image with no image on both landing pages (page metadata replaces the root layout's twitter/openGraph objects wholesale). Faithful to the originals, but previews were text-only. 5a66c2d — per-product opengraph-image / twitter-image via next/og

Checked and sound: CSS scoping (landing.css ships globally but every selector is inert outside the landing routes; no docs-page leakage in either direction); port fidelity (all 8 color-mix() conversions and all 14 per-product tokens are color-exact vs the originals, zero numeric drift); navbar pathname matrix + inline data-product script parity (identical predicates, no hydration mismatch in prerendered HTML); server/client boundaries (content.tsx is client-only, no serialization crossing); zod 4.3.6 override (only consumers are nextra/nextra-theme-docs at ^4.1.12 — coherent); build, typecheck, pagefind, and vercel-build.sh all unaffected.

Verified after fixes: tsc --noEmit + next build + pagefind pass; live smoke test confirms 400 on malformed JSON, 429 after the rate limit, 200 image/png on all four image routes, and og:image/twitter:image meta tags present on both pages.

🤖 Generated with Claude Code

@gabrielrangel95 gabrielrangel95 merged commit aff52ee into btwld:main Jul 15, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant