Next.js + BigCommerce Starter

R
Renaudil y a 2 jours
0

Description

A Next.js 14 and App Router-ready headless storefront template for BigCommerce.

npx boilerapp bigcommerce-starter-nextjs

文档

Next.js Commerce <br/> <sup><i>for BigCommerce</i></sup>

This is our fork of Vercel's Next.js storefront starter.

[!NOTE] ✨ Looking for more out-of-the-box ecommerce functionality? Try Catalyst, BigCommerce's reference storefront for Next.js. ✨

Catalyst is our first-party developed and fully supported Next.js storefront, offering:

  • Deep integration with our 100s of commerce features, all powered by GraphQL
  • Fully customizable UI kit built specifically for ecommerce
  • Easily configurable multi-region and multi-lingual storefront support

Learn more at catalyst.dev →

Prerequisites

This starter requires a BigCommerce sandbox or a production store provisioned to run a headless storefront.

To get started, use this README and the example environment variable comments.

Develop locally

Clone the template repo manually and supply the environment variables defined in .env.example. The best practice is to use Vercel environment variables for this, but a .env file is all that is necessary.

Note: Do not commit your .env file. It exposes secrets that allow others to control your BigCommerce store.

  • Install the Vercel CLI:
npm i -g vercel
  • Link your local instance with the desired Vercel and GitHub accounts. This action creates a .vercel directory:
vercel link
vercel env pull
  • Install the app's default dependencies and start the development server:
pnpm install
pnpm dev

The app runs on localhost:3000.

Configure checkout

Get to know the BigCommerce GraphQL Storefront API

In addition to being compatible with BigCommerce's multi-storefront features, this starter uses the GraphQL Storefront API. This API makes it possible for merchants to control the representation of products and categories, carts, orders, customer segmentation, and more. To get a sense of what is possible to do directly on the storefront, check out the GraphQL Playground.

When you access the Playground through the store control panel, BigCommerce provides a valid GraphQL Storefront authentication token without any additional API calls on your part. To access the dedicated GraphQL Playground for a particular sandbox or store, sign in to its BigCommerce account and navigate to Settings > API, then click Storefront API Playground.

Explore BigCommerce features

Visit BigCommerce's developer center to learn more about all aspects of our platform. Here are some quick links to kick off your journey:

Core store configuration:

Shopper journeys:

Join our developer community

We'd love to see hear any feedback and answer your questions in our Developer Community.

Prix

Gratuit

FREE

评论 (0)

常见问题

常见问题解答 (FAQ)

有问题?我们有答案。如果您找不到想要的答案,请随时联系我们。

Boilerapp 是一个专门用于分享 Boilerplates、入门套件(Starter Kits)和项目模版的开发者社区平台。我们的目标很简单:为您节省初始配置(Setup)的时间,让您可以专注于真正重要的代码。无论您是在寻找简单的代码库还是完整的 SaaS 项目,都能在这里找到。

还有其他问题?

我们的团队随时为您提供帮助。联系我们,我们将尽快回复。