Git Product home page Git Product logo

atlas-blueprint-shopify's Introduction

Atlas Shopify Blueprint

A Shopify template for Atlas Blueprints.

This repository contains a starter Blueprint to get you up and running quickly on WP Engine's Atlas platform with a simple WordPress site that uses product data from Shopify.

Development

Copy .env.local.sample to .env.local in your local development environment to set environment variables locally. The sample env file points to the demo Shopify Blueprint Wordpress site, but you can change it to point to a local Wordpress site instead.

Add your Shopify variables to configure the Shopify Client.

Install dependencies with npm install - if you run into issues try npm install --legacy-peer-deps

Make sure that any Wordpress site that is connected to this headless site has its Permalinks set to use this custom structure:

/posts/%postname%/

Architecture Decision Records

See the docs/adr directory for a list of architectural decision records made so far.

Tests

Components are tested using React Testing Library and Jest

To run tests npm run test

Linting and pre commit hooks

Eslint and Prettier are used for linting and formatting. Please have Prettier installed in Vs Code when developing locally to adhere to formatting standards. For pre commit linting and formatting we use Husky. This will run when a you run a commit, if it fails check the Node logs for issues that need to be solved before committing again.

NVM ( Node Version Manager )

.nvmrc is specifying that Node.js v18 should be used. Any developer could then run nvm use to download, install, and switch to that version. nvm install will then install dependencies in line with that version.

Configuring Shopify locally and on Atlas

In addition to default environment variables the Shopify Blueprint needs to add 2 more as follows:

  • NEXT_PUBLIC_SHOPIFY_HEADLESS_PUBLIC_ACCESS_TOKEN
  • NEXT_PUBLIC_SHOPIFY_GRAPHQL_URL

For local development these can be added to .env.local and for production deployments these can be added in Atlas Dashboard. See WP Engine headless docs for directions on how to configure Atlas Environment Variables.

For more information

For more information on this Blueprint please check out the following sources:

atlas-blueprint-shopify's People

Watchers

MJ Zorick 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.