---
title: "main.json"
slug: "main-json"
updated: 2022-07-22T19:07:30Z
published: 2022-07-22T19:07:30Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://code.tag.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# main.json

The **main** file is a single text file, formatted as a JSON object, that instructs the data product to register `protocols` as apps, how to test them, and how to arrange them into `categories`. It also helps the data product define some initial overall metadata, like a description and a thumbnail image.

#### naming convention

The **main** file is typically named `main.json` and located in the Data Product directory path `./main.json`.

## overall schema

There are three primary attributes in the **main** file schema: the `data_product_definition` object, the `protocols` array, and the `tests` array. There are some other optional attributes as well, like `data_dictionary`.

Here's the simplest version of a **main** file.

```
{
  "data_product_definition": {
    "name": "fc-foo"
  },
  "protocols": [
    ...
  ]
}
```

### data_product_definition

**usage: *required* - datatype: *object***

The `data_product_definition` is an object to define the name and front end visualization components of the data product.

```
"data_product_definition": {
  "name": "the_unique_name_of_the_data_product",
  "title": "The Name of the Data Product for the User",
  "asset": "data-product-node-icon.jpg",
  "description": "A concise description of what the data product is for",
  "entity_name_singular": "entity",
  "entity_name_plural": "entities"
},
```

### protocols

**usage: *required* - datatype: *array***

The `protocols` array lists the protocols to make available at the launch of the data product.

If no `protocols` are registered, then the embedded `protocols` will be used.

```
"protocols": [
  "protocols/download_protocol.json",
  "protocols/summary_protocol.json",
  "protocols/r_markdown_protocol.json",
  ...
]
```

### tests

**usage: *optional* - datatype: *array***

The `tests` array is used to point to the test scripts to execute upon launch of the data product.

```
"tests": [
  "tests/download_test.json",
  "tests/summary_test.json",
  "tests/r_markdown_test.json",
  ...
]
```

### data_dictionary

**usage: *optional* - datatype: *string*, *object***

Produces a table of all variables within the data product.

```
"data_dictionary": "data_dictionary.tsv"
```

```
"data_dictionary": {
  "file": "_data_dictionary/data_dictionary.tsv",
  "variable_limit": 5
}
```

### categories

**usage: *optional* - datatype: *string*, *object***

The `categories` object is a series of key: value relationships to create like groupings of protocols within the data product.

`protocols` not assigned to a `category` will be given a default value.

```
"categories": {
  "Standard Apps": [
    "protocols/protocol_download.json",
    "protocols/protocol_summary.json"
  ],
  "R Plugin Apps": [
    "protocols/protocol_r_markdown.json"
  ]
}
```

### groups

**usage: *optional* - datatype: *string*, *object***

The `groups` object is a series of key: value relationships to specify access to groupings of protocols within the data product.

```
"groups": {
  "all_users": [
    "protocols/protocol_download.json",
    "protocols/protocol_summary.json"
  ],
  "advanced_users": [
    "protocols/protocol_r_markdown.json"
  ]
}
```
