Giter Club home page Giter Club logo

bigcommerce-nextjs-commerce's Introduction

Next.js + BigCommerce

Deploy with Vercel

A Next.js 13 and App Router-ready headless storefront template for BigCommerce, featuring:

  • Next.js App Router
  • Optimized for SEO using Next.js's Metadata
  • React Server Components (RSCs) and Suspense
  • Route handlers for mutations
  • Edge runtime
  • New fetching and caching paradigms
  • Dynamic OG images
  • Styling with Tailwind CSS
  • Automatic light/dark mode based on system settings

Prerequisites

Next.js + BigCommerce 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

To automatically clone the template repo and configure Vercel environment variables for your project, use the Deploy with Vercel button at the beginning of this README. After you complete the interactive configuration sequence, you can clone the automatically-created project to your local environment.

You can also 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.

  1. Install the Vercel CLI:
npm i -g vercel
  1. Link your local instance with the desired Vercel and GitHub accounts. This action creates a .vercel directory:
vercel link
  1. Download the Vercel environment variables:
vercel env pull
  1. 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, Next.js + BigCommerce 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

BigCommerce's open SaaS feature set powers your store. Visit the BigCommerce developer documentation to learn more about your options for the following features:

Core store configuration:

Shopper journeys:

Join our developer community

We invite you to give feedback and ask questions in our Developer Community BigCommerceDevs Slack or on our Discord server.

bigcommerce-nextjs-commerce's People

Contributors

okbel avatar lfades avatar cond0r avatar francam94 avatar manovotny avatar julianbenegas avatar bc-alexsaiannyi avatar pacocoursey avatar becomevocal avatar slsriehl avatar goncy avatar marbiano avatar lucleray avatar leerob avatar dominiksipowicz avatar pfcodes avatar michaelbromley avatar willianjusten avatar christensenep avatar tniezg avatar greph avatar vczb avatar sokra avatar oliverheywood451 avatar leahtard avatar zaiste avatar kibo-kevinwatts avatar bc-krasnoshapka avatar timneutkens avatar stephdietz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.