Nutrition Labels
Nutrition Labels generates a printable, FSSAI-style Nutrition Facts label for any recipe — energy, protein, carbs, fat, fibre and sodium per 100g (and per serving if you set one), plus allergen information and a computed best-before date.
Overview
Pick a recipe from the searchable list on the left; its label renders live on the right using the nutrition values, allergen list and shelf-life recorded against that recipe on the Recipes page.
Every value on the label is calculated from the recipe's per-100g nutrition figures — if you enter a serving size, a second "Per Serving" column is scaled automatically (serving size ÷ 100 × the per-100g value).
If the recipe has a shelf life (in days) recorded and you set a batch/production date, the label automatically prints a Best Before date (production date + shelf-life days).
This page is purely a label generator — it never edits the recipe itself. All the data it prints (nutrition figures, allergens, shelf life) is entered and maintained on the Recipes page.
Before You Start
- Requires the Advanced plan tier or above; below Advanced, Nutrition Labels is hidden from the Bakery sidebar entirely.
- A recipe must have its Nutrition fields (calories, protein, carbs, sugars, fat, saturated fat, fibre, sodium) filled in on the Recipes page for the label to show real numbers instead of dashes.
- Allergens and Shelf Life Days are also set on the Recipes page — Nutrition Labels only reads and displays them.
Step-by-Step Guide
1 Print a nutrition label for a recipe
- Use the Search recipes… box to find the recipe, then click it in the list to select it.
- Optionally enter a Serving size and its Unit (g / ml / piece / slice) to add a "Per Serving" column to the label.
- Set the Batch / production date (defaults to today) — this is what the Best Before date is calculated from, if the recipe has a shelf life set.
- Set Copies to print if you need more than one label.
- Click Print label (or "Print N labels") to open your browser's print dialog with only the label(s) visible on the page.
2 Understand what is printed on the label
- The label header shows "Nutrition Facts" and the recipe name, followed by the serving size line (if one was entered) and a Per 100g / Per Serving table.
- Rows cover Energy, Protein, Total Carbohydrate (with Sugars indented underneath), Total Fat (with Saturated Fat indented underneath), Dietary Fibre and Sodium.
- If the recipe has allergens recorded, an "ALLERGEN INFORMATION" box lists them by their FSSAI-friendly name (e.g. "Milk & Dairy" instead of the internal code DAIRY) plus a standard "may contain traces" disclaimer.
- The footer always shows a "% Daily Values based on 2000 kcal" note and an FSSAI compliance line, plus the calculated Best Before date when applicable.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Search recipes… | Filters the recipe picker list by name as you type. |
Recipe list | Click a recipe to select it and generate its label preview; the selected recipe is highlighted. |
Serving size | Optional numeric serving size; when set, adds a scaled "Per Serving" column next to the "Per 100g" column. |
Unit | Unit for the serving size — g, ml, piece or slice. |
Batch / production date | The date the batch was made; combined with the recipe's Shelf Life Days to compute the Best Before date shown on the label. Defaults to today. |
Copies to print | How many labels you intend to print (1–100); only the first 4 are actually rendered/printed per click — see the note above. |
Print label / Print N labels | Opens the browser print dialog with only the rendered label(s) visible; nothing else on the page prints. |
Nutrition Facts table | Energy, Protein, Total Carbohydrate (+ Sugars), Total Fat (+ Saturated Fat), Dietary Fibre, Sodium — shown per 100g and, if a serving size is set, per serving. |
ALLERGEN INFORMATION box | Only appears if the recipe has allergens recorded; lists each allergen by its FSSAI-style name plus a "may contain traces" disclaimer. |
Best Before line | Only appears if the recipe has a Shelf Life Days value greater than zero and a batch date is set. |
Tips & Best Practices
- Fill in the recipe's Nutrition, Allergens and Shelf Life Days fields on the Recipes page first — this page only displays what is already recorded there.
- Set a Serving size that matches your actual retail pack (e.g. one slice, one cupcake) so the Per Serving column is meaningful to customers, not just the Per 100g figure.
- If you need more than 4 copies of a label, print in batches — set Copies to 4 (or fewer) and print again for the remainder.
Troubleshooting & FAQ
All the nutrition rows show "—" for a recipe.
No allergen box appears on the label.
Best Before date is missing from the label.
I set Copies to 10 but only 4 labels came out.
The Per Serving column isn't showing.
🧑💻 Developer Notes
Source component(s):
frontend-app/packages/pos-react-lib/src/pages/fnb/NutritionLabelPage.jsx
Backend endpoints used:
GET /recipes
Related tables (db-core repositories):
Recipe
Feature flag key: nutrition_labels (requires advanced plan tier or above)
This page is entirely read-only against the backend — it fetches GET /recipes once and does all label math (per-serving scaling, best-before date, allergen name mapping) client-side; nothing is ever written back. Printing works by injecting a temporary @media print stylesheet that hides everything except #nutrition-print-area, then calling window.print() and removing the injected style. The label preview renders at most Math.min(copies, 4) copies via Array.from({ length: Math.min(copies, 4) }), which is also therefore the hard cap on what a single print action produces.