Home

Awesome

React Shopify app

A full-featured React/Rails base app for building a Shopify app. Used and maintained by Plug in SEO, a top-rated Shopify app with 100k users.

Features

Why use it?

You'll have a production ready React Shopify app in no time at all! Focus on just building the features that'll get people to pay for your app.

Why not to use?

If you want a minimal, lightweight boilerplate this is not the project you're looking for. Its aim is to support all of the pieces needed for most Shopify apps: copy, paste, configure, deploy.

But you might want to look at using just the common and common frontend package / gem instead. Or going through the code here and taking just the bits you want (with the MIT license you can do pretty much anything).

Architecture

The common and common frontend repos contain functionality shared across all of our apps. Things that are only used by one app, stuff that doesn't make sense to have in common, and config lives in this repo.

When building a new app, simply copy this repo and then configure it.

Apps reference a specific release of common and common-frontend, making sure we can safely update new versions without breaking the others or forcing us to upgrade all of them at once.

Getting started

Pull down the repo and create a copy. The bits you need to configure can generally be found by doing a search for 'TODO'.

Here are the files you need to edit to get your development environment going:

Then:

Navigate to localhost:8080 and you should see the static website homepage. Try to sign up to test the React app and Rails API.

Getting it production ready

We run staging and production environments, so you'll see code related to this. But you can go straight to production if you wish to only have one environment.

Double check these bits (you might have already edited them during dev):

Then set up your configuration for the environments:

Installing SSL Certificates

Install certbot on remote server using next commands:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx

Then obtain SSL certificates on local machine using (this can take a while due to strong DH param generation):

bundle exec cap production ssl:setup

Certificates will renew automatically.

Deploying

bundle exec cap staging deploy deploys master to staging