I’m an active member of a local SCA branch. The SCA is a registered non-profit and its branches are much like local chapters, so that non-profit status is inherited. Most SCA branches own some amount of movable property – kitchen equipment, tents & pavilions, wall hangings & other decor, and maybe even a trailer to store and haul it all. Where there’s property, there’s an Inventory!
Taking Inventory the Old Way
In 2019, I attended a “taking inventory” session, where the branch’s property inventory records are compared against the actual items, and the records are adjusted to match (and in some cases, items that went into the wrong numbered box are put where they belong). At that time, the inventory records were captured in a spreadsheet file, with one sheet for every box, plus some sheets for “loose items” and items that are being stored by individuals for reasons of easy access or because they can’t be safely stored in the trailer.
One individual was designated to amend the spreadsheet sheets on the fly, in spite of having paper lists printed out for every box or location. It was torturous, and the general mood was that of rushing to get it done because of that bottleneck. I started marking down notes on the printed sheets, and I also took a bunch of photos (none existed).
Packing Up the Old Way
A few months later, I participated in an event (that’s what the stuff in the trailer is used for!) and helped out with the task of putting everything back into the right box so it would all fit back into the trailer. That consisted largely of guessing which box might be the right one, and visually examining the printed inventory sheet for it to confirm. If you didn’t guess right the first time, check a different box! It took a long time and was very chaotic.
There’s Gotta Be a Better Way!
After that, I was determined to find a better way to manage the branch’s property. I looked at a few self-hosted options, but none of them really fit – they were all too complicated. And so, I decided that I’d see if I could come up with a simpler web app that would meet my local branch’s specific needs and make both inventory and event pack-out a better experience.
Initially, I figured I would use PHP and MySQL to accomplish this, as I had prior experience with both. However, at one point I decided to follow a tutorial to see if I could learn how to use the Django framework. It took me a minute to grok the structure, but yeah, I got it!
I checked in my first git commit of the project on September 10, 2020. By the beginning of October, I was able to generate a full set of nicely formatted PDF documents – a full item listing, a document for each box, and a list of boxes sorted both A-Z and numerically. I exported the data in csv and spreadsheet format for backup purposes. I had also given it a name – Mobiliaire.
In October 2020, I accomplished a bunch of tasks:
- put a demo version online
- implement a simple search function
- started adding support for images
- started adding support for capturing images using a RaspberryPi + PiCamera
- Released versions 1.0 and 1.0.1
At that point, I had an app that more-or-less worked, but nowhere to take it. My attention went elsewhere and I didn’t do much else with it until July 2021.
Support for More Cameras
In July 2021, I worked out how the app could support most USB webcams, added the code for that, and started planning to abandon a Raspberry Pi-specific fork I’d done (because the ‘picamera’ Python package will scream if you try to install it on not-a-RasPi; plus a few other differences).
Instances for Other Inventories
The app turned out to be flexible enough to be used for managing other kinds of inventory. My spouse has a large collectibles collection documented in an instance of the app. I also used another instance to catalog my fabric stash and sewing patterns. Those happened in September 2021. A good thing came of the collectibles inventory – I was asked to add “edit buttons” to the gallery and reports pages, which I did, for that instance.
Event Sighted Ahead!!
An event was scheduled for April 23, 2022. It would be the first event since Jan 2020. I put my focus in high gear and stuck my head back in a Terminal window sometime around April 6th. I put in over 17 hours of work between April 12 and 23rd. (No data for 6-12 April because I didn’t install Wakatime right away, but I was putting in hours nonetheless)
- I pulled those “edit buttons” over to the main repository and made them optional.
- I finished rolling the webcam stuff back into the main repo so I could sunset the RasPi fork
- I released version 1.1 and 1.2, and created a 1.x maintenance branch for Django 3
- I upgraded to Django 4 and pulled opencv-python to 4.5.5.x
- I made a lot of cosmetic changes to the front-end, including standardizing the gallery cards
- If there’s no camera but the optional “photo contact email” constant has been defined, a modal will display info on how to submit a photo by email
- I finally deployed an instance on a Raspberry Pi with Apache2 and MySql (previously had only been running on the built-in dev server)
- I got a bit distracted and fiddled with setting up CI in the repository
- I then broke that instance by adding a “settings” directory in the project settings folder (oops)
- It’s okay though – I fixed it!
- I did dress rehearsals the Saturday and Wednesday prior – brought the RasPi, a configured wifi router, and a Chromebook with me to practice and set it up (and showed it to people)
Event Day went pretty well! Early in the day other staff members learned that it was a quick way to learn where a particular tool was stored. Not a single paper list was consulted during re-pack. We were done and ready to close up an hour and a half after the event closed. In the past that could be 9 or 10pm.
Inventory Day is next up. Not scheduled yet, but hopefully, they give me some time – there’s a mechanism for reporting inventory checks, but it’s not optimal. I need to build the front-end features that make it possible to scroll through a box’s list of items and click checkboxes for each item seen, then click a “submit” button when done.
At that point, it will be possible, given the availability of multiple notebook computers or tablets, to run multiple teams at once. Each team grabs a box, checks the contents, makes notes, submits the form, repacks the box, marks the physical box as “done”, and grabs another box.
This upcoming inventory day is going to be a bit more complicated, though – we also need to photograph most of the items. We need individual photos, or in the case of multiples, a photo of the multiples all together. These photos are important because they are an integral part of the process of repacking. A visual confirmation that the item in your hand is the item in the search results is needed (some similar items can be found in more than one box due to the need to play Tetris and make everything fit).
The last piece will be to label everything that can be without being obvious to guests, preferably via marker or etching. Because Django is Django, the URLs are RESTful, so any Item can be viewed by appending its ID to the end of the items url.
You Made it This Far, and You Still Want One?
You can git clone it from the Mobiliaire repository on Gitlab and give it a spin. Check the Wiki there for some more detailed setup instructions. If you get stuck, please submit an Issue so I’ll know I need to refine the documentation.
What was that About Woods?
Oh, right, the Woods. With a machine loaded up with Mobiliaire + local (vendored) bootstrap, JQuery, and DataTables libraries + an optional wireless router, your event staff can have access to the inventory system independent of whether the event site has Internet access, and independent of whether there’s even good cell phone signal at the event site. All you need from the event site is a working power outlet to plug your gadgets into. Or a generator. Whatever, I don’t know your life.
The database is incredibly easy to transfer from instance to instance with Django’s ‘loaddata’ and ‘dumpdata’ functions. The resulting files make excellent backups.
Image: “Rhuddlan Castle” by Jeff Buck is marked with CC BY-SA 2.0.