- Node
- Next.js
- Shopify-koa-auth
- Polaris
- App Bridge React
- DynamoDB
- AWS CLI
- Ruby
v2.6.8
~v3.0.0
- Docker
- Node
v16.15.0
- Yarn
- ngrok account & Auth Token
- shopify-cli
v2.12.0
- If you don’t have one, create a Shopify partner account
- If you don’t have one, create a Development store where you can install and test your app
- In the Partner dashboard, create a new app
To use the aws dyanmodb client, we have to install and configure the AWS Command Line Interface. Use the following as guides:
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
yarn install
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 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
You can find hosting instructions here
If you'd like to test the connection between AWS (Dynamodb) and your local dev environment you need to
- Start the server process using
yarn local:start
- 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