Getting Started: Use Building Blocks to Compose Your Headless BigCommerce Storefront using Next.js,
Tags: headless, bigcommerce, jamstack, composablearchitectu
Published: 2023-01-03 17:03:33

---
title: Getting Started: Use Building Blocks to Compose Your Headless BigCommerce Storefront using Next.js,
published: true
date: 2022-11-16 17:54:51 UTC
tags: headless,bigcommerce,jamstack,composablearchitectu
canonical_url: 
---

### Getting Started: Use Building Blocks to Compose Your Headless BigCommerce Storefront using Next.js, Contentstack & Netlify!

![](https://cdn-images-1.medium.com/max/1024/1*QQSSCVBwjAN0uj5tc5YpAQ.jpeg)

Last week the Jamstack Conference happened in San Francisco, and BigCommerce’s team was excited to attend and present one of our starter repos!

As a composable commerce engine, we facilitate developers leveraging modern technologies and approaches like Jamstack. Open SaaS gives merchants much more flexibility and freedom of choice while still maintaining the benefits of using a SaaS platform. It’s important to us that developers get to use the tools they want to use, which is why we enable them to build storefronts with whatever their preferred tech stack is.

BigCommerce’s flexibility allows merchants to use our APIs to integrate to their existing systems and easily install third-party applications without complicating the management and upkeep of their BigCommerce store. With our headless approach, you can build with your preferred meta framework and deploy your front end anywhere.

### What does the starter include?

This proof of concept headless storefront starter repo allows you to fire up a storefront with the following composable tech stack:

- [Next.js](https://nextjs.org/docs) as our frontend framework
- [Contentstack](https://www.contentstack.com/) as our Content Management System
- BigCommerce as our Commerce Engine
- [Netlify](https://www.netlify.com/) to deploy — we want to deploy on Netlify because they allow the level of stack flexibility that our users want to use!

### Let’s check out [the repo](https://github.com/bigcommerce/netlify-nextjs-starter)!

1.✅ You’re here! The first step is being in this repo and hitting the “Deploy to Netlify” button at the bottom of this ReadMe.

2. You need a BigCommerce store! Login or Sign Up to set up a new BigCommerce store to use! Once you’ve logged in or signed up, follow [these instructions](https://support.bigcommerce.com/s/article/Store-API-Accounts?language=en_US#creating) to obtain your BigCommerce API credentials.

3. Create an account or login to [Contentstack.](https://app.contentstack.com/?_gl=1*2rimkv*_gcl_aw*R0NMLjE2NjU3MDM5NDMuQ2p3S0NBanc3cDZhQmhCaUVpd0E4M2ZHdXNVa1RHRTdOWjZaQ0RoVWJEbjVNMm1odTAwQzRiOW52SDRoZEp2eHJnTGdXYlFLQllLOE1Cb0NPdzBRQXZEX0J3RQ..#!/login)

4. Create a “Stack” by selecting “+ New Stack”, title it, add a description, and click “Create”.

5. Now that your Stack has been created, let’s identify your API keys. Navigate to the “Settings” icon on your left hand panel.

![](https://cdn-images-1.medium.com/max/592/0*EUzpYFP92rEmZ-h5.png)

6. Scroll down and select “Tokens”. This will take you to a page that has a “+ Delivery Tokens” button. Click that, and enter a name and description for your new API keys.

![](https://cdn-images-1.medium.com/max/594/0*GkEdg8zpR27mj5pZ.png)

![](https://cdn-images-1.medium.com/max/1024/0*36zEyuDbcXWoNC_a.png)

![](https://cdn-images-1.medium.com/max/1024/0*cREZfc5UztW-luvr.png)

7. Select the proper branch you’re working from and your production environment (you may need to also create a production environment). Then click “Generate Token”.

8. If successful, you should see something like this:

![](https://cdn-images-1.medium.com/max/1024/0*cWo0eMHiJpkTpVe5.png)

9. Hang on to these variables, you’ll need them in an upcoming step.

10. Now, back to the ReadMe! Hit the “Deploy to Netlify” button found at the bottom of the page.

![](https://cdn-images-1.medium.com/max/482/0*_psfCSO3O7O-dQyW.png)

11. Once you’re brought to the page pictured below, select “Connect to Github”

![](https://cdn-images-1.medium.com/max/1024/0*-xTVrksECd65xm-3.png)

12. Once you’re brought to this page (seen in screenshots below), give your repository a unique name and enter all of your BigCommerce and Contentstack API credentials.

![](https://cdn-images-1.medium.com/max/1024/0*9BmkDLQaACUsWssx.png)

![](https://cdn-images-1.medium.com/max/1024/0*IsP9StzHLXew8KiP.png)

13. Save and Deploy!

![](https://cdn-images-1.medium.com/max/884/0*ruT7WmkXlUKXXmD7.png)

14. The deploy process has begun! This may take up to 10 minutes, and will bring you to a page that looks like this:

![](https://cdn-images-1.medium.com/max/1024/0*r70PHibZ77KrTH6r.png)

15. You can watch your project’s progress by clicking on the tab pictured below:

![](https://cdn-images-1.medium.com/max/1024/0*pC7BdJouYeD1H94P.png)

16. If you click into that tab, once your build is successfully complete, you’ll see something like this:

![](https://cdn-images-1.medium.com/max/1024/0*J3ht0ilADxEXZ925.png)

17. To view your site, click “Open Production Deploy” or “Permalink” — both will bring you to your deployed site!

![](https://cdn-images-1.medium.com/max/1024/0*0tTL_obVx4EsWe9x.png)

You’re deployed! Great job! 👏

### I want to use the starter! What’s next?

Fork and clone [the repository here](https://github.com/bigcommerce/netlify-nextjs-starter) and give it a go, following the steps above (also available in the ReadMe file)! Before you get started, you will need a Contentstack account and a BigCommerce store so you’re able to obtain the necessary API keys.

If you’re building headless storefronts on the BigCommerce platform, be sure to join our [Developer Slack space](https://forms.gle/TVebqazPVxadW1dL6) so you can access our #headless channel where you can pose questions and discuss with fellow developers doing similar things!

If this tech stack isn’t exactly what you’re looking for:

- [Have your own starter? Submit it here!](https://docs.google.com/forms/d/e/1FAIpQLSciuq8cymQeaUIJBowd2-7GrVcD2j1z0yaIpjrpQ9-x-GA1hQ/viewform?usp=send_form)
- [Don’t see what you’re looking for? Request an option!](https://docs.google.com/forms/d/e/1FAIpQLSeyw-mzaAohvkEULUWmZc4c1WADrHBG6XNvEFIu-hColGGnag/viewform)

_Still have comments? Questions? Leave a comment or tweet at us!_ [_@BigCommerceDevs_](https://twitter.com/BigCommerceDevs) _or_ [_@KatieHoesley_](https://twitter.com/katie_hoesley)_._

* * *