Skip to content

Add commerce-pdp-management starter - #45

Merged
jarodreyes merged 8 commits into
mainfrom
add/commerce-pdp-management-starter
Aug 23, 2026
Merged

jarodreyes merged 8 commits into
mainfrom
add/commerce-pdp-management-starter

Conversation

@jarodreyes

Copy link
Copy Markdown
Contributor

Summary

Adds commerce-pdp-management, a sibling to commerce-plp-management (#44): an editorial enrichment layer for Shopify product detail pages, built as a pull-only, presence-based Sanity overlay that is resolved and merged at render time. If no rule matches and no SKU enrichment exists, the PDP renders as pure Shopify — every intervention is opt-in and the catalog never breaks. Nothing is ever written back to Shopify.

Stacked on add/commerce-plp-management-starter (#44), which it copies @starter/commerce from. Please merge #44 first (or retarget this PR to main once #44 lands).

What's included

  • Studio v5 — attributeRule (tag-matched 1:many), controlPlane + brandVoice singletons, skuEnrichment (1:1 by Shopify GID), a Shopify product picker, and a Structure with a Review queue + rules-by-category.
  • Storefront — Next.js 16 + React 19 + Tailwind v4 PDP with the pull-only resolver + merge (frontend/lib/product.ts), draft mode, and an on-demand /api/revalidate endpoint.
  • Sanity Functions — cache-revalidate (invalidate the storefront CDN on publish, pull-only) and review-stamp (stamp reviewedAt on approval).
  • Shared logic — @starter/commerce: Shopify Storefront adapter (getProductByHandle, recommendations, list), resolvePdp, and mergePdp, consumed by both the frontend and the Functions.
  • Content model — tag inclusion/exclusion matching, first-match-wins per category, a priority control plane (edit one list → recompose thousands of PDPs), and SKU-level bespoke storytelling layered on top.
  • Monorepo wiring — root .github/workflows/ci.yml job (commerce-pdp-management, Node 20/22, format/lint/typecheck/validate + functions build + manifest extract + bundle-size check) and a row in the root README starters table.

Env / setup

Three gitignored .env files (root / studio / frontend); .env.example provided for each. Admin credentials live only in the root .env and are used solely to mint the public Storefront token — the starter never pushes to Shopify. A new GitHub Environment commerce-pdp-management is required (SANITY_PROJECT_ID, SANITY_DATASET).

Test plan

  • pnpm install
  • pnpm validate
  • pnpm typecheck
  • pnpm lint / pnpm format:check
  • pnpm --filter @starter/functions build (+ bundle-size check)
  • Frontend build
  • End-to-end on a dedicated Sanity project: pnpm bootstrap (blueprint + schema + typegen + seed) then pnpm dev — PDP renders merged enrichment; unmatched products render as pure Shopify
  • Create the commerce-pdp-management GitHub Environment so the new CI job can run

Made with Cursor

Jarod Reyes and others added 5 commits July 14, 2026 09:20
Merchandiser-controlled PLP enrichment layer over Shopify: presence-based
collectionEnrichment + shared productBadge vocabulary, Next.js 16 storefront
with parallel fetch + merge, Sanity Functions push-sync to Shopify metaobjects,
and a framework-agnostic @starter/commerce package (Shopify adapter, merge
logic, metaobject contract). Dev Dashboard client-credentials Admin auth with
a minted public Storefront token.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Restore store-agnostic default seed so `pnpm bootstrap` works for any store;
  preserve the fully-merchandised "Sanity Swag Store" demo as demo-swag-store.ndjson
  behind `pnpm seed:demo`
- Add deploy.yml (Studio + blueprint deploy, frontend build guard)
- Document Vercel storefront deploy (root dir, env vars, CORS) in the README
- Fix collection PLP layout: no facet rail collapse and no grid card overlap

Co-authored-by: Cursor <cursoragent@cursor.com>
Add the commerce-plp-management job to root CI (format, lint, typecheck,
validate, functions build, manifest extract, bundle-size check) and list it
in the root README starters table.

Co-authored-by: Cursor <cursoragent@cursor.com>
The starter skill and CONTRIBUTING now spell out that a new starter needs its
own job in the root ci.yml (the starter's own workflows don't run in this repo),
plus the GitHub Environment vars/secrets. Correct the stale note about editing
the husky hook — it auto-discovers starters.

Co-authored-by: Cursor <cursoragent@cursor.com>
An editorial enrichment layer for Shopify product detail pages, built as a
pull-only, presence-based Sanity overlay resolved and merged at render time.

- Studio v5: attributeRule (tag-matched), controlPlane + brandVoice singletons,
  skuEnrichment, product picker, review queue + control-plane Structure
- Next.js 16 + React 19 + Tailwind v4 storefront with resolver + merge
- Sanity Functions: cache-revalidate (pull-only CDN invalidation) + review-stamp
- Shared @starter/commerce: Shopify Storefront adapter, resolvePdp, mergePdp
- Monorepo wiring: root CI job + README starters table row

Co-authored-by: Cursor <cursoragent@cursor.com>
@jarodreyes
jarodreyes temporarily deployed to commerce-pdp-management July 17, 2026 16:03 — with GitHub Actions Inactive
@jarodreyes
jarodreyes temporarily deployed to ai-shopping-assistant July 17, 2026 16:03 — with GitHub Actions Inactive
@jarodreyes
jarodreyes had a problem deploying to agentic-localization July 17, 2026 16:03 — with GitHub Actions Failure
@jarodreyes
jarodreyes had a problem deploying to agentic-localization July 17, 2026 16:03 — with GitHub Actions Error
@jarodreyes
jarodreyes temporarily deployed to commerce-plp-management July 17, 2026 16:03 — with GitHub Actions Inactive
@jarodreyes
jarodreyes temporarily deployed to commerce-plp-management July 17, 2026 16:03 — with GitHub Actions Inactive
@jarodreyes
jarodreyes temporarily deployed to commerce-pdp-management July 17, 2026 16:03 — with GitHub Actions Inactive
@vercel

vercel Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentic-localization Ready Ready Preview Aug 23, 2026 5:12am
ai-shopping-assistant Ready Ready Preview Aug 23, 2026 5:12am
content-analytics-starter Ready Ready Preview Aug 23, 2026 5:12am

Request Review

Retry transient Shopify failures (402 dev-store wake-ups, 429, 5xx) and
cache storefront reads in Next's data cache so Studio edits and enrichment
publishes no longer re-hit the live store on every re-render.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jarodreyes
jarodreyes temporarily deployed to commerce-pdp-management July 30, 2026 20:39 — with GitHub Actions Inactive
@jarodreyes
jarodreyes temporarily deployed to ai-shopping-assistant July 30, 2026 20:39 — with GitHub Actions Inactive
@jarodreyes
jarodreyes temporarily deployed to commerce-plp-management July 30, 2026 20:39 — with GitHub Actions Inactive
@jarodreyes
jarodreyes had a problem deploying to agentic-localization July 30, 2026 20:39 — with GitHub Actions Error
@jarodreyes
jarodreyes temporarily deployed to commerce-plp-management July 30, 2026 20:39 — with GitHub Actions Inactive
@jarodreyes
jarodreyes had a problem deploying to agentic-localization July 30, 2026 20:39 — with GitHub Actions Failure
@jarodreyes
jarodreyes temporarily deployed to commerce-pdp-management July 30, 2026 20:39 — with GitHub Actions Inactive
Base automatically changed from add/commerce-plp-management-starter to main August 3, 2026 18:45
Replace the dismissive "Why not Sanity Connect?" section with a
"Relationship to Sanity Connect" section that presents Connect as a
complementary option for a richer authoring experience, while keeping the
pull-only render-time model as the default. Addresses review feedback.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Cursor Bugbot was not present after the first check poll, so that signal was skipped, and no approval policy requires human review. Reviewers were not assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Approver

@jarodreyes
jarodreyes merged commit b1d260e into main Aug 23, 2026
14 of 18 checks passed
@jarodreyes
jarodreyes deleted the add/commerce-pdp-management-starter branch August 23, 2026 05:17

This branch was successfully deployed

7 active deployments
Preview – ai-shopping-assistant — 0c3c8e36 Deployed Aug 23, 2026 by vercel[bot]
Preview – content-analytics-starter — 0c3c8e36 Deployed Aug 23, 2026 by vercel[bot]
Preview – agentic-localization — 0c3c8e36 Deployed Aug 23, 2026 by vercel[bot]
commerce-plp-management — 0c3c8e36 Deployed Aug 23, 2026 by jarodreyes via commerce-plp-management (Node 22) #190
agentic-localization — 0c3c8e36 Deployed Aug 23, 2026 by jarodreyes via agentic-localization (Node 22) #190
commerce-pdp-management — 0c3c8e36 Deployed Aug 23, 2026 by jarodreyes via commerce-pdp-management (Node 20) #190
knowledge-base — 0c3c8e36 Deployed Aug 23, 2026 by jarodreyes via knowledge-base (Node 22) #190
ai-shopping-assistant — 0c3c8e36 Deployed Aug 23, 2026 by jarodreyes via ai-shopping-assistant #190
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