As developers, we have this unyielding need to follow the latest in technology. We are driven by this insatiable thirst to learn everything, absolutely everything, about every big and innovative technology. We crave to get an exclusive glimpse of the future – and this desire keeps us going. Our quest for the latest eCommerce technology led us to – Next Commerce.
Next Commerce is the latest offering from BigCommerce in collaboration with Next.js and Vercel teams. With the Next Commerce, eCommerce developers can install a completely headless application that’s integrated with BigCommerce in a matter of minutes. It is the first endeavor of its kind from both Next and BigCommerce.
Headless commerce is probably what the future of eCommerce most likely looks like. Headless commerce makes it easy for developers to design and develop innovative apps, reach out to a broader global market and help eCommerce store’s sales graph point north.
According to a report on site performance, in a survey of 120 eCommerce executives, 62% were of the opinion that headless commerce can improve conversion rates and customer engagement significantly.
We are thrilled to show you just how effortlessly easy to install and incredible to use this latest offering from BigCommerce and Next is. This step-by-step guide is everything you need to get started on Next Commerce.
We’ll begin with an overview.
Next.js is a widely used open-source web framework with which you can build your own applications – both server-side rendering and static applications using React. Currently, the framework brings Next.js Commerce to us. It is a developer kit using which we can build extremely high-performing, customizable and engaging eCommerce sites. Being offered along with a robust open SaaS platform like BigCommerce, the possibilities and potential of Next Commerce are immense.
Next.js is a powerful tool to build your eCommerce site. It is a complete and robust architecture that can be scaled, customized and configured for various eCommerce implementations.
Although Next.js extends a number of benefits, here are some of the significant few:
The React components can be server-side rendered before the HTML can be sent to the clients.
Every time Next.js detects changes, the page reloads. Any URL is automatically routed to the filesystem. This doesn’t require any configuration skills from you. However, you can always customize according to your needs though.
Since Next.js is written in TypeScript, it offers complete support.
A prefetching prop is supported by the Link component that automatically fetches page resources – even the automatic code spitting ones.
It is possible to make use of both SSR and static web applications in a single project using Next.js.
This production-ready framework is perfect for engineering teams that are trying to offer scalability and ease of use to eCommerce stores. It comes with auto-compilation and bundling, in-built CSS support, filesystem routing, automatic code splitting and API creation.
Now equipped with a basic understanding of Next Commerce, let’s quickly get into the more juicy details – deployment. Let’s start with the prerequisites. The Next.js is not very clingy, so it comes with the bare minimum requirements.
These are the basic requirements for your Next Commerce functionality. You can always reorganize the rest of the directories later.
In addition to the NPM and Yarn, the Next Commerce run makes use of .env and .config files to get started.
In order for the application to work properly, you would need to make use of the BigCommerce Storefront Data Hooks package. Hooks can be reused according to component needs. You can find the components in the /components directory, and these are rendered to pages. The link from hooks to components and to pages needs large amounts of data from the storefront. If you don’t want to spend a fortune on developer costs, you can easily make use of the BigCommerce Storefront Data Hooks package to your advantage.
This package helps you access categories, crucial customer data, product pages, details, and a lot more. Once you’ve successfully installed the package, you can link your .env variables to the appropriate key-value pair in the BigCommerce storefront.
The .env files are automatically stored in Vercel. You can easily pull the .env file by using the “vercel env pull” command. You can now set your BigCommerce storefront API keys and GraphQL token by using the .env.local file.
Running the project in the development environment server is pretty straightforward. All you have to do is use the following command:
yarn dev or npm run dev
Building the Next.js Commerce is fairly easy too –visit nextjs.org/commerce and click on the Clone and Deploy button. By the end, you should be able to have your own application up and running on Vercel – with your store’s logo. Once you have deployed, you can customize your store according to your needs.
We’ll take the integration process one step at a time.
Once you hit the Clone and Deploy button, you can start deploying using Vercel with a Git provider.
If you have a Vercel account, you can log in using your credentials.
If you don’t have a Vercel account, you’ll be prompted to create an account using any of the Git providers of your choosing.
After logging in to the Vercel account, you’ll be able to see a Clone Git Repository dialogue box with a drop-down list. Select your Vercel account and type in your project name in the field provided and hit Continue.
The next step is to install integrations. To connect your BigCommerce store to your Vercel project, hit the Install button. Once you hit the Install button, you should see an Add BigCommerce to your Vercel Project screen.
If you already have a BigCommerce store, you can simply Log-In using your existing credentials to integrate Vercel and BigCommerce. However, if you are new to BigCommerce, you click on Sign Up.
The Sign Up page will guide you through creating a developer sandbox using a simple form. Key in your details and agree to all terms and conditions to sign up. Click Continue when you see a blue checkmark next to the BigCommerce integration tab.
Now you can create the Git Repository by typing in your repository name. Click Continue.
Once you get to the Import Project screen, you should be able to confirm your project settings and click Deploy. The entire deployment shouldn’t take more than a few minutes.
Once deployment to Vercel is done, you would be able to see a thumbnail image of your deployed site.
Congratulations, your project has been successfully deployed!
You can set up your eCommerce store with Next - SSR generator for React – and then deploy to Vercel. Using Crystallize and Next.js boilerplate, you can easily build a Jamstack web development eCommerce storefront. Now, we’ll be using the Crystallize CLI to develop a new project.
Key-in the following command in your terminal.
With this command, you’ll be able to add in your preferred boilerplate, choose to go with your own tenant, or pick a demo tenant and add Service API.
In order to deploy to Vercel, you’ll need these basic requirements installed on your computer.
Run the project in the development server using:
yarn dev or npm run dev
With this, you can access the development site, understand the app structure and edit the pages as per your requirements.
Once you are done with creating pages for various item shapes, you can start deploying to Vercel.
Again, to deploy your project to Vercel, you’ll need to get through the Vercel Github integration. However, you can also deploy manually just as easily. Use the command line to type in - vercel login – set the two environment variables using the Vercel dashboard.
Deploying your project with Vercel needs a Git provider. Push your project to the Git provider and you are almost done – deployment will be initiated.
The era of headless e-Commerce is here. Traditional eCommerce site development centered on offering a full-stack experience with a well-knit front-end and back-end. This helped stores quickly launch their applications. However, soon you’d experience performance hiccups – most significantly, you’ll not be able to scale as much as you’d like. But with headless eCommerce, you don’t have to struggle so much.
A headless design gives you much freedom to design your own front-end from scratch or use a pre-built one. You’ll have the capability to quickly respond to changes in the market and customize customer experiences accordingly. Most important of all – you can make changes to your front-end without tampering with your back-end. Now you know why, as developers, we are certain that the future of eCommerce is surely headless.
Copyright © . All Rights Reserved