Mangerate← Back to Mangerate

Official specification

MGRT Recipe File Format

MGRT is a portable, human-readable JSON format for exchanging individual recipes with Mangerate and compatible software. This page defines version 1.0 of the single-recipe format.

Current version: 1.0. An MGRT file uses the .mgrt extension, UTF-8 text encoding, and a JSON object as its top-level value.

Overview

The MGRT format represents one recipe in a self-contained file. It is designed for direct import into the Mangerate app while remaining simple enough to inspect, create, and process with ordinary JSON tools.

The filename extension is .mgrt. The contents are JSON rather than a proprietary binary representation.

Design goals

Portable

A recipe can be saved, transferred, archived, or shared independently of an online account or service.

Human-readable

MGRT files are UTF-8 JSON and can be opened with any text editor.

Extensible

Optional properties allow richer recipe data without making every field mandatory.

Interoperable

The published schema gives applications and automated systems a canonical way to validate and generate files.

File structure

The top-level value must be a JSON object. Four properties are required: metadata, title, ingredients, and instructions.

Required metadata

PropertyType or valuePurpose
fileDescriptionStringHuman-readable description of the file.
fileVersion"1.0"Identifies this version of the format.
fileType"singleRecipe"Identifies a file containing one recipe.
creator"Mangerate App"Canonical creator identifier used by MGRT 1.0.
helpMessageStringExplains how the file can be used.

Recipe fields

PropertyTypeRequirement
titleStringRequired; must not be empty.
ingredientsArray of stringsRequired; at least one item.
instructionsArray of stringsRequired; at least one step.
descriptionStringOptional.
yieldStringOptional.
prepTime, cookTime, totalTimeStringOptional human-readable durations.
tagsArray of stringsOptional.
source, notes, languageStringOptional.
imageURL, imageStringOptional image representations.

Nutrition fields

MGRT 1.0 supports optional string values for calories, carbohydrates, cholesterol, fiber, protein, saturatedFat, unsaturatedFat, sodium, sugar, totalFat, servingSize, and additionalNutrition.

String values preserve both the number and unit, such as "420 kcal", "18 g", or "520 mg".

Images

Images are optional. A file may contain an external image address in imageURL or image data in image. Applications should not require an image to import an otherwise valid recipe.

Because embedded image data can make a file substantially larger, generators may omit it and allow the user to add an image later in Mangerate.

Complete example

{
  "metadata": {
    "fileDescription": "This file contains a recipe in Mangerate format.",
    "fileVersion": "1.0",
    "fileType": "singleRecipe",
    "creator": "Mangerate App",
    "helpMessage": "This file can be imported into the Mangerate app."
  },
  "title": "Roasted Tomato Bruschetta",
  "yield": "4 servings",
  "ingredients": [
    "500 g ripe tomatoes, halved",
    "2 tablespoons extra-virgin olive oil",
    "8 slices country bread"
  ],
  "instructions": [
    "Heat the oven to 200°C (400°F).",
    "Roast the tomatoes until lightly caramelized.",
    "Spoon the tomatoes over toasted bread and serve."
  ],
  "language": "en"
}

Validation and implementation

Applications can validate MGRT 1.0 single-recipe files against the official JSON Schema:

https://mangerate.com/mgrt/mgrt-single-recipe-1.0.schema.json

Implementations should read and write UTF-8 JSON. They may preserve properties they do not recognize so information is not unnecessarily lost when a file passes between applications.

Create a file without writing JSON: use the Mangerate Recipe File Generator.

Versioning

The metadata.fileVersion value identifies the format version. A future incompatible revision will use a new version value and will be documented separately.

Changelog

1.0 — Initial public specification for single-recipe MGRT files.