Skip to content
A Yeoman generator for Serverless Shopify apps using Next.js, Koa, Prisma GraphQL & Shopify's Polaris
JavaScript Shell
Branch: master
Clone or download
Latest commit 080e80d Mar 31, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
generators/app
.editorconfig
.eslintignore
.gitattributes
.gitignore
.travis.yml
.yo-rc.json
LICENSE
README.md
package-lock.json
package.json

README.md

generator-shopify-nextjs NPM version Build Status Dependency Status Coverage percentage

A Yeoman generator for Serverless Shopify apps using Next.js, Koa, Prisma GraphQL & Shopify's Polaris

The Stack

Installation

First, install Yeoman and generator-shopify-nextjs using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-shopify-nextjs

Then generate your new project:

cd /path/to/empty/directory
yo shopify-nextjs name-of-app

Setup

Prisma

This is the default data store that's hosted at app.prisma.io. It's a hosted GraphQL service that has a free tier, so it's easy to get started. To initialize a prisma instance, do the following:

cd data
prisma init
cp datamodel.prisma.example datamodel.prisma
prisma deploy

If you want to use a different data store, it's easy enough to replace with whatever you want. In server.js, you just have to store the accessToken that Shopify gives you upon app installation using your own database libraries.

Shopify Partner

  • TODO - Explain how to register an app as a Shopify partner.
  • TODO - Explain how this is where the API keys for your new Shopify app come from.

Fill out .env

Your .env should have the following entries:

SHOPIFY_API_KEY=...
SHOPIFY_SECRET=...
SERVER_SECRET=...
NEXT_STATIC_GRAPHQL_URI=...

Deployment

npm i -g now
now

REPL

bin/repl

License

MIT © Dimension Software

You can’t perform that action at this time.