Allergen checker
A small system that holds allergen declarations against ingredients, rolls them up to dishes, catches supplier specification changes, and flags substitutions. It never declares anything safe. What it produces is an accurate, current, dated statement of what is declared and what is unknown, so that the conversation between a customer and a member of staff is based on something real. Seven posts on the same system, one diagram at a time, with a cost breakdown and an engineering reference at the end.
- 01
An allergen checker on AWS for a few dollars a month
The whole system on one page — declare, roll up, watch — and the deliberate refusal to produce a safety verdict.
- 02
How an ingredient declares what it contains
Why three states are required, how may-contain is handled, compound ingredients and their nested declarations, and how a dish-level statement is assembled.
- 03
What happens when a supplier changes a recipe
How reformulations happen without any visible signal, why specifications must be stored and compared, how specification age is handled, and what the flag does.
- 04
Why the system never says safe
What a data system genuinely cannot know, why a green tick is the wrong output, how the information supports a conversation, and what the interface should show.
- 05
How a substitution gets caught
How substitutions arise, why they are the second largest risk, how they are recorded at receipt, and what the pre-service check looks like.
- 06
What the allergen checker costs
About $202 a month. One Bedrock read per ingredient is the only line that grows; the queue, the table, the mail and the storage are rounding errors. Plus the three ways the bill could surprise you.
- 07
Engineering reference: the allergen checker architecture
Same system, drawn purely for engineers. Service names, region, Lambda inventory, IAM scopes, the schemas and the exact model id.
Frequently asked questions
- What is an allergen checker?
- A small serverless system that stores allergen declarations against ingredients, rolls them up to dishes, and flags when a supplier specification or a substitution changes what a dish contains.
- Does it say whether a dish is safe?
- No, and that is the most important design decision in it. It reports what is declared and what is unknown. Safety involves cross-contamination and judgement that no data can capture.
- What is the biggest real-world risk?
- A supplier reformulating an ingredient without anybody noticing. The recipe did not change, the dish did, and there is no event in most systems that catches it.
- How does it treat unknown ingredients?
- As unknown, prominently, and never as absent. An ingredient with no current specification makes every dish containing it incomplete rather than clear.
- What does it cost to run?
- A couple of dollars a month. See part six.