campcooking - a recipe builder for camps


Christian holiday camps that I've been part of in the past often have to cater for a large number of people, each of whom have a different set of food allergies and intolerances. As a result, before each camp somebody needs to work out a full recipe book, including substitutions for the main recipes. This takes a very long time, but could be largely automated by a simple program.

This program would, for a given set of people with dietary restrictions and a given recipe, allow a set of recipes to be constructed that could cater for everyone. These recipes should be as close to each other as possible, so that everyone has nearly the same food. The number of recipes should also be minimised to save cooking effort.

The simplest possible version of this will simply highlight which ingredients in the main recipe require substituting. More advanced versions could consider substitution suggestions, calculations to scale quantities, and calculating a procedure to share common elements between the recipes, saving effort.

I could see this more advanced web application being a possible startup idea, since this would add value in food preparation contexts such as camps and schools where the same people are often served.

The MVP requires a recipe builder library that can perform the necessary calculation, alongside some sort of front end to run the script. This could look like a simple web API, or alternatively JSON or CSV processing script. The currently open problems are:

a recipe representation

This could take the form of a reduced recipe. This could be encoded as a Pydantic model, and represented in a database through an ORM such as sqlalchemy.

an allergen representation

This would specify which number of people have which allergens.

a map of ingredients to allergens

This maps ingredients, such as "apple", to the allergen food group, e.g. "fruit". Needless to say, this should be based on open data. If sufficiently complete, it would allow a trivial search through the recipe ingredients to determine which allergens are present. However, the problem is non-trivial due to ingredients that themselves have sub-ingredients; for example, "apple sauce" contains "apple", and is therefore in allergen food group "fruit".

Unfortunately an open database for this doesn't seem to exist, or at least it's not easy to find. The most relevant is this open dataset on food allergens, but it's Swiss and not particularly complete. This StackOverflow post searching for some open data didn't recieve a satisfactory response.

Some databases exist which go really deep into allergen protein structures, but are not really useful to this project, e.g.

Several proprietary offerings exist, including:

A good first step would be building this map out.

Articles from blogs I read

Porting Helios to aarch64 for my FOSDEM talk, part one

Helios is a microkernel written in the Hare programming language, and the subject of a talk I did at FOSDEM earlier this month. You can watch the talk here if you like: A while ago I promised someone that I would not do any talks on Helios until I could preseā€¦

via Drew DeVault's blog February 20, 2023

Personal Knowledge Management: my current approach

My history with personal knowledge management, an overview of my current system, and my thoughts on potential additional use cases.

via Josh Smailes February 12, 2023

AIs galore

2022 was an amazing year for AIs.

via Not Just Serendipity December 27, 2022

Generated by openring