Shopify App Starter Kit
The Rails app with appropriate tools for quick starting developing shopify app.
How to install?
- Clone the repo.
cd shopify-app-starter-kitgit remote set-url origin new_git_repo_urlbundle install && bundle exec rake db:migrate- Rename the app module in the
config/application.rbfile - Install ngrok
- Create a new app in your shopify partner account. Use ngrok url as shopify app url.
- Copy
.envfile into.env.production. - Add
.envto your.gitignorefile. It’s in the repo now for your informing about the structure. - Add
SHOPIFY_API_KEYandSHOPIFY_SECRETto.envand.env.productionfiles. - Change
REDIS_QUEUE_URIin the.envand.env.productionfiles if it’s necessary - Change an application name in the
config/settings.ymlfile. - Change an application host name in the
config/settings/*.rbfiles. - Add necessary shopify scopes to the
config/settings.rbfile (e.g.read_products, read_orders) - Add necessary shopify webhooks to the
config/settings.rbfile. - Add necessary workers to the
app/jobs/directory (e.g. if you addorders/createwebhook, you should createorders_create_job.rbworker) - For UI and CSS styles read about Polaris or Uptown CSS
Monitoring
There are several monitoring tools: New Relic, Sentry and Mixpanel.
New Relic
Change NEW_RELIC_LICENSE_KEY to your new relic license key in the .env and .env.production files.
Sentry
Change SENTRY_DNS to your sentry dns url in the .env and .env.production files.
Mixpanel
Change MIXPANEL_TOKEN to your mixpanel token in the .env and .env.production files.
You can send an event in this way:
TrackerWorker.perform_async(
shop_domain: "shop_domain",
action: "some action"
options: {some: "option"}
)