@kodezen/create-storeengine
v0.2.1
Published
Scaffold a new headless StoreEngine storefront in seconds.
Readme
@kodezen/create-storeengine
Scaffold a headless StoreEngine storefront — Next.js 16 + React 19, wired to your WordPress site — in about a minute.
npm create @kodezen/storeengine@latest my-storefrontAlso works with your package manager of choice:
pnpm create @kodezen/storeengine my-storefront
yarn create @kodezen/storeengine my-storefront
bun create @kodezen/storeengine my-storefrontWhat it does
- Clones the canonical Next.js starter template.
- Asks for your WordPress URL and preferred design mode.
- Writes
.env.local, generating the webhook, preview and session secrets for you. - Installs dependencies with the package manager you pick.
- Prints the remaining WordPress-side checklist.
The generated project depends on @kodezen/storeengine-headless, which carries the SDK, hooks, providers, REST proxy, webhook receiver and the Gutenberg/Block Theme bridge.
Design modes
The scaffolder asks which one you want; it only sets a default, and you can change it later via NEXT_PUBLIC_DESIGN_MODE.
| Mode | What you get |
| --- | --- |
| custom | You design everything in React/Tailwind. WordPress is a data source only. |
| hybrid | Custom cart, checkout and account screens, with Gutenberg-authored content pages. The default, and the usual right answer. |
| block-theme | Layout is pulled from your active WordPress block theme, templates and template parts included. |
After scaffolding
Three things are set up on the WordPress side — the CLI prints this list too:
- Embed key — StoreEngine → Settings → Embeddable Checkout → Embed Keys. Add your dev origin, then paste the key into
STOREENGINE_EMBED_KEY. - Live updates — enable the Webhooks addon, then point a webhook at
/api/revalidateusing theSTOREENGINE_WEBHOOK_SECRETalready generated in.env.local. - Auth — sign-in uses WordPress's built-in Application Passwords, so there is no plugin to install. Your WordPress site must be served over HTTPS; WordPress disables Application Passwords otherwise.
Full checklist: docs/wordpress-setup.md.
Adding components later
The generated project also gets the storeengine CLI, which copies prebuilt component source into your project so you can edit it:
npx storeengine list
npx storeengine add storefront/cart-drawerFull reference for both CLIs: docs/cli.md.
Requirements
- Node.js 20 or newer
- A WordPress site running StoreEngine, reachable over HTTPS
License
MIT © Kodezen
