# gatsby-starter-shopify

> Shopify PWA starter

Latest version **0.0.1** (published 2018-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-starter-shopify
pnpm add gatsby-starter-shopify
yarn add gatsby-starter-shopify
bun add gatsby-starter-shopify
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-11-12 |
| First published | 2018-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Unpacked size | 505.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 101 |
| Author | Gil Greenberg |
| Maintainers | gilg |
| Keywords | gatsby, shopify, pwa, ecommerce |

## Links

- npm: https://www.npmjs.com/package/gatsby-starter-shopify
- Repository: https://github.com/gil--/gatsby-starter-shopifypwa
- Homepage: https://github.com/gil--/gatsby-starter-shopifypwa#readme
- Issues: https://github.com/gil--/gatsby-starter-shopifypwa/issues
- npm.io page: https://npm.io/package/gatsby-starter-shopify

## Dependencies (19)

- [yup](https://npm.io/package/yup.md) ^0.26.6
- [react](https://npm.io/package/react.md) ^16.5.1
- [formik](https://npm.io/package/formik.md) ^1.3.0
- [gatsby](https://npm.io/package/gatsby.md) ^2.0.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.5.1
- [graphql-tag](https://npm.io/package/graphql-tag.md) ^2.9.2
- [netlify-cms](https://npm.io/package/netlify-cms.md) ^2.1.3
- [react-apollo](https://npm.io/package/react-apollo.md) ^2.1.11
- [react-helmet](https://npm.io/package/react-helmet.md) ^5.2.0
- [gatsby-plugin-layout](https://npm.io/package/gatsby-plugin-layout.md) ^1.0.1
- [gatsby-plugin-netlify](https://npm.io/package/gatsby-plugin-netlify.md) ^2.0.4
- [gatsby-plugin-offline](https://npm.io/package/gatsby-plugin-offline.md) ^2.0.5
- [gatsby-source-graphql](https://npm.io/package/gatsby-source-graphql.md) ^2.0.2
- [gatsby-plugin-manifest](https://npm.io/package/gatsby-plugin-manifest.md) ^2.0.2
- [gatsby-transformer-json](https://npm.io/package/gatsby-transformer-json.md) ^2.1.5
- [gatsby-source-filesystem](https://npm.io/package/gatsby-source-filesystem.md) ^2.0.8
- [gatsby-plugin-netlify-cms](https://npm.io/package/gatsby-plugin-netlify-cms.md) ^3.0.7
- [gatsby-plugin-react-helmet](https://npm.io/package/gatsby-plugin-react-helmet.md) ^3.0.0
- [gatsby-plugin-apollo-shopify](https://npm.io/package/gatsby-plugin-apollo-shopify.md) ^1.0.2

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2018-11-12

## README

# gatsby-starter-shopifypwa

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 

## Shopify PWA powered by Gatsby

This will be a POC Shopify PWA using the Storefront API & GatsbyJS.

## High Level Project Goals

### Speed

Should be as fast but ideally, faster than a normal Shopify experience - especially for slower connection due to service worker.

### Highly Customizable Theme and Settings

There should be a number of ways to customize the theme without touching the code such as colors, typography, and settings (show breadcrumbs?, etc.)

### Accessible

Out-of-box, the site should be WCAG 2.0 accessible. This means aria tags where needed, AA color contrast, and keyboard accessible navigation with focus styling. This includes things like the gallery.

### Code Complete with regular Shopify themes

Should strive to offer the same features as a normal Shopify theme such as easy homepage section content, all the normal content types. See [this list of issues](https://github.com/gil--/gatsby-starter-shopifypwa/issues/4) which might prevent code complete.

## Install

### ENV

Copy .env.sample to .env.development and change the items to match your store. Make sure to add all .env keys and values in Netlify

### Emails

#### Customer Active

When sending a customer an active email (invite email), the template utilizes a url pattern that does not currently work with Shopify PWA. To simplify setup, change the following items in the *Customer account invite* email notification template (**Settings > Notifications > Customer Account > Customer account invite** or https://YOUR_STORE_NAME.myshopify.com/admin/email_templates/customer_account_activate/edit):

```diff
-<td class="button__cell"><a href="{{ customer.account_activation_url }}" class="button__text">Activate your account</a></td>
+{% assign url_parts = customer.account_activation_url  | split: '/' %}
+<td class="button__cell"><a href="{{shop.url}}/account/activate?id={{url_parts[5]}}&token={{url_parts[6]}}" class="button__text">Activate your account</a></td>
```

#### Password Reset

Shopify Password Resets urls do not currently work with the Storefront API and are also presented in a sturcture that requires custom Server-Side Routing. To simplify setup, change the following items in the *Customer account password reset* email notification template (**Settings > Notifications > Customer Account > Customer account password reset** or https://YOUR_STORE_NAME.myshopify.com/admin/email_templates/customer_account_reset/edit):

```diff
-<td class="button__cell"><a href="{{customer.reset_password_url}}" class="button__text">Reset your password</a></td>
+{% assign url_parts = customer.reset_password_url  | split: '/' %}
+<td class="button__cell"><a href="{{shop.url}}/account/reset?id={{url_parts[5]}}&token={{url_parts[6]}}" class="button__text">Reset your password</a></td>
```

We're basically splitting the reset password url into URL parameters which will make it MUCH easier for Gatsby to understand.

### Webhooks

Setup webhooks with Netlify to auto-deploy after product creation, update, and deletion.

1. Got to https://app.netlify.com/sites/MY_NETLIFY_APP/settings/deploys
2. Scroll down to **Build Hooks** and click the *Add build hook* button.
3. Create a new Build Hook such as **Shopify Product Update**.
4. Go to `https://YOUR_STORE_NAME.myshopify.com/admin/settings/notifications` and scroll down to Webhooks. Select **Create webhook** and for Event select *Product update* for example.
5. For the URL, enter the one Netlify gave you in step 3.
6. You can test the Webhook by clicking the **Send test notification** link and you should see a new build begin in Netlify.
7. Repeat steps 1 through 6 for any additional Shopify Events that should trigger a new build.

## Deploy

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/gil--/gatsby-starter-shopifypwa)

### Instructions

1. Have your Shopify store name (If it's https://shopifypwa.myshopify.com, the store name would be **shopifypwa**) and [access token ready](https://www.shopify.com/partners/blog/17056443-how-to-generate-a-shopify-api-token). Enter those as the environment variables after clicking the deploy button above.
2. Enable Netlify Identity in order to enable the Admin CMS. Go to `https://app.netlify.com/sites/YOURAPPNAME/identity` and click **Enable Identity**.

## Features (WIP)

The following are planned features. Many of these are not planned for the initial release.

- [ ] Native-Like Homepage Sections
- [ ] Page Builder (Easily Build CMS Pages & Category Landing Pages)
- [ ] Theme Customizer (Colors, Typography, Basic Theme Features On/Off)
- [ ] Excellent SEO
- [ ] Rich-Media Cards (Twitter, Facebook)
- [ ] OOB Analytics Support (GA Ecommerce, GTM)
- [ ] WCAG AA Accessible
- [ ] PWA Functionality (Offline, Notifications, Manifest)
- [ ] Advanced Search (3rd Party Integration)
- [ ] WebPayments API Support? Shopify Dynamic Checkout?
- [ ] AR Product Support
- [ ] Advance Related Products
- [ ] 3rd Party Reviews Support
- [ ] 3rd Party Chat Support
- [ ] Mega Menu
- [ ] Login/Registration (My Orders)
- [ ] Order Status Lookup
- [ ] FAQ Page Template (w/ Typeahead search)

---
_Source: https://npm.io/package/gatsby-starter-shopify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
