← All projects

Live

StockSnap

A stocktaking app where staff scan barcodes with their phone cameras and managers review the counts and export them as CSV.

A screenshot from the StockSnap website

The problem

We needed to do stocktakes at Royal Hats, and I wanted a system where several people could count at the same time, using nothing more than their phones.

What I built

StockSnap is a stocktaking platform for businesses.

  • Multiple people can use their phones to scan barcodes with the camera.
  • Each person’s count is shared to Firebase and stored in the stocktake record.
  • Managers can run multiple rounds of stocktaking, with corrections between them.
  • Scanners join a stocktake with an access code from their manager, so nobody needs to create an account.
  • Managers can see what each individual scanner scanned.
  • Managers can add a list of valid barcodes, and scanned codes are checked against it.
  • Managers can view overall stock.
  • Stock can be exported as CSV files, which can be used to update stock in software such as Sage Pastel.

How it works

StockSnap is built with Next.js and deployed with Firebase Hosting. I’m planning to move it to Vercel.

Every user’s count goes into the same stocktake record in Firebase. That is what lets several people count together, and lets managers go back over the results for another round or a correction.

The hardest part

Two things were tricky: getting barcodes to scan correctly, and handling user permissions.

Scanning correctly. To catch bad reads, I added a system where managers can upload a list of accepted, valid barcodes. Each scanned code is checked against that list.

Permissions. The people scanning needed access to the stocktake without having to create accounts. I came up with an access code system: scanners visit stocksnap.co.za/scan, and the manager gives them an access code. Because each scanner is identified by their code, managers can also see which scanner scanned what.