Case Study · Development

Nutrifax

SaaS nutrition label generation for Canadian cottage food producers. Regulatory compliance at a price that makes sense.

Site
nutrifax.app ↗
Status
Live in production
Disciplines
Full-stack development · Systems architecture · API integration
Stack
Python / FastAPI · React · MySQL · AWS Lightsail · Docker · Stripe API · Claude API · ReportLab
2Government databases
CA + USRegulatory label formats
100%Traceable calculations
3-tierStripe subscription model

The problem

Cottage food producers in Canada are required by law to put accurate, regulatory-format nutrition facts labels on packaged goods. The compliant path — hiring a registered dietitian or sending samples to a commercial lab — can run hundreds of dollars per recipe. And it doesn't scale when recipes change.

Existing tools were either generic nutrition calculators (no regulatory output, no audit trail) or enterprise software built for industrial food manufacturers with budgets to match. Nobody had built for the cottage producer.

What was built

A production SaaS that takes a recipe, maps each ingredient to authoritative government nutrition databases, calculates per-serving nutritional data to regulatory rounding rules, and generates print-ready Nutrition Facts label PDFs in Canadian (bilingual) and US formats.

How it's built

Every number traces back to a source.

The architecture is organised around a single constraint: a calculation isn't trustworthy unless you can show where it came from. That shaped every layer, from the database query path to the PDF on the page.

Dual Database Integration

Health Canada's Canadian Nutrient File and the USDA Standard Reference, normalized into a unified query layer despite meaningfully different data structures.

Health Canada CNF USDA SR

Full Audit Trail

Every ingredient lookup is logged against its source database row, version, and timestamp — the calculation is traceable, not just stored.

Server-Side PDF Generation

Pixel-precise regulatory label layouts using ReportLab, a programmatic layout engine rather than a template filler.

AI-Powered Recipe Import

Paste any recipe from the web and Claude AI parses ingredients and maps them to database entries automatically.

Stripe Billing

A three-tier subscription model — Free, Recipe Pro, Label Pro — with Stripe Checkout and webhook-based state management across all lifecycle events.

Free Recipe Pro Label Pro

Accounts & Recipe Library

Persistent recipe management with per-user data isolation and label history.

Python / FastAPI · React · MySQL · AWS Lightsail · Docker · Stripe API · Claude API · ReportLab.

What this shows

Court-defensible, by design.

The interesting technical challenge here wasn't the PDF generation or the Stripe integration — those are solved problems. It was designing a data system where every calculation is court-defensible. Every number on a Nutrifax label traces back to a specific government database row, with a timestamp. That's a different design constraint than most SaaS applications face, and it shaped every layer of the architecture.

The AI integration is also worth noting. Pasting a recipe URL and having ingredients automatically matched to database entries removes the single biggest friction point for non-technical users — and it works reliably because the matching logic is built around the database structure, not just free-text parsing.

Ω

Building in a regulated space?

Audit trails, traceable calculations, and data systems that hold up under scrutiny — from one practice, end to end.