MeaI
MeaI logs food by photo or barcode and changes the inventory only when you confirm. It flags recalls as possible and never marks a food safe.
What it does
A photo or a barcode
The photo reader sits behind one interface. When it is not confident, it asks you a question instead of writing a guess into the inventory.
Your inventory, your decision
Only an explicit action from you changes the inventory, even when a recall arrives.
Recalls matched by rule
Two public recall feeds sync on their own cadence. A match needs a brand similarity above 0.4 and a combined score above 0.7.
How a scan is handled
The orange path is a confident scan that matches a recall. Neither branch can write the word safe.
Core responsibilities
Keep the inventory
Logs food by barcode or photo, tracks macro targets and builds shopping lists for one kitchen.
Match recalls, advisory only
Two public recall feeds sync on a schedule. A match is always presented as possible, and it goes to you.
Filter recipes deterministically
Recipes pass an explicit, versioned allowlist and blocklist with whole-word matching. After two attempts, it reports the shortfall.
Hold the thresholds in one place
The recall thresholds and the filter live in one shared package that every part of MeaI imports, so no screen can loosen them.
Ask before it writes
When the photo reader is unsure, the result becomes a question to you rather than a change to the shelf.
MeaI in figures
- 0.7match score before a recall is flagged as possiblea constant in the shared package
- 2public recall feeds, each synced on its own cadencethe recall sync
- 2recipe attempts, then it reports the shortfall instead of retryinga cap in the code
- 80test functions across ten filescounted in the repository
Counted in the repository, read from a run or set in the code. No figure is estimated.
MeaIBuilt
Why it is built this way
Rules in the shared package every part of MeaI imports.
Apply for a seatWhole words, never substrings
The recipe filter matches ingredients as whole words, so “lard” never fires inside “collard”. The allowlist runs first: “mock duck” is cleared before “duck” can block it.
A brand gate before the score
A product whose brand similarity is below 0.4 is dropped before scoring. Without the gate, every product would be scored against every recall.
One cursor per feed
The two recall feeds publish on different schedules, so each keeps its own cursor. A shared cursor would skip records.
The code behind MeaI
Three files from the repository, shown in turn. Select one to read it.
01export const RECALL_SCORE_WEIGHTS = {02 brand: 0.5,03 product: 0.35,04 proximity: 0.15,05} as const;06 07export const RECALL_BRAND_GATE = 0.4;08 09export const RECALL_MATCH_THRESHOLD = 0.7;01export function containsTokenSequence(tokens: string[], entryTokens: string[]): boolean {02 if (entryTokens.length === 0 || tokens.length < entryTokens.length) return false;03 outer: for (let i = 0; i <= tokens.length - entryTokens.length; i++) {04 for (let j = 0; j < entryTokens.length; j++) {05 if (!tokenMatchesEntry(tokens[i + j], entryTokens[j])) continue outer;06 }07 return true;08 }09 return false;10}01export const generatedRecipeSchema = z.object({02 recipe_name: z.string(),03 matching_favorite_ingredients: z.array(z.string()),04 ingredients_needed: z.array(recipeIngredientSchema),05 estimated_macros: z.object({06 calories: z.number(),07 protein_g: z.number(),08 carbs_g: z.number(),09 fat_g: z.number(),10 }),11 steps: z.array(z.string()),12});Bring the workflow that keeps breaking.
Our engineers work through it with you in a free 45-minute briefing.