Inspiration
Working with many Shopify clients, sometimes there are high-demand product launches where we need to monitor stock levels. It's not always easy to keep an eye on your inventory, as Shopify does not offer this feature by default. Inventory Buddy makes sure Shopify store owners will be alerted when inventory levels drop below acceptable levels so that they can act quickly to ensure customers get the products they need.
What it does
Inventory Buddy continuously monitors your Shopify store to make sure products are well-stocked. You can specify a minimum stock level, and when inventory reaches this amount, an SMS and email will be sent to alert the store owner. It's a very simple app that solves a clear purpose: keeping online store owners aware of what is going on in their store.
How we built it
Inventory Buddy was written in Go. It uses the following packages & libraries:
Conversio Shopify Go Library https://github.com/bold-commerce/go-shopify This allows us to easily use the Shopify API to monitor product inventory levels.
SMTP Package The built-in net/smtp package is used to send email alerts. I'm also using MailTrap's service for testing.
Twilio for Go https://github.com/twilio/twilio-go This app uses Twilio's official Go package to send SMS alerts using Twilio's API.
By integrating all of these great packages into a single app, Inventory Buddy works fast and efficiently to provide an easy-to-use experience.
Challenges we ran into
This was my first Go project, so I had to take time to familiarize myself with the language and how it all works. I knew I wanted to create a project that makes several APIs work together, and Go made this process as smooth as possible.
I followed a Go tutorial that had me develop a news API app first. I then took this app template and heavily modified it to accomplish the goals I had in mind for Inventory Buddy.
Accomplishments that we're proud of
I'm proud of being able to launch my first Go project with the goal of providing something of value. I think Inventory Buddy accomplishes this by empowering Shopify store owners with extra oversight when it comes to running their stores.
How to run
To run this project locally, you will need to configure the .env file with the follow:
Mailtrap user/pass, which you can get here: https://mailtrap.io/ Twilio API credentials: https://www.twilio.com/docs/iam/credentials/api
Additionally, you will need to enter your Shopify access token, which can be obtained here: https://shopify.dev/apps/auth/admin-app-access-tokens
Finally, the Variant ID of the product you'd like to monitor will also be needed. This can be found by following this brief instruction: https://help.shopify.com/en/manual/products/variants/find-variant-id
Navigate to the project directory, and run the following command: go run main.go The project will now be running at http://localhost:3000/
What's next for Inventory Buddy
Because this is just a proof of concept, it is a very simple app that only monitors one product at a time. I'd like to make it a bit easier to use, and perhaps a command-line only version that allows for multiple products to be monitored. I'd also like to make it easier to automatically detect Shopify variant IDs by simply logging into your Shopify store. I'm excited to work on this next!
Log in or sign up for Devpost to join the conversation.