Giter Site home page Giter Site logo

dc-extension-shopify's Introduction

Amplience Shopify Connector

Shopify app made with

Requirements

Note

  1. If you don’t have one, create a Shopify partner account
  2. If you don’t have one, create a Development store where you can install and test your app
  3. In the Partner dashboard, create a new app

Contents

CLI

To use the aws dyanmodb client, we have to install and configure the AWS Command Line Interface. Use the following as guides:

Setup (macOS)

Install Shop CLI version 2.12.0

curl -o shopify-cli.zip https://codeload.github.com/Shopify/shopify-cli/zip/refs/tags/v2.12.0 && \
    unzip shopify-cli.zip && rm -rf shopify-cli.zip

Create and copy CLI source directory

mkdir ~/.shopify-cli-2.12.0 && cp -r shopify-cli-2.12.0/* ~/.shopify-cli-2.12.0

Symlink shop CLI binaries

sudo ln -s ~/.shopify-cli-2.12.0/bin/shopify /usr/local/bin/shopify

Invoke a new shell

exec $SHELL

Verify install

shopify version

You should see something like the following:

You are running a development version of the CLI at:
  /Users/local/.shopify-cli-2.12.0/bin/shopify

2.12.0

Cleanup CLI files

rm -rf shopify-cli-2.12.0

Usage

Install dependencies

yarn install

DynamoDB

In order for the app to function, the DynamoDB instance must be runnig. Once you have Docker installed, you can run the following command to standup both the local Dynamo instance itself, and a GUI admin panel running at localhost:8001

yarn docker:db

You should see the following:

Attaching to dynamo-admin, shopify-dynamodb
mazemail-dynamodb  | Initializing DynamoDB Local with the following configuration:
mazemail-dynamodb  | Port:	8000
mazemail-dynamodb  | InMemory:	false
mazemail-dynamodb  | DbPath:	null
mazemail-dynamodb  | SharedDb:	true
mazemail-dynamodb  | shouldDelayTransientStatuses:	false
mazemail-dynamodb  | CorsParams:	*
mazemail-dynamodb  |
dynamo-admin       |   database endpoint: 	http://dynamodb-local:8000
dynamo-admin       |   region: 		us-east-1
dynamo-admin       |   accessKey: 		local
dynamo-admin       |
dynamo-admin       |   dynamodb-admin listening on http://:::8001 (alternatively http://0.0.0.0:8001)

Running the app

Running the app itself involves using the standard app commands from the Shopify-App-CLI.

Log into the Admin

shopify login

Connect the CLI to your app and development store you'll be installing the app to

shopify app connect

Configure the CLI to use your ngrok account by passing in your auth token (you can grab this from your ngrok account dashboard)

shopify app tunnel auth <authToken>

Start the tunnel and copy the URL

shopify app tunnel start

Now you should be able to install and run your app in your development store by running the serve command and navigating to the install link printed in your terminal

shopify app serve

Finally, you can start testing the app using the install link provided by the CLI. For example:

https://<DOMAIN>.ngrok.io/auth?shop=<YOUR_SHOP_NAME>.myshopify.com

Hosting

You can find hosting instructions here

DynamoDB in AWS

If you'd like to test the connection between AWS (Dynamodb) and your local dev environment you need to

  1. Start the server process using yarn local:start
  2. Start an ngrok tunnel ngrok http 8080

You will need to create the install URL using your ngrok domain and install param that contains you shop name

https://<DOMAIN>.ngrok.io/auth?shop=<YOUR_SHOP_NAME>.myshopify.com

dc-extension-shopify's People

Contributors

dlilly avatar mikecarrington avatar neilmistryamplience avatar rezakalfane avatar sweetenr avatar young-jordan avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

emarty-maze

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.