Case study · Agriculture / animal feed manufacturing
FarmGate Nutrition
A full-traceability inventory, formulation and sales system for a UK animal feed business — tracking every batch from lorry to blend to sale, with FEFO rotation, nested recipes and a change log on every record.
Team
Augmented Tech Labs
Focus
Traceability &
transactional integrity
Stack
React · NestJS
MySQL
Industry
Agriculture / animal
feed manufacturing
Traceable
UFAS number, haulier, vehicle registration and delivery note captured on every batch.
Auto-FEFO
Batches are automatically offered for use in expiry-date order across every recipe.
Nested recipes
An ingredient can be a raw batch or another recipe, with live cost roll-up in £/Kg and £/Tonne.
Transactional
Every multi-step inventory change runs inside a database transaction with full rollback.
The problem
Feed formulation isn't a flat bill of materials — recipes can be built from other recipes, and every gram sold has to trace back to a specific batch, haulier and delivery note.
The system needed to deduct stock safely across purchases, nested recipes and sales in a single transaction, enforce FEFO rotation automatically, and keep a full audit trail without slowing down daily goods-in and goods-out.
What it does
Batch traceability
Full feed-assurance fields — UFAS number, haulier, vehicle, delivery note — on every batch.
FEFO rotation
Batches are automatically offered for use in expiry-date order across every recipe.
Nested recipe formulation
Recipes blend raw batches or other recipes, with live cost roll-up recalculated at every level.
Sales & dashboard
A combined product/recipe sales flow with stock valuation, low-stock alerts and top-seller charts.
Excel reporting via S3
Date-range reports generated server-side and delivered securely through S3.
Change-log audit trail
Every create, edit and ingredient change writes to a dedicated history table.
My role
TODO: add your role summary for FarmGate here.
- • TODO: contribution bullet
- • TODO: contribution bullet
- • TODO: contribution bullet
Key decisions
Transactions from day one
Every multi-step inventory change was wrapped in a database transaction from the start — non-negotiable once stock deduction touches purchases, recipes and sales at the same time, since a partial failure could silently corrupt stock levels.
Recipes that reference recipes
Feed blends are rarely a flat list of raw ingredients — the formulation engine lets a recipe consume raw batches or other recipes, recalculating cost per Kg and per Tonne automatically at every nesting level rather than requiring manual re-entry.
FEFO enforced by the system, not by staff memory
Rather than relying on warehouse staff to manually pick the right batch, the system automatically offers batches for use in expiry-date order across every recipe — removing a common source of feed waste from expired stock.
Outcome
FarmGate Nutrition gives the business one system that tracks raw material from delivery through blending to sale — with FEFO rotation, nested-recipe cost roll-up and a transactional core that keeps every stock movement accurate and auditable.
Let's talk about your project