Find In Store

You, ShopifyGCPNodeJS
Back

One of my projects as a junior developer was to enhance an existing website with the ability to find stock in store.

Photo

This meant learning a whole new tech stack for me, including:

All the information about inventory levels and sales came from Shopify. I learned how to use the Shopify API and GraphQL to retrieve information via webhook.

I wrote some scripts in NodeJS that could use the Shopify webhooks, but I needed to do something with all that data, some method of storing it and interrogating it.

I spun up a MySQL database in GCP to store information collected via webhook in my scripts. I also needed to host my endpoints somewhere they could be reliably reached, so I launched a container in Cloud Run. At this point I had Shopify webhooks reaching my Cloud Run container and using my database. Neat.

All this was fine, but it still wasn't helping people find their products in store. I had to go frontend and make some changes to the existing Shopify theme. Enter Liquid. A new programming language for me, but it's fine, no problem, just take it easy. I wrote some code in the theme to connect a button back to another endpoint in my Cloud Run container and display the results of a database query.

Photo

The next part of this project was to add reporting tools for staff. This was done in Looker Studio. I think of this as a database GUI with cool features. It took a bit of fiddling around to make look good, and now I can confidently use the Looker GUI.

This is a public facing feature that gets frequent use. It relies on data being accurate and up to date. I wrote some scripts in Javascript to ensure the inventory data in MySQL matches that in Shopify.

© Alex Smith.