Gatsby Starter Shopify App screenshot

Gatsby Starter Shopify App

Author Avatar Theme by Gil
Updated: 31 Mar 2019
105 Stars

[Experimental] Serverless Shopify App w/ Gatsby & Firebase

Categories

Overview

This Gatsby starter is a serverless Shopify app built using Firebase hosting and Firebase functions. It allows for authenticated Shopify app access. Please note that this app is not yet production ready and is still under development towards a stable release.

Features

  • Firebase Firestore Realtime DB
  • Serverless Functions API layer using Firebase Functions
  • Admin API (Graphql) Serverless Proxy
  • Shopify Polaris integration (AppProvider, etc.)
  • Application Charge Logic with a variable trial duration
  • Webhook Validation & Creation
  • GDPR Ready (Including GDPR Webhooks)
  • CircleCI Config for easy continuous deployments to Firebase

Installation

To install the Gatsby starter and set it up, follow these steps:

  1. Run yarn or npm install in your terminal to install all dependencies.
  2. Install Firebase CLI globally by running npm i -g firebase-cli.
  3. Login to Firebase by running firebase login in your terminal.
  4. Create a new Firebase project from the Firebase Console.
  5. Create a new file called .env.development in the root of the project and copy the Project ID from the General Settings page in the Firebase Console into the file. Set this value as FIREBASE_PROJECT_ID=.
  6. Register a new Shopify App in your Partners portal and copy the API key.
  7. Set the copied API key as SHOPIFY_APP_API_KEY in the .env.development file.
  8. Generate a new Firebase Admin SDK for Node.js from the Firebase Console. Follow the instructions provided to download a JSON file.
  9. Run firebase login to login and authenticate.
  10. Run firebase init functions and select the project you created in step 4.
  11. Add the required local variables to Firebase config.
  12. In the Firebase Console, navigate to Database and create a Firestore Database with a root collection called “shops”. Add a base document with the specified attributes.
  13. Note that external network access may require a non-free plan such as “Pay-as-you-go” on Firebase, as some Firebase functions make outside requests to the Shopify API.

Summary

The Gatsby Starter Shopify AppCircleCI is a serverless Shopify app built using Firebase hosting and Firebase functions. It includes features such as Firestore Realtime DB, serverless functions API layer, Shopify Polaris integration, application charge logic, and more. This guide provides step-by-step instructions for installing and setting up the Gatsby starter theme.