项目作者: hta218

项目描述 :
Boilerplate to create a Shopify app made with Node, Next.js, Shopify-koa-auth, Polaris, and App Bridge React.
高级语言: JavaScript
项目地址: git://github.com/hta218/shopify-app-starter.git
创建时间: 2018-09-10T03:08:01Z
项目社区:https://github.com/hta218/shopify-app-starter

开源协议:

下载


Shopify Koa.js React App

License: MIT

Production-ready boilerplate to create a Shopify node app made with Koa.js, Shopify-koa-auth, JSON web token, MongoDB with Mongoose ORM, and React with Polaris.

First things first

Since this tutorial (Link before Unite) from Shopify using shopify-cli has a lot of issues with Authentication, Session, Cookie, Infinite redirect, Expected a valid shop query parameter… that make me frustrated for days, I decided to make this boilerplate which include all requirements for a Shopify app and have none of the above issues.

Key features

  • Using shopify-koa-auth (offline access mode) which make authentication process much faster
  • Cookie base authentication using JWT with httpOnly and secure flag
  • All mandatory Webhooks (GDPR and app/uninstalled topics) registered
  • Querying Shopify resources with either Rest API or GraphQL API

Prerequisites

Installation

  • Install and start MongoDB

  • Clone the repo

    1. git clone https://github.com/hta218/shopify-koajs-react-app.git && cd shopify-koajs-react-app
  • Install dependencies

    1. npm run set-up
    2. # or yarn set-up
  • Inside /server directory, create .env file with all credentials from your private app that you have created in the above step (Take a look at .env.example for the template)

  • Start app

    1. npm start

Authentication

Shopify OAuth process require HTTPS so you need to either using ngrok or generate SSL files then move theme to server/certs directory (recommended)

License

Copyright (c) 2022 - Leo @ https://leohuynh.dev