Why These Count as Two Deployments
Nutrifunction and Blended Functional Medicine are the same client relationship, but they are not the same deployment. Each runs its own independently ported instance of the Vitruvian Labs infrastructure, configured for its specific domain, its specific data types, its specific output requirements. The Nutrifunction side knows food: ingredients, USDA nutrition databases, Shopify product schemas, cost math. The BFM side knows clinical: lab PDF parsing, biomarker ontologies, wellness plan generation, practitioner approval workflows.
Neither deployment could run as the other. They were built separately, configured separately, and serve genuinely different users doing genuinely different work. The fact that they also integrate — BFM wellness plans surfacing Nutrifunction meal products — is a capability demonstration, not a design requirement. Each stands alone. They just happen to make each other more valuable when connected.
The Problem — Two Companies, One Shared Pain
Nutrifunction is a health food business creating and selling meal products. Creating each menu item the old way meant: researching every ingredient in a nutrition database, entering values into a spreadsheet, doing the scaling math by weight, calculating ingredient costs from supplier data, writing the Shopify product description by hand, entering nutrition info manually, tagging dietary filters, setting pricing, and publishing. For a business creating new menu items regularly, that's 2–3 hours per item. Across 100 items, that's 200–300 hours of labor.
Blended Functional Medicine is a functional medicine practice. Their process: a patient uploads bloodwork and genomic test PDFs, the practitioner reviews them manually, then manually writes wellness plans, meal recommendations, and client-facing reports. Every plan is bespoke, every document handled by hand, every recommendation written from scratch.
The Nutrifunction Pipeline — Prompt to Live Product
The workflow starts with a single input: a dish description in plain language. "Chicken parm, single serving." What comes out is a complete business asset ready to publish.
Ingredient Parsing & AI Normalization
The dish description is parsed into a structured ingredient list with gram weights. An AI normalization pass strips preparation language — "sautéed," "diced," "roasted" — and maps each ingredient to a USDA-standard canonical name. "Pan-fried chicken thigh" becomes "Chicken, thigh, cooked" — the form that matches nutrition databases. Confidence scores flag ingredients that need human review.
Multi-Source Nutrition Lookup
Each ingredient is queried against the USDA FoodData Central (FDC) API with a weighted confidence system that prefers more reliable data sources:
If FDC doesn't return a match, the system falls back to FatSecret, then to a local common-foods cache for staple ingredients. Every lookup returns the full micronutrient profile: calories, protein, carbs, fat, fiber, sugar, sodium, potassium, calcium, iron, Vitamin C, Vitamin A, Vitamin D.
Nutrition Math — Per-Gram Scaling & Aggregation
Nutrition values are scaled per gram for each ingredient, then summed across the full dish. Ingredient-level overrides let a chef correct a specific item's data without invalidating the rest of the calculation. The aggregate is stored as an immutable sidecar — every version is preserved with a timestamp and provenance record, so the data is auditable and re-runnable.
Cost & Pricing Calculation
The ingredient registry stores your actual supplier costs per unit. The system calculates total dish cost from ingredient weights × cost-per-gram, then surfaces a suggested sale price based on your target margin. This is the piece that usually lives in a spreadsheet nobody updates — and it's now automatic, accurate, and connected to real supplier data.
One Click → Live Shopify Product
The system has a full Shopify OAuth integration. Install once, authorize, and from that point publishMenuItemToShopify() creates or updates a Shopify product with: title, AI-generated description, complete nutrition data, dietary tags and allergen filters, pricing, and any custom metafields. Rate-limit handling is built in. One review, one click — the product is live on your storefront.
Admin backend + live Shopify storefront
Every number below is real data from the running system. The SOURCE counts show how many USDA FoodData Central data points underpin each macro. The ingredient table shows per-ingredient cost and calorie tracing. This is what structured output looks like when it's done right.
| Raw Input | Normalized (USDA) | G | Cost | Cal |
|---|---|---|---|---|
| Cooked lean steak asada | Cooked lean steak asada | 127 | $3.08 | 267 |
| Steak asada marinade | Steak Asada Marinade | 43 | $0.25 | 23 |
| Cooked rice | Cooked rice | 107 | $0.27 | 139 |
| Fiesta corn | Fiesta Corn | 58 | $0.19 | 46 |
| Black beans | Black beans | 55 | $0.25 | 72 |
| Bell peppers | Bell peppers | 52 | $0.41 | 16 |
| + 9 more ingredients | ||||
The BFM Pipeline — Labs to Wellness Plans
Blended Functional Medicine uses the same core infrastructure to handle a completely different workflow: turning patient lab results into comprehensive wellness plans.
Evidence Ingestion — Lab PDFs & Genomic Reports
A practitioner uploads bloodwork PDFs and genomic testing results for a patient. The system extracts raw text, then passes it through a structured extraction pipeline that identifies biomarkers, reference ranges, flags out-of-range values, and maps them to an internal ontology of health concepts.
Structured Biomarker Analysis
The raw extraction is transformed into structured data: which markers are elevated, which are low, what the clinical context is, what interventions are typically associated with each pattern. The system maintains an ontology of concepts — conditions, nutrients, interventions — that allows it to reason across multiple biomarker patterns simultaneously. Every output is sourced to the specific lab value that drove it.
Wellness Plan Generation
The system generates a multi-section wellness plan: care priorities, nutritional recommendations, supplement suggestions, lifestyle interventions, and meal plan guidance — all sourced to the biomarker data that supports each recommendation. Practitioners review and edit through a dashboard before anything goes to the client. MCP integration means a practitioner can also drive the drafting process through conversational prompts.
The Closed Loop — BFM to Nutrifunction
Meal plan recommendations from BFM map directly to purchasable products in the Nutrifunction catalog. A wellness plan that recommends high-protein, low-glycemic meals can surface specific Nutrifunction items that match those criteria — with nutrition data already verified. The patient receives a wellness plan with clickable meal recommendations. The food commerce business gets qualified, health-motivated buyers. Two companies, one data pipeline, mutual benefit.
The Results
175+ Hours Saved
100 menu items created at 15 minutes each instead of 2–3 hours. That's a conservative estimate of 175 staff hours recovered.
Accurate Nutrition Data
USDA-sourced with confidence scoring by data type. Not "AI-estimated" — traceable to Foundation Foods database entries.
Sourced Wellness Plans
Every BFM recommendation traces back to the specific lab value or biomarker that supports it. Practitioners can stand behind every recommendation.
Cross-Company Revenue Flow
BFM wellness plan recommendations now surface Nutrifunction products directly — creating a qualified purchase path from health consultation to food commerce.
Deploy This for Your Business
This pipeline applies to any business where health data, nutrition, food products, or wellness services intersect. Restaurant groups, meal prep companies, supplement brands, functional medicine practices, dietitian networks, corporate wellness programs — anywhere the gap between "what my client should eat" and "what my business sells" is currently bridged by manual work.