You in Stock? Officeworks Stock Level Checker

Firstly, I'll mention that I'm not the first to build a tool like this and that I got my inspiration from some of the other contributions from the Oz Bargain community. I basically built it as a way to learn a new frontend framework that I was interested in and in the process built a tool that I thought I would gift to the community.

As some of you may or may not be aware, Officeworks have some useful APIs that they use for their website and that has allowed me to build a detailed nation wide stock level checker for any of their products. You simply copy the product's URL into the search field and select the state you are interested in and it'll let you know the stock levels for all of their stores. You can also generate a shareable link that will link directly to the product's stock levels.

https://officeworks.youinstock.com.au/

Keeping in the spirit of Oz Bargain, I've managed to host this with little to no ongoing costs. The biggest expense would probably be the domain name registration which is around $15 a year. I'm interest in seeing how much it would end up costing with moderate to heavy traffic on the site. For those interested and technical minded, happy to go into the details of how I achieved the low running cost.

Feel free to use it and share it around, would also love to hear your feedback and suggestions around it.

My next challenge would be to look at building something similar for Bunnings and some of the other local retailers.

Related Stores

youinstock.com.au
youinstock.com.au
Third-Party
Officeworks
Officeworks

Comments

  • +1

    Nice work, switch the domain to Cloudflare which charges at-cost renewal only and enables their great services (basic ones for free) which will be handy as the website grows. IONOS offer USD 0.5/month unlimited storage and bandwidth plans but are a bit of a pain to use, works fine though.

    • +1

      Nice tip, I'll definitely check that out. I generally use Ventra IP as I have my other domains with them, they provide you with good control and reasonable pricing. I do need to look a bit deeper into Cloudfare's services and their free tiers as they look really compelling. Thanks for the tip!

    • +1

      I built the frontend of the website using Angular so I use Netlify for the static hosting. They have a very generous free tier and are really easy to use as well as being feature rich. You also get 300 build minutes a month so you can have your CI pipeline integrated into it as well. I use a git commit trigger for it so whenever I make a commit it automatically builds and deploys it to the live site. They are really good, would definitely recommend them. In the past I would host static sites on AWS S3 buckets, but I've found it so cumbersome to set up. Netlify make everything so easy as well as free auto renew SSL certs.

      Because you can't directly call the Officework's APIs directly from the frontend, I have a .NET core app that I use as a proxy and I host that on AWS lambda which is dirt cheap to run and has no fixed running costs. It'll be interesting to see if it goes over their free tier with a bit of traffic.

  • +1

    Very helpful, thanks for sharing.

  • Brilliant work, looks like a job well done. Will definitely use this!

    Gonna hijack this because I know nothing about software dev and had some ideas today that I'd love input on / to collaborate on. An app where people scan barcodes / price tags to build a crowd-sourced database of Aldi prices so people can compare to Colesworth to try and save as much cash as possible. In an ideal world, could be built to do direct comparisons to comparable products between the stores.

    Some guy made this list a few years ago but it was completely manual! https://www.ozbargain.com.au/node/453569

    • Thanks Doy.

      It sounds like that would be really useful, I also find it frustrating that Aldi don't list their prices online. It's difficult when you don't have an available data-source for the information. If you could get enough people involved to input the product and price list data then it could definitely be used as a comparison tool. I think the key would be to try and collect as much meta data as possible so that the product matching is as close as possible :)

  • What the difference between this and nrby.in?

    • +1

      Not all too much to be honest, other than the way the data is displayed and can be ordered, we both use the same data. This was just my particular take on it :)

  • Nice one! What language did you script this in?

    • Thanks moo, the frontend was developed using Angular and the backend was developed using .NET core. I used a combination of Netlify and AWS Lambda for hosting.

  • How did you reverse engineer the API? Just looking at the website requests or did you MITM on the mobile app or something else?

    • So yeah, I basically just monitored the Officework website's requests and was able to get all the information needed using the API's that the website uses. I wasn't able to directly make those calls through the frontend as there are some CORS policies which restrict which origins can accept the requests and browsers enforce this. So the way around that was to build a proxy and host that myself.

      Here is an example of one of those calls:
      https://www.officeworks.com.au/catalogue-app/api/stores

      • Cool - I'm always looking for new ways to reverse engineer this stuff.

      • any tips on how a beginner can get started learning about this stuff?

        • I would probably start by getting familiar with the browser's developer tools. Pretty much every browser has them and you can access it by hitting the F12 key.

          Once the developer tools pop up, go to the Network tab and then filter the list by Fetch/XHR. This will show you all the API calls being made by the web page and generally the data returned will be in a format that is easily consumed by any service. This is where I usually start and can paint a really good picture of what data is available and how you can utilise it.

          Developer tools example:
          https://imgur.com/a/46v4T21

  • Excellent. Nice clean simple design.
    So helpful for these times with their random store availability and no options to buy online or collect in store.
    Thank you.

  • I use this one

  • Nice.

    Being pedantic. Canberra isn't a state, it's the Australian Capital Territory (well, even still it's not a state but close enough)

    • Yep, you are right on both those fronts. Updated it now ;)

      Thanks for letting me know, that slipped past me.

  • Awesome work, Thanks OP!
    Can't wait when there is a tool for JB hifi, TGG, WW etc as well. Cheers.

  • ditto. Kmart too @TanedaR

  • Great site, I use it all the time. Thanks

  • Awesome, thanks! While I don't use Officeworks much, I saved a bookmark of it and I think it will definitely be useful for me in future. I even emailed it to my sister, in case she wants to check it out.
    Thanks very much! Good luck with the site!

Login or Join to leave a comment