marketplace-scaffold

bởi vercel

Tạo khung ứng dụng Sitecore Marketplace mới bằng SDK chính thức. Sử dụng khi người dùng muốn tạo ứng dụng marketplace mới, bắt đầu dự án Sitecore mới, hoặc…

npx skills add https://github.com/vercel-labs/sitecore-skills --skill marketplace-scaffold

Scaffold a New Sitecore Marketplace App

You are helping the user scaffold a new Sitecore Marketplace app using the official Sitecore Marketplace SDK (v0.4).

Step 1: Gather Requirements

Ask the user the following questions (skip any they've already answered):

  1. App name — What should the app be called? (default: from $ARGUMENTS if provided)
  2. Architecture — Client-side only or full-stack?
    • Client-side: UI runs entirely in the iframe, communicates via SDK client. Simpler, no server needed.
    • Full-stack: Includes Next.js API routes/server actions for server-side SDK access. Required for Auth0, server-side mutations, or proxying external APIs.
  3. Authentication — Built-in (default) or Auth0?
    • Built-in: Zero-config, SDK handles auth automatically. Sufficient for most apps.
    • Auth0: Required for server-side API access, external service integration, or custom auth flows. Requires Auth0 tenant setup.
  4. Optional packages — Which additional SDK packages?
    • XM Cloud (xmc): Access Sites, Pages, Authoring, Content Transfer, Search, and Agent APIs
    • AI Skills (ai): Access Brand Review API for AI-powered content analysis

Step 2: Run the Scaffold Command

Based on answers, construct and run the appropriate command:

# Client-side only (built-in auth)
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/app-client.json

# Client-side + XMC
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/app-client.json https://marketplace-sdk.sitecorecloud.io/r/xmc.json

# Client-side + AI
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/app-client.json https://marketplace-sdk.sitecorecloud.io/r/ai.json

# Client-side + XMC + AI
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/app-client.json https://marketplace-sdk.sitecorecloud.io/r/xmc.json https://marketplace-sdk.sitecorecloud.io/r/ai.json

# Full-stack (Auth0) — adds server-side SDK support
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/app-auth0.json

# Full-stack + XMC
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/app-auth0.json https://marketplace-sdk.sitecorecloud.io/r/xmc.json

# Full-stack + AI
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/app-auth0.json https://marketplace-sdk.sitecorecloud.io/r/ai.json

# Full-stack + XMC + AI
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/app-auth0.json https://marketplace-sdk.sitecorecloud.io/r/xmc.json https://marketplace-sdk.sitecorecloud.io/r/ai.json

Important: If the user doesn't have a Next.js project yet, scaffold one first:

npx create-next-app@latest <app-name> --typescript --tailwind --eslint --app --src-dir
cd <app-name>

Step 3: Post-Scaffold Setup

After scaffolding completes:

  1. Create .env.local — See env-template.md for the template. Fill in based on architecture choice.

  2. Configure CSP headers — Add iframe embedding headers to next.config.ts:

const nextConfig: NextConfig = {
  async headers() {
    return [
      {
        source: "/(.*)",
        headers: [
          {
            key: "Content-Security-Policy",
            value: "frame-ancestors 'self' https://*.sitecorecloud.io",
          },
        ],
      },
    ];
  },
};
  1. Install Blok theme (if not already present):
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/blok-theme.json
  1. Verify setup — Run the dev server and confirm no errors:
npm run dev

Step 4: Explain Next Steps

After successful scaffold, suggest:

  • Use /marketplace-add-extension to add extension point routes (custom fields, dashboard widgets, etc.)
  • Use /marketplace-sdk-reference to look up SDK APIs
  • Use /marketplace-build-component to build UI with the Blok design system
  • Use /marketplace-deploy when ready to deploy

Reference Files

Thêm skills từ vercel

benchmark-sandbox
vercel
Chạy các kịch bản đánh giá vercel-plugin trong Vercel Sandboxes thay vì các bảng WezTerm cục bộ. Cung cấp các microVM tạm thời với Claude Code và plugin được cài đặt sẵn,…
official
emil-design-eng
vercel
Kỹ năng này mã hóa triết lý của Emil Kowalski về trau chuốt giao diện người dùng, thiết kế thành phần, quyết định hoạt ảnh và những chi tiết vô hình giúp phần mềm mang lại cảm giác tuyệt vời.
official
vercel-react-best-practices
vercel
Hướng dẫn tối ưu hiệu suất React và Next.js từ Vercel Engineering. Kỹ năng này nên được sử dụng khi viết, xem xét hoặc tái cấu trúc mã React/Next.js…
official
vercel-react-best-practices
vercel
Hướng dẫn tối ưu hiệu suất React và Next.js từ Vercel Engineering. Kỹ năng này nên được sử dụng khi viết, xem xét hoặc tái cấu trúc mã React/Next.js…
official
write-guide
vercel
Tạo một hướng dẫn kỹ thuật dạy một trường hợp sử dụng thực tế thông qua các ví dụ tiến dần. Các khái niệm chỉ được giới thiệu khi người đọc cần đến chúng.
official
release
vercel
Phát hành vercel-plugin — chạy các cổng, tăng phiên bản, tạo tạo phẩm, commit và push. Sử dụng khi được yêu cầu "phát hành", "ship", "tăng và push", hoặc "cắt một bản phát hành".
official
deepsec
vercel
Chạy DeepSec trên bản checkout dự án Vercel từ dev3000. Sử dụng để thiết lập DeepSec một chạm, khởi tạo ngữ cảnh dự án, xử lý lần đầu có giới hạn, và…
official
backport-pr
vercel
Backport một pull request Next.js đã được merge từ canary sang một nhánh phát hành trước đó như next-16-2. Sử dụng khi người dùng yêu cầu backport, cherry-pick, hoặc mở một…
official