For AI agents: the complete documentation index is available at https://mfeflow.github.io/mfeflow/llms.txt, the full documentation bundle is available at https://mfeflow.github.io/mfeflow/llms-full.txt, and this page is available as Markdown at https://mfeflow.github.io/mfeflow/reference/mfeflow-json.md.

mfeflow.json reference

This page lists every field of mfeflow.json at the root of a project. The CLI writes and updates it. You edit only budget and registries by hand. For the concept, see Project structure.

The JSON Schema is published at https://mfeflow.github.io/mfeflow/schema/mfeflow.json. Point your editor at it with $schema.

Example

mfeflow.json
{
  "$schema": "https://mfeflow.github.io/mfeflow/schema/mfeflow.json",
  "version": 1,
  "topology": "monorepo",
  "packageManager": "pnpm",
  "scope": "@demo",
  "apps": {
    "shell": { "kind": "shell", "path": "apps/shell", "port": 4300 },
    "catalog": { "kind": "remote", "path": "apps/catalog", "port": 4311 }
  },
  "features": {
    "core": { "version": "0.1.0" },
    "env-t3": { "version": "0.1.0", "options": { "validator": "zod" } }
  },
  "budget": { "baselineKb": 85 }
}

Fields

FieldTypeRequiredMeaning
$schematextNoSchema URL for editors
version1YesFormat version. Must be 1
topologymonorepo, polyrepo, hybridYesRepository layout. The CLI creates monorepo and polyrepo, not hybrid, in this release
repoplatform, shell, remoteNoWhich repo of a polyrepo this is. Absent in a monorepo. A platform or remote repo needs no shell
packageManagerpnpm, npmYesThe CLI supports only pnpm in this release
scopetextYesnpm scope for the project's packages, such as @shopco. Pattern ^@[a-z0-9][a-z0-9-._]*$
appsobjectYesOne entry per app, keyed by name. Needs at least one shell, except in a platform or remote repo
featuresobjectYesInstalled features, keyed by name
filesobjectNoHash of each copied file, keyed by relative path
keptobjectNoFiles upgrade --keep left alone, keyed by relative path
envKeysobjectNoKeys add env-key wrote, keyed by the file they are in
registriesobjectNoThird-party feature registries, keyed by namespace
localtextNoPath to a built mfeflow checkout. Set by --local only
budgetobjectNoOverrides of the cost-model limits

apps

Keys are Module Federation names: lowercase words of letters and digits joined by single underscores.

FieldTypeRequiredMeaning
kindshell, remoteYesThe role of the app
pathtextYesFolder of the app, such as apps/cart
portwhole number 1 to 65535NoDev server port. Two apps may not share one (E115)

features

FieldTypeRequiredMeaning
versiontextYesThe feature version that was applied
optionsobjectNoThe options chosen when the feature was added

Feature names look like analytics-gtm, or @someone/feature for a registry feature.

files

Each key is a relative path with forward slashes. Each value is sha256- followed by 64 hex characters. The hashes let doctor tell when you edited a copied file (E117, a warning). Do not edit them.

kept

Written by mfeflow upgrade --keep. Each value is the hash of the new version the file was kept against. While the new version is that one, upgrade leaves the file out of its report. When the new version changes, the file is raised again. Do not edit it.

envKeys

Written by mfeflow add env-key. Each key is a file path and each value lists the env keys that command added to it, such as { "env.ts": ["API_ORIGIN"] }. When a new version of mfeflow ships another value for one of these keys, upgrade asks what to do instead of only warning. Projects made before this was recorded do not have it, and upgrade keeps warning for them. Do not edit it.

registries

Keys are namespaces like @acme. Values are URL templates. The template must be https, with {name} in the path and optionally {version}.

Plain http is accepted for loopback hosts only. The namespace @mfeflow is reserved. See Third-party features.

budget

All fields are numbers of at least 1. They override the defaults of the cost model.

FieldDefaultMeaning
shellKb32JavaScript the shell may add over a one-app build, in KB
remoteKb10JavaScript each remote on a route may add, in KB
lcpDeltaMs300LCP the shell may add. Measured by your perf job, not by mfeflow budget
baselineKbnoneInitial JavaScript of your pages built as one app. Turns on the shell check

Errors

A missing file is E102, invalid JSON is E103 and a schema mismatch is E104. See Error codes.