Mains — Data sources and attribution

Mains's food data comes from three places: the catalog we ship, Open Food Facts, and the foods you create yourself. This page credits the first two and states their licence terms.

USDA FoodData Central — public domain

Mains's built-in food catalog is derived from FoodData Central, published by the U.S. Department of Agriculture, Agricultural Research Service (fdc.nal.usda.gov).

FoodData Central is a work of the U.S. Government and is in the public domain in the United States. No permission is required to use it; USDA is credited here because a user is entitled to know whether a number was measured in a laboratory or modelled from a survey.

Three FoodData Central datasets are ingested, and the app distinguishes between them because they differ in how the numbers were produced:

Dataset Release used What it is How Mains labels it
SR Legacy 2018-04 The legacy Standard Reference: laboratory-analysed generic foods. "USDA", shown as a verified entry
Foundation Foods 2026-04-30 Newer laboratory analyses with full provenance metadata. "USDA", shown as a verified entry
FNDDS (Survey Foods) 2024-10-31 (survey window 2021–2023) Prepared dishes whose nutrients are modelled from ingredient profiles through survey recipes with yield and retention factors — nobody measured "Pad Thai, NFS" in a laboratory. "USDA", shown as modelled, not verified

Mains is not endorsed by, affiliated with, or certified by the USDA. The macro figures shown in the app may have been adjusted from the published values where USDA's own data contains a documented defect (for example, rows whose stated energy cannot be reconciled with their stated macronutrients); those adjustments are ours, not USDA's. Likewise, a vitamin or mineral figure that Claude estimated for a USDA food, or corrected, is marked ✦ in the app: it is Claude's estimate, not USDA's figure.

Other catalog rows — Mains curated, and one Thai figure

A few catalog rows do not come straight from a FoodData Central dataset. Each is labelled in the app by where it came from, never as "USDA":

Row source What it is Licence How Mains labels it
Mains curated Everyday foods entered by hand by Mains. Mains' own. "Mains curated"
Mains curated (brand consensus) A figure computed by Mains as a consensus over many USDA Branded Foods label declarations. Mains' own; built from public-domain USDA records. "Mains curated (brand consensus)"
USDA SR Legacy (derived) A row computed by Mains from one SR Legacy record. Public domain, like its source. "USDA SR Legacy (derived)"
Thai Food Composition Database One food (fresh baby corn), from the table published by the Institute of Nutrition, Mahidol University (INMU), Thailand (inmu.mahidol.ac.th/thaifcd), the source and copyright holder. Not an open licence. One published value set is used with this acknowledgement; the table itself is not redistributed, and no shared food profile is built from it. "Thai Food Composition Database"

Open Food Facts — Open Database License (ODbL 1.0)

Packaged and branded products come from Open Food Facts (world.openfoodfacts.org), a collaborative, free and open database built by volunteers.

Open Food Facts data is made available under the Open Database License (ODbL) v1.0 (opendatacommons.org/licenses/odbl/1-0/). The individual product contents are available under the Database Contents License v1.0 (opendatacommons.org/licenses/dbcl/1-0/).

What that means here, in plain terms:

Open Food Facts data is community-entered and is not verified by Mains or by Open Food Facts. Mains discards rows that are physically impossible and shows at most three suggestions, but a plausible-looking number can still be wrong. Check the package.

Open Food Facts is contacted directly by your device, not through our servers, when you search or scan; see the privacy policy §4.5 for what that request carries.

Shared food profiles derived from Open Food Facts. When a packaged Open Food Facts product is in someone's log, Mains' server fetches that product from Open Food Facts itself and stores a vitamins-and-minerals profile of it — the product's own figures, plus Claude's estimates of what it does not list — in a table every Mains user who logs the product reads from. That table is a database derived from Open Food Facts, and it is made available under the ODbL v1.0 like its source: Open Food Facts is credited for it here and on the food in the app, and a copy of the Open Food Facts part of the table is available on request from support@mains.app. A product edited on Open Food Facts in the last seven days is not added to it.

Open-source software

Mains is built on React Native, Expo, PowerSync, SQLite and a number of other open-source components, each under its own licence (predominantly MIT and Apache-2.0). A full dependency listing is available on request from support@mains.app.