npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mfp-flavor-engine

v1.1.0

Published

Mathematical Flavor Profile (MFP) Architecture Engine — 20-dimensional culinary intelligence

Downloads

209

Readme

MFP — Mathematical Flavor Profile Engine

Deterministic, auditable flavor intelligence in 20 dimensions

CI License: MIT

Overview

MFP (Mathematical Flavor Profile) is a computational engine for analyzing and optimizing recipes using a 20-dimensional flavor space. It provides deterministic, auditable scoring of dishes against cuisine-specific targets, along with actionable recommendations for improvement.

Features

  • 20-dimensional flavor space — UMAMI, SALT, SWEET, SOUR, BITTER, HEAT_PEPPER, WARM_SPICE, SMOKE, ROASTED, FAT_RICH, CREAMY, HERBAL, CITRUS, ALLIUM, FERMENT, EARTHY, NUTTY, FLORAL, TEXTURE_CRISP, TEXTURE_TENDER
  • Role-based normalization — PRIMARY / SUPPORT / FINISH categories with dish-type-specific constants
  • Method kernels — 12 cooking methods with heat/volatility transforms (GRILL, ROAST, SAUTE, etc.)
  • Scoring system — Similarity, balance, structural coverage, clash penalty with weighted final formula
  • Recommendations — Add-ins, fixes, substitutions, method adjustments
  • Cultural libraries — AA Foodways (Midwest + Gulf States), with more to come

Packages

| Package | Description | |---------|-------------| | @studio46/mfp-core | Types, math primitives, and scoring algorithms | | @studio46/mfp-data | Ingredient libraries and cuisine style targets | | @studio46/mfp-engine | Complete MFP engine with recommendations |

Installation

npm install @studio46/mfp-engine

Or install individual packages:

npm install @studio46/mfp-core @studio46/mfp-data

Quick Start

import {
  runMFPEngine,
  getIngredient,
  CookingMethod,
  DishType,
} from '@studio46/mfp-engine';

const result = runMFPEngine({
  ingredients: [
    { card: getIngredient("chicken_breast"), quantity: 200 },
    { card: getIngredient("garlic"), quantity: 10 },
    { card: getIngredient("olive_oil"), quantity: 30 },
    { card: getIngredient("lemon_juice"), quantity: 15 },
    { card: getIngredient("basil"), quantity: 8 },
  ],
  method: CookingMethod.SAUTE,
  heatLevel: 0.7,
  dishType: DishType.COMPLETE_PLATE,
  styleTargetId: "italian",
});

console.log("Final Score:", result.scored.score.toFixed(2));
console.log("Components:", result.scored.components);
console.log("Top Recommendations:", result.recommendations.slice(0, 3));

Style Targets

| ID | Name | Characteristics | |----|------|-----------------| | italian | Italian (Classic) | Umami, herbal, allium, fat-rich | | japanese | Japanese (Washoku) | Umami, ferment, delicate | | mexican | Mexican (Traditional) | Heat, citrus, earthy | | thai | Thai | Sweet-sour-heat balance | | french | French (Classic) | Fat, cream, roasted | | indian | Indian (North) | Warm spice, heat, allium | | bbq | American BBQ | Smoke, sweet, fat, tender | | mediterranean | Mediterranean | Herbal, citrus, olive oil | | soul_food | Soul Food (AA Core) | Smoke, bitter greens, fat, tender | | gulf_creole | Gulf Creole (Louisiana) | Heat, roux, seafood, allium |

Scoring Formula

Score = 0.45×S_sim + 0.35×S_bal + 0.20×S_struct - 0.40×P_clash

Where:
  S_sim    = cosine similarity to target profile
  S_bal    = weighted balance score
  S_struct = structural role coverage
  P_clash  = ingredient class clash penalty

Calibration Status

Ingredient vectors have calibration status indicators:

| Status | Meaning | Count | |--------|---------|-------| | A | Sensory-validated (blind tasting) | 0 | | B | Database-grounded | ~37 | | C | Prior estimate (needs calibration) | ~100 |

Documentation

Development

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run tests
pnpm test

# Type check
pnpm typecheck

License

MIT © Studio46-Go