Skip to content

CrystallizeAPI/crystallize-gatsby-boilerplate

Repository files navigation

Crystallize Gatsby Boilerplate


This repository is what we call a "subtree split": a read-only copy of one directory of the main repository.

If you want to report or contribute, you should do it on the main repository: https://github.com/CrystallizeAPI/boilerplates


React: latest Gatsby: latest

The bare minimum skeleton you need to get a frontend up and running on the headless ecommerce & GraphQL based product Information Management service Crystallize. React commerce with Gatsby.

This frontend boilerplate is a great starting point when building React ecommerce experiences with frontend performance in focus. You can have rich ecommerce content with the super structured PIM engine in Crystallize powering your product catalogue.

Fast frontend performance delivers a better ecommerce experience and is a key ingredient in the ecommerce SEO checklist. Rich content driven ecommerce experiences builds the foundation for a content strategy for exponential growth marketing.

Check it out, the boilerplate is Open Source and MIT licensed.

Getting Started

You can use Crystallize CLI to bootstrap a project with this Gatsby + React boilerplate.

Simply run the following command (>= Node 8 required):

npx @crystallize/cli my-project

This will walk you through the steps of specifying your tenant, choosing the template (Gatsby.js + React) and adding additional features such as Netlify.

Once your project has been created, you can simply navigate into your project's directory and run the following to start up your development server:

npm run dev
# or
yarn dev

This will start up the server on http://localhost:8000 for development.

App Structure

src/page-templates

We use the src/page-templates/ directory to hold the actual entry pages related to query result in gatsby-node.js.

Deploying Your Project

There are multiple alternatives for deployments, check out one of the ones below:

Deploying with Vercel Now

  • Register a Vercel account
  • Install Vercel Now: npm i -g now
  • Run now

Deploying with Netlify

  • Register a Netlify account
  • Create a new project
  • Link it with your Git repository
  • Push to master