Time for a beer
I need to jump out of the code vortex into the abyss of admin. But first, a brief review.
It’s approaching 9:30 on Thursday evening - on almost the longest day of the year. Time for a beer. It looks like it has been a couple of months since my last rambling post - I must have been busy. This week I had another play with React as I thought it might be useful for my half-baked idea Quesadilla - an ingredients database. It’s not a new or original idea, but seems to be something missing from the Open Data world. I’ve built a food menu system before where say a pub or café owner could create a set of dishes and then attach them to a menu with prices. The items on the menu would be dishes that could have all their ingredients attached. Each complex ingredient would itself have ingredients, and as each individual ingredient could be tagged with matching allergens, the resulting menu would be automatically tagged with allergens too.
I decided to use a spare domain I had lying around, quesadilla.co.uk, as somewhere to work on a version of this idea. I have a couple of other projects on the go that could benefit from this sort of menu system, but the thing that’s been holding me back from pushing it, is the idea of starting with an empty system each time. Ingredients don’t really change. Each user of the system might use a different set of ingredients, but they’ll all want generic things like salt, pepper, butter, water, lemons, flour and so on. Then there’s the issue of looking up the ingredients of ingredients eg Mayonnaise or Sriracha.
Addressing this specific issue was what I thought React might help with. I got close to nailing it, but learning the finer ideosyncronies eg calling data from one domain to another was taking too long. It was good to push my understanding of React up a notch, but switching to more familiar ground sped things up and I now have something working.
One of the handful of systems that I thought I might be able to use as a data source for ingredients of processed food, brand-name condiments etc is https://uk.openfoodfacts.org/. I like the mission these guys have given themselves, but relying on Joe Public to scan barcodes and list ingredients is a surefire way to create unreliable, non-uniform data.
My mission is different. The user I’m targeting is ‘small food business’. The environmental footprint of packaging and transport is secondary to simply knowing all of the ingredients in a dish.
I think I’ve come up with a smart-arse option. The Quesadilla website is now a kind of master uber central core system, and users of any of my other projects can now skip the process of seeding their own ingredients and go straight to creating dishes. Once a dish has been added to the system, ingredients can be selected from Quesadilla as if it was already local data. If an ingredient isn’t there it can be added to loca data without needing to be added to the core.
My head has been too full of this to know if this sounds simple or complicated - but it definitely offers and way to avoid any of my clients having to start from scratch.
I quite like the API system that I’ve ended up with while working on this, and think I might expand it. The next obvious component might be dishes themselves. Maybe not. Anyway - time to switch to admin mode.