Skip to content

Add a TanStack Start Hydrogen storefront example#3874

Open
liaoyio wants to merge 1 commit into
Shopify:previewfrom
liaoyio:example/tanstack-start
Open

Add a TanStack Start Hydrogen storefront example#3874
liaoyio wants to merge 1 commit into
Shopify:previewfrom
liaoyio:example/tanstack-start

Conversation

@liaoyio

@liaoyio liaoyio commented Jul 18, 2026

Copy link
Copy Markdown

WHY are these changes introduced?

Hydrogen's preview repository validates its framework-agnostic commerce APIs through complete framework examples, but it does not yet include a TanStack Start integration. This example demonstrates TanStack Start's server functions, request lifecycle, router search state, and server/client boundaries against the same storefront behaviors as the existing examples.

WHAT is this pull request doing?

  • Adds a TanStack Start storefront example organized consistently with the React Router example.
  • Creates a request-scoped Hydrogen context for Storefront API, cart, customer account, analytics, and consent flows.
  • Implements home, collections, collection filtering and sorting, product variants, search, cart, and customer account routes.
  • Adds sitemap, robots, catch-all/404 handling, and personalized-response cache protections.
  • Registers the example in repository documentation and the workspace lockfile.
  • Excludes generated TanStack artifacts and the generated route tree from repository lint/format checks.
  • Follows the existing framework-example convention without adding a package-local Vitest test suite.

HOW to test your changes?

From the repository root:

pnpm install --frozen-lockfile
pnpm run format:check
pnpm run lint:ci
pnpm run build
pnpm run typecheck
pnpm run test

For manual verification:

pnpm --filter @shopify/hydrogen-example-tanstack-start dev

Verify collection filter/sort and Back/Forward state, product variant selection, search, cart add/update/remove, customer account fallback, 404 handling, /robots.txt, and /sitemap.xml.

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • A changeset is not required because this private example package matches the configured @shopify/hydrogen-example-* ignore rule
  • Testing is covered by the existing repository suite plus the example's typecheck and production build; framework examples do not carry package-local Vitest suites
  • I've added or updated the documentation

@liaoyio

liaoyio commented Jul 18, 2026

Copy link
Copy Markdown
Author

I have signed the CLA!

@liaoyio
liaoyio marked this pull request as ready for review July 23, 2026 08:48
@liaoyio
liaoyio requested a review from a team as a code owner July 23, 2026 08:48
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